Linked server named for current server throwing error on object not referenced

  • Trying to help out my IT dept here, any suggestions appreciated:

    I have a stored procedure that collects data from across multiple servers. As written, it includes the [servername].[dbname].[schema].[object], so it's clear where the data is coming from. The source database it executes from is on [server1].

    there is also a defined linked server object for [server1]

    When we pull from [server1].[db1].[dbo].[someTable], I get an error saying

    Msg 50000, Level 14, State 5, Line 733The SELECT permission was denied on the object 'someObjectNotInTheCode'

    If I take out the reference to the server in this case, since it's not really needed, then the error goes away. (worked correctly in the past, for what it's worth)

    All of the objects that are used in the code are present in the linked server, as far as I can tell. Has anyone run into this before, are there any suggestions I can pass on, as the folks helping me seem to be stumped?

     

    Thanks,

    Jon

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • MsgID 50000 is usually the error number thrown when you do a raiserror without specifying an error number. You may want to look at the code (or have them look at the code) and the conditions they use to raise the error.

    Sue

  • Thanks, but other than the final Catch there is no error being specifically thrown, and we're only going there when an error occurs along the way.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

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

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