Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Calling Linked server Stored Procdure from another

Author  Topic 

Sheetal
Starting Member

10 Posts

Posted - 2007-10-27 : 08:27:30
Hi Sir,

I want to call one linked server stored procedure from another stored procedure.

--BATCH FOR LINKED SERVER SETUP

SET @IBatchNum = 2


EXEC PR_Linked_Server

@VServer = 'Linked_Amisys'
,@VSrvProduct = ''
,@VProvider = 'SQLOLEDB'
,@VDataSrc = 'DTCORPMXDV9'
,@VCatalog = 'pubs'
,@VCurrentUsr = 'CORP\ajohri'
,@VServerUsr = 'dba'
,@VServerPwd = 'dba'

END TRY

The linked server was not created When I executed the query. However, I was able to create the linked server when I executed this query(batch 2) alone.
Is there any limitation of SP which I am not aware of?

Kristen
Test

22859 Posts

Posted - 2007-10-27 : 10:17:14
"I was able to create the linked server when I executed this query(batch 2)"

If you show us the query we may be able to tell you why.

If your Sproc is using sp_addlinkedserver then that will require the user to have sysadmin and setupadmin role

Kristen
Go to Top of Page
   

- Advertisement -