Possible Duplicate:
How can I connect to an external database from a sql statement or a stored procedure?
I have a database server 'A'(SQL Server 2008) and database server 'B' (SQL Server 2005).
I need to pull some data from a database on server 'B' when I am on server 'A'.
I tried this query on Server 'A':
SELECT *
FROM [ServerName].[DataBaseName].[dbo].[TableName]
I am getting this error :
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
Is there some thing wrong with my query or do we need to change any setting on the server so that I will be able to access the database.