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
 General SQL Server Forums
 New to SQL Server Programming
 Select Query From Different Server

Author  Topic 

josh2009
Yak Posting Veteran

81 Posts

Posted - 2009-08-03 : 12:41:34
If I were to log into server, I am able to do my select statements. But if I am logged into one database and trying to do a select into the other database after the connection has been established, I am unable to do my select SQL -

select * from serverB.dbems.dbo.mig2list

I get the ff error -

Msg 7202, Level 11, State 2, Line 1
Could not find server 'serverb' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

But like I said, If logged into serverB, I am able to do my select.

Any help would be greatly appreciated. Thanks

X002548
Not Just a Number

15586 Posts

Posted - 2009-08-03 : 13:15:24
logged in from where?

Did you set up a linked server?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -