Jump to content

Linked servers


pulpfiction

Recommended Posts

Need some help linking two server..... I use a stored procedure in one server and need to get data from DB in another server.... but unable to do it... Tried to link server using EXEC dbo.sp_addlinkedserver [Lservername], 'SQL Server' and also checked if its linked with EXEC sp_linkedservers, linked server is in that list... but when I try to get data select * from [Lservername].[dbname].[dbo].Tblname from the server it throws a "login failed for user 'servername' "TIA

Link to comment
Share on other sites

Its been a little while since I've delved into linked servers, which means I can no longer find my source code that uses this, ... but as I recall it the server will be registered whether or not it can connect.

EXEC dbo.sp_addlinkedserver [Lservername], 'SQL Server'
With this command I'm assuming that you're trying to connect to another sql server instance on the same box, is this correct?If so, does it use the same authentication method as the server you're calling from?I'd think that it is connecting, hence the failed authentication message rather than the 'server not responding' message.I'll see if I can dig anything else up.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...