[dba-SQLServer] Accessing Tables in another server

David Emerson newsgrps at dalyn.co.nz
Tue Jan 16 21:31:47 CST 2007


SQL2000.

I have two servers registered in enterprise manager.  I would like to 
run a stored procedure from a database on one server which gets data 
from a table on the second server.  For example, assuming we have:

Stored Procedure1 in database1 on server 1
Table2 in Database2 on Server 2

I would like to do something like this in Database1

Select *
 From Server2.Database2.dbo.Table2

The error message I get when trying to save the procedure is "The 
number name contains more than the maximum number of prefixes.  The 
maximum is three."

How can I reference the data on the other server?

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand 




More information about the dba-SQLServer mailing list