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

I connected to a remote db ( 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 []..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.

Who is Participating?
prachwalConnect With a Mentor Commented:
create linked server

select * from linked_name.testdb.dbo.test_table
Glen_DAuthor Commented:
Thx...added the linked server to the local even though I could see everything on the remote db within my envirnment; query worked perfect.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.