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
 SQL Server Administration (2000)
 linking server

Author  Topic 

putane.sanjay
Yak Posting Veteran

77 Posts

Posted - 2007-01-12 : 06:40:47
Hi

In server 'WINMARKV05' there are 3 databases such as 'sales', 'accounts','analysis '.
i used this query to link to server 'WINMARKV05'.& successfully connected & it is showing sales database tables and views but i want accounts database in my linked server

exec sp_addlinkedserver 'new_link', ' ', 'SQLOLEDB', 'WINMARKV05',

EXEC sp_addlinkedsrvlogin 'new_link',false,null,'username','passeword'


please suggest me

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-01-13 : 02:10:32
When you configure the linked server you can see the tables/views of default database..If you want to access other database info you can run the query with four part name as long as user has the access.

select * from Lservername.databasename.ownername.tablename


MohammedU
Go to Top of Page
   

- Advertisement -