Stored procedure and ODBC

  • We have some data source configured with ODBC connection.

    Is there anyway I can use inside stored procedure to access this ODBC data source and copy them over to local SQL server.  ( Not the DTS import/export package)

     

    Thanks,

     

    HG

     

  • Create a linked server to the ODBC data source and use the linked server in your stored procedure or use OPENROWSET keyword..  Check OPENQUERY and/or OPENROWSET in BOL.


    Joseph

  • My ODBC data source is DB2, no OLE DB lib provided by MS to build the linkdb.

    Is there any other solution for Stored Procedure.

    If DTS is the way, Can I define cursor inside DTS so that I can see each record I pumped.

    Thanks,

  • Won't Microsoft OLE DB Provider for ODBC Driver work?

    Since DTS can 'see' your ODBC, I'm sure you could create a liked server to it.

    I'd stay clear of cursors in DTS.  Use ActiveX instead.


    Joseph

  • Joseph,

    You are right, OLE DB for ODBC driver works for building linkdb for DB2. But Microsoft OLE DB for DB2 would't work.

    DTS connect to ODBC no problem.

    Thanks

    HG

Viewing 5 posts - 1 through 4 (of 4 total)

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