Results 1 to 7 of 7

Thread: import/export

  1. #1
    Join Date
    Nov 2003
    Location
    California,USA
    Posts
    72

    Unanswered: import/export

    Hello All,

    I am trying to export data from a database in MS-SQL server and import the same to a database in DB2 UDb v7.2 on AIX5. While trying to do this, I am getting some errors "table name is undefined" and "drivers are not capable."

    I selected the IBM DB2 ODBC DRIVER for the destination server. Am I doing any mistake....

    This is being posted in both DB2 and MS-SQL sites.

    Thanking you all....

    ...Ram

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: import/export

    how do you transfer the data from one server to the other ?
    Flat files ? Or linked servers ?

  3. #3
    Join Date
    Nov 2003
    Location
    California,USA
    Posts
    72

    Re: import/export

    Linked Servers...

    Thanks...

    Originally posted by Karolyn
    how do you transfer the data from one server to the other ?
    Flat files ? Or linked servers ?

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Some code woul;d help...

    Can you select from the DB2 Table in SQL?

    Also, I woiuld disagree with this statement...

    trying to export data from a database in MS-SQL server and import the same to a database in DB2 UDb v7.2 on AIX5.
    What for example would you do with DB2's DATE or TIME Datatype?

    The list of difference is not small....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: import/export

    -1-

    I would be interested to know how you linked your DB2 to SQL Server
    Did you use sp_addlinkedserver ?


    -2-

    This would be an example of importing data from DB2 database to SQL Server Database

    Insert into SQL_DB..TablePerson
    Select * From
    OPENQUERY([Linked Server Name],
    'Select DB2_DB..TablePerson.* From DB2_DB..Table.Person')

  6. #6
    Join Date
    Nov 2003
    Location
    California,USA
    Posts
    72
    Yes, I do agree with you.

    I am using the DTS Import/Export Wizard from SQL Server Enterprise Manger. From this I am selecting the source as SQL db and destination with IBM Db2 ODBC Drivers-DB2database. Here, the table is being created with the same columns in the destination database but no data being transfered.

    What is the right way to transfer data from one db to another kind of db (in this case from MS SQL to DB2UDB) ?

    Thank you,

    ...Ram

    Originally posted by Brett Kaiser
    Some code woul;d help...

    Can you select from the DB2 Table in SQL?

    Also, I woiuld disagree with this statement...



    What for example would you do with DB2's DATE or TIME Datatype?

    The list of difference is not small....

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I thought you were using linked servers...

    Can you do

    SELECT * FROM DB2Table?

    If so, why not do An

    INSERT INTO DB2Table(Cols) SELECT Cols FROM SQLServerTable?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •