One stored procedure: Some data in SQL 2000 and some in SQL 2005

  • Hello,

    I have some stored procedures that have these lines:

    use pbfamily

    use pbfamily_new

    Both of these dataases used to be on the same SQL 2000 database. Now, the pbfamily database is still in SQL 2000, but the other is in SQL 2005.

    use pbfamily (SQL 2000)

    use pbfamily_new (SQL 2005)

    My question is, can I have a procedure running on SQL 2005, make references to tables and data in a database on SQL 2000?

  • You will need to create a linked server between the two instances and use four-part naming (e.g. server.database.schema.object).

    Jeff

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thank you, I will give that a try.

Viewing 3 posts - 1 through 2 (of 2 total)

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