calling sp_addlinked server from a stored procedure

  • I am trying to set up a link to another database via a tsql stored procedure.

    Calling sp_addlinkedserver works great from the query analyzer.

    However, when called from the stored procedure, the operation fails,

    saying that the "server" can not be found in sysservers and that I

    need to execute sp_addlinkedserver.

    Does someone know why I am having trouble with this?

  • I can't imagine not being able to make this work in a stored proc...

    Likely it's a problem with your code.  If you like, post your snippet of code someone may see something you missed.

  • Is this a SQL error message (it sounds too helpful!) or something from the code? It could be permissions with the access denial misinterpreted - look at sp_AddLinkedSrvLogin.

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

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