Linked SQL Server 2008 7314 Error

  • I created a linked server to a remote SQL Server. Both local and remote are 2008 R2. Local is SQLExpress, btw.

    I can execute (names changed to protect the innocent):

    exec RemoteServer.RemoteDB.dbo.sp_executesql N'SELECT COUNT(*) FROM myTable'

    successfully and get the results. But if I execute

    SELECT COUNT(*) FROM RemoteServer.RemoteDB.dbo.myTable

    I get a 7314 error.

    I have very low permissions on the external database, probably db_reader on that database only, with no permissions on the system databases. For example, I can't browse the tables I have access to in Management Studio. I don't know if this is part of the problem or not.

    Any ideas on how to diagnose this? My sp_addlinkedserver is pretty straight-up and I think is validated by the fact the remote sp_executesql works. I do have the (SQL Server) user name and password in @provstr.

  • Are you using a static login on your linked server? Impersonating? If you log into the remote server directly using those credentials, are you allowed to select from the table?

  • Yes, static login. Not impersonating. If I connect directly through management studio the same query works fine

  • Anyone?

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

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