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
 General SQL Server Forums
 New to SQL Server Programming
 QUERY TABLES ON REMOTE SERVER

Author  Topic 

doco
Yak Posting Veteran

77 Posts

Posted - 2008-06-25 : 17:55:35
I have created a SQL Server database using 2005 Express on local machine and I am want to query tables in another SQL Server database on a remote server using VPN tunnel. The local machine has access permissions to and through the VPN.

I know I may access another db on the same server by using 'Database..table_name' format. What I would like to know is how to refer to a table on another server.

Education is what you have after you've forgotten everything you learned in school

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-25 : 17:57:57
1. Create a linked server
2. Use the four-part naming convention of the remote object:
LinkedServerName.DatabaseName.ObjectOwner.ObjectName

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

doco
Yak Posting Veteran

77 Posts

Posted - 2008-06-25 : 21:19:05
Thanks - that did the trick.

I also found this link as follow up to
quote:
Create a linked server
:
http://msdn.microsoft.com/en-us/library/aa560998.aspx
For further reference.

Education is what you have after you've forgotten everything you learned in school
Go to Top of Page
   

- Advertisement -