Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect database from another machine?

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Nov 21, 2003
4,772
US
I've recently been given the task of extracting data from a DB2 database.

All I have are the files; and DB2 express. At least I *think* I have all the files... I have a folder called SQL00001 that has a bunch of sub-folders and large data files.

How can I "connect" to that database? I need to export everything out of it (they are updating their software to one that runs off of SQL server, and wants to get all of their historic data)

Any help is greatly appreciated!

TIA!



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
search the manuals for the utility unload - that would be probably the fastest way to extract the data - then bcp/ssis to load to sql server

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
  • Thread starter
  • Moderator
  • #3
I don't appear to have the unload command... either within DB2 or as a stand-alone executable. Does DB2 express have unload?


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #4
If I can figure out how to connect and catalog to the existing files, then I can make an ODBC connection and grab all the data in Excel.

This thing is driving me crazy. Well, crazier.

Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
what is the version of the database on the server, and what is the operating system hosting it - not the one you have on your pc as that should not be used most likely.

and did you search the manuals or just for a "utility executable" on your pc?

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
  • Thread starter
  • Moderator
  • #6
I searched the manuals, and I searched google, and it's not part of the Windows distribution, it seems.

I have very limited access to the server. The customer essentially said "Here's all the files", and that's what I got.


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
not really a good move from the client to give you all the data - depending on the size of db's your db2 express may not even be able to read them completely.

so.. if their db is on a mainframe (Z/OS) the unload utility is a must use - very very fast extract of data and your client should know that.

if it is on another OS then look at - I now think that the unload utility is not available outside Z/OS so the above would be one option

Other alternative, which may be slower so you will need to try it out is to use SSIS to connect to the DB and load the data to SQL Server.

in either case and depending on the charset of the source and the destination you may need to tweak the data so data is correct on the destination server.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
  • Thread starter
  • Moderator
  • #8
yes, the export command looks like it would do what I need... unfortunately the problem goes deeper than that.

I just have a folder with the data files. I've tried cataloging the folder (seems to work), but then a connect to says that it's an invalid path.

I don't know the schema, the tables, etc.

If I could _connect_ to the database, I could probably figure the rest out. Unfortunately, the DB2 errors are... cryptic at best.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #9
Just to follow up... I was able to access the server and export the data using the GUI. This made life MUCH easier.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top