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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to creat a linked server

Author  Topic 

lw1990
Yak Posting Veteran

85 Posts

Posted - 2008-09-29 : 16:06:08
Hi,
Under one SQL Server Group, I have 2 servers Product1 and Product2 which are in different virtual server. I was trying to query a table in Product2 from Product1 in a SQL Query Analyzer:

Select * from Product2.HRdb.dbo.EmployeeInfo

I got an error message:
Server: Msg 7202, Level 11, State 2, Line 1
Could not find server 'Product2' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.


So, I added the server product2 in the same SQL Query Analyzer:
USE master
GO
EXEC sp_addlinkedserver 'Product2', N'SQL Server'
GO


That was succeeded. And I use the same query to get the table again:

Select * from Product2.HRdb.dbo.EmployeeInfo

This time I got another error message:
Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


Please tell me what else I need to do to get the data queried from one server(like my Product1) to other servers(like my Product2)?

Thanks.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-29 : 16:08:08
Does that SQL login exists in both servers?
Go to Top of Page

lw1990
Yak Posting Veteran

85 Posts

Posted - 2008-09-29 : 16:34:25
Thanks sodeep,
Yes, my name is in both server's login as admin.

Go to Top of Page
   

- Advertisement -