Solved

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

Posted on 2009-05-04
2
260 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
2 Comments
 
LVL 3

Accepted Solution

by:
prachwal earned 500 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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