Referencing remote database tables

Discussion in 'Databases' started by RajanAM, Oct 23, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. How can I reference remote discountasp.net database when my active datbase connection in SQL Server Management Studio is local database?


    The following SQL


    INSERT [MYDiscountASP.NET][MyDatabaseName].tTableName (city)
    SELECTcity FROM tTableName
    WHERE state = 'CA'


    doesn't seem to work.


    Thanks.
     
  2. Best way is to open your local and remote DB's on the left side.

    Then open the one you want to test.

    Then right-mouse click to open a new SQL window.

    At that point the dirty work is done for you.
    Makes it quick for testing queries.
     
  3. Thanks for your response to my post.

    But I didn't follow your suggestion.

    I have both databases (remote & local) open in the Object Explorer.
    But when opening a new query window only one is active to run the SQL.
     
  4. Do you need to access more than one at a time?

    Can youproject a basic picture as to your needs?
    I'mnot picturing it, but I do wantto help.
    Salute,
    Mark
     
  5. I understand your problem its very simple


    are you using 2005 or 2000?


    if 2005, Open management tool, Register both the servers.


    if you want discountasp.net server


    remoteservername.dbo.tablename..try this or use db name in the place of dbo
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page