By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Multiple SQL servers in same query

P: 2
I need to write a compound query to access two different SQL servers. When I specify the server name as a prefix to the database name i get syntax error. I can not seem to find any examples of how to qualify which server i want to access the database from. I need to access two databases that are located in two different servers.

I am using SQL server mgt studio and connected to both servers.
Jul 21 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
What error are you getting?

It's usually follows this format:

Expand|Select|Wrap|Line Numbers
  1.  
  2. select * from yourserver.yourdb.owner.yourtable
  3.  
  4.  

Happy Coding!


--- CK
Jul 22 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.