![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I added SQL2005 server to the linked server in both ServerA and and ServerB. SQL 2005 shows up in the linked servers area of them both. I can actually see the tables and views in the linked servers area on both ServerA and ServerB (I have data access temporarily enabled for testing purposes.) But when I run query analyzer (for a simple test query) on both ServerA and ServerB, it fails and returns this. Server: Msg 7202, Level 11, State 2, Line 1 Could not find server 'Server_2005' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. |
#3
| |||
| |||
|
|
Geoff (butterfly (AT) nomail (DOT) com) writes: I added SQL2005 server to the linked server in both ServerA and and ServerB. SQL 2005 shows up in the linked servers area of them both. I can actually see the tables and views in the linked servers area on both ServerA and ServerB (I have data access temporarily enabled for testing purposes.) But when I run query analyzer (for a simple test query) on both ServerA and ServerB, it fails and returns this. Server: Msg 7202, Level 11, State 2, Line 1 Could not find server 'Server_2005' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. So this error means that yot have not defined any server with the name Server_2005 on these servers. Since I don't see your actual server names, and your actual query, I can't really say where you went wrong, but I would suspect it's a trivial spelling error. When you defined a linked server, it can be as simple as: EXEC sp_addlinkserver 'THATSERVER' And then you are able to connect to THATSERVER with queries like: SELECT name FROM THATSERVER.master.dbo.sysdatabases But a linked server is really only an alias, so you can say: EXEC sp_addlinkedserver 'MYALIAS, '', 'SQLOLEDB', 'THATSERVER' And now you can run queries on THATSERVER like this: SELECT name FROM MYALIAS.master.dbo.sysdatabases |
#4
| |||
| |||
|
|
Geoff (butterfly (AT) nomail (DOT) com) writes: I added SQL2005 server to the linked server in both ServerA and and ServerB. SQL 2005 shows up in the linked servers area of them both. I can actually see the tables and views in the linked servers area on both ServerA and ServerB (I have data access temporarily enabled for testing purposes.) But when I run query analyzer (for a simple test query) on both ServerA and ServerB, it fails and returns this. Server: Msg 7202, Level 11, State 2, Line 1 Could not find server 'Server_2005' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. So this error means that yot have not defined any server with the name Server_2005 on these servers. Since I don't see your actual server names, and your actual query, I can't really say where you went wrong, but I would suspect it's a trivial spelling error. When you defined a linked server, it can be as simple as: EXEC sp_addlinkserver 'THATSERVER' And then you are able to connect to THATSERVER with queries like: SELECT name FROM THATSERVER.master.dbo.sysdatabases But a linked server is really only an alias, so you can say: EXEC sp_addlinkedserver 'MYALIAS, '', 'SQLOLEDB', 'THATSERVER' And now you can run queries on THATSERVER like this: SELECT name FROM MYALIAS.master.dbo.sysdatabases |
#5
| |||
| |||
|
|
EXEC sp_addlinkedserver @server='SQL_Server_2005 ', @srvproduct='', @provider='SQLOLEDB', @datasrc='SQL Server 2005 instance name' I enable RPC out and setup a login that I created on the 2005 machine. AGAIN this all works on other machines that I have. The simple query is select * from sql2005server.msdb.dbo.sysjobs |
#6
| |||||||
| |||||||
|
|
Geoff (butterfly (AT) nomail (DOT) com) writes: EXEC sp_addlinkedserver @server='SQL_Server_2005 ', @srvproduct='', @provider='SQLOLEDB', @datasrc='SQL Server 2005 instance name' I enable RPC out and setup a login that I created on the 2005 machine. AGAIN this all works on other machines that I have. The simple query is select * from sql2005server.msdb.dbo.sysjobs I notice a difference here. In the call to sp_addlinkedserver you have underscores, in the query you don't. |
|
I am sorry, but it is impossible for me to say what you have done wrong. But since the error message you got clearly says that the linked server is not defined, |
|
there are really only two possibilties: |
|
1) Spelling error. |
|
2) You are running the query on a different server from where you defined the server. |
|
Since you seem to be referring to a UI, the latter is not an unlikely explanation. |
|
Did you run "SELECT * FROM master.dbo.syservers" on the server where you got this error? |
#7
| |||
| |||
|
|
Yes. I get the local information back. I also told you I have compared the tables side by side and they have identical information. |
#8
| |||
| |||
|
|
Geoff (butterfly (AT) nomail (DOT) com) writes: Yes. I get the local information back. I also told you I have compared the tables side by side and they have identical information. As I said, I don't see your servers, so I cannot say what is going on from a distance. But the error message is pretty clear. Then you can question the answers I give you, but I'm afraid that it is getting nowhere. But run this in a query window with output to text: SELECT * FROM master.dbo.sysservers go SELECT name FROM PUTYOURSERVERNAMEHERE.master.dbo.databases And post the output. |
#9
| |||
| |||
|
#10
| |||
| |||
|
|
Not sure what you are asking for at this point, but I did this. I did both of these on the local 2000 machine. SELECT * FROM master.dbo.sysservers go SELECT name FROM local2000ServerName.master.dbo.databases Gave this. (2 row(s) affected) Server: Msg 7202, Level 11, State 2, Line 1 Could not find server 'local2000ServerName' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. |
![]() |
| Thread Tools | |
| Display Modes | |
| |