Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I query a remote db within my local MS SQL 2008 Studio envirnoment?

Posted on 2009-05-04
2
Medium Priority
?
284 Views
Last Modified: 2012-05-06
I connected to a remote db (192.xxx.xxx.xxx) vua VPN and added that db in my local studio environment.  I know how to connect to a different db...

select from testdb.dbo.test_table (etc)

My code to select from the remote db is:

select * from [192.xxx.xxx.xxx]..testdb.dbo.test_table

Is stating I have too many prefixes.  I know this is simple but short on time and would apprciate any help on this.

Thx
0
Comment
Question by:Glen_D
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
prachwal earned 2000 total points
ID: 24299586
create linked server
http://msdn.microsoft.com/en-us/library/ms188279.aspx
and
http://msdn.microsoft.com/en-us/library/ms190479.aspx


select * from linked_name.testdb.dbo.test_table
0
 

Author Closing Comment

by:Glen_D
ID: 31577773
Thx...added the linked server to the local even though I could see everything on the remote db within my envirnment; query worked perfect.

Glen
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question