Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Link Server

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-06-13 : 05:18:16
Hello everyone.
i want to access the databases which are located at the different servers. is there any way to do so.

something Like i have 2 servers.

Server A and Server B

i am currently connected at server A and i want to write the query which will pick the value from the Server B using Query Analyser.

i tried something like
Select * From ServerB.Database.dbo.tab1

but it gave me some error of sp_Addlinkserver........

Thanks

Complicated things can be done by simple thinking

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-13 : 05:29:20
You need to add ServerB as Linked Server
Run this
sp_addlinkedserver 'ServerB'
and then
Select * From ServerB.Database.dbo.tab1



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vivek.kumargupta
Starting Member

45 Posts

Posted - 2005-06-13 : 09:26:46
You can do this through enterprise manager also under security folder ->linked servers

Thanks,
Vivek
Go to Top of Page
   

- Advertisement -