converting db2 tables to sql server

  • other than bying a migraation tool what is the best way to transfer data from  db2 8.1 luw to sql server 2000 or 2005?? I am working with DTS right now and it seems like it might work, is therre another way. all i want is the data, not the objects.

  • This is what DTS was designed for.  Sure, there are other ways (such as generating your own SQL script) but since you're new, stick with DTS.  With that you should be able to grab the data, play with it as you want and stuff it pretty much wherever you want.

    Check out http://www.sqldts.com for some good basic (and advanced) tips on using DTS.

  • DTS definately.

    In a previous job, we used DTS to move data between an AS/400 DB2 database and SQL Server.

    We had a mix of straight copies from table to table as well as VBScript to move data back and forth.

  • in dts did you use sql statements just to move the data?? were there any problems with dates??

  • Hey Ricka,

    We used DTS to do a direct data migration (no explicit sql code) and we also used sql statements or vbscript to read/write from DB2.  Our issues with dates was that the date on DB2 was stored julian date format, so we had custom code to convert it back to a normal readable date.

  • I am trying to create a very simple dts package. i am following the directions. i create my source(db2udb) the target(sql server) and then i am supposed to draw a line between them. when i drag the line it is a dash line but i can't make it stick. when i let go of the mouse button there is no line. what am i doing wrong??

  • Highlight the source, hold down the CTRL button, highlight the destination.  Right-click and you should see the transform task.

    (this is from memory, I don't have the GUI in front of me...)

    Check out this article: http://www.sqldts.com/default.aspx?278

    see this page in particular: http://www.sqldts.com/default.aspx?278,9

  • Sounds about right.  The dotted line sounds like you are sending an on completion, on success or on failure call.

    a transformation will be displayed as a bold arrow pointing from the source to the destination.

  • i have had success with dts thanks to everyone's help. thank you.

     

    now for another question. i am getting errors on date transformation. sql server does not like db2 date(actually timestamp). does anyone have an example of converting dates(timestamp) to sql server??

  • What error are you getting?  In my experience, we transfered a Julian Date and had a bit of VBScript on the transformation to convert that to a date field.

  • it does not give me a specific error. just a general statement that there were errors. is there a dts log file somewhere i can look at??

    also, i need to change this date using sql because i don't know VB at all.

     

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply