How to create a linked Server Query
Server1 name is Server, Table name is Employee
Server2 name is RAPAN, Table name is Venus
I want to select a venus table (server2) through server1.
How to do this through query
Tried Query
EXEC sp_addlinkedserver
@server = 'server',
@srvproduct = '',
@provider = 'SQLOLEDB',
@datasrc = 'RAPAN'
GO
Query Executed Successfully, But when it try to select * from venus through server1, it’s giving error as invalid object name
What wrong in my query…
SELECT * FROM server1.RAPAN.dbo.venusTo add linked server use (and play with options on your needs):
Set optional options
Add login (And read more)