Solved

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

Posted on 2009-05-04
2
253 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now