
Hi
You can use
Linked Server.
Steps:
1. Step into your server\Instance (Server1)
2. Define a Linked server for that server which you want to access (Server2)
EXEC SP_AddLinkedServer 'Server2'
Go
3. Provide login credential for the Linked server just now you created.
EXEC SP_AddLinkedSrvLogin 'Server2','False','Current_Server1_LoginID','Server2 Login ID','Server2 Password'
GO
4. Validate whether the Linked server properly defined / not
EXEC SP_TestLinkedServer N'Server2'
Go
It should return "Command(s) completed successfully."
5. Once you defined the Linked server. You can access the objects from Server2 by Four part naming convention. (ServerName.DatabaseName.SchemaName.ObjectName)
Select * From Server2.DatabaseName.Dbo.TableName WITH (NOLOCK)
Go
Cheers
Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions
Csmaniam, if this helps please login to Mark As Answer. | Alert Moderator