December 7, 2007 at 12:40 am
Hi All
I am new to sql world. I want to access remote server database through the views on my local system database. Please help.
Sac
December 7, 2007 at 3:56 am
You need to create a linked server using sp_addlinkedserver procedure
EXEC sp_addlinkedserver
@server='TestServer',
@srvproduct='',
@provider='SQLNCLI',
@datasrc='YourServer\InstanceName'
Then, create linker server login
EXEC sp_addlinkedsrvlogin 'TestServer', 'false', 'sa', 'sa', 'password'
Thats it.
Now query the server,
select * from TestServer.master.dbo.sysobjects
--Ramesh
December 7, 2007 at 4:56 am
Ramesh,
You can also use opendatasource to query remote servers. try that if u need it only for the hour else go for linked servers for permanent solution.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy