Procedure call from 2000 to 2005

Hi is it posible to make a procedure call from an SQL Server 2000 instance to a SQL Server 2005 instance. I believe this is posible by registering the 2005 instance as a linked server with 2000 but so far have had no luck with this

Thanks



Answer this question

Procedure call from 2000 to 2005

  • BillS

    If SQL2005 Server Name is LPXP561 the code is as given below

    EXECUTE
    sp_addlinkedserver
    @SERVER='MyLinkedServer' ,
    @Provider='SQLoledb',
    @srvproduct='',
    @DATASRC='\\lpxp561'

    GO

    EXECUTE lpxp561.SQL2005START.dbo.get_Favorites


  • ZKing

    Sorry about the last post. It will work only if yu are executing queries. for Stored Procedures you need to execute one more statement. The code block is

    SQL2005 Server Name is LPXP561 the code is as given below


    SP_ADDLINKEDSERVER

    @SERVER='MyLinkedServer' ,
    @Provider='SQLoledb',
    @srvproduct='',
    @DATASRC='LPXP561'
    GO
    sp_serveroption 'MyLinkedServer','rpc out', 'ON'
    GO

    SELECT * FROM MyLinkedServer.SQL2005START.dbo.Customers
    GO
    EXECUTE MyLinkedServer.SQL2005START.dbo.x
    GO


  • Mariachi

    Awesome thanks works great!
  • Procedure call from 2000 to 2005