How to create a Link to a DASP SQL Server?

Discussion in 'Databases' started by theguyver, Jul 3, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have a SQL Server 2005 database hosted by DASP (Server1) and another on a server of mine (Server2).

    What I'm trying to do: From Server2 update a table in Server1

    Sounds simple but I've been banging against the wall for days now.
    I can connect to Server1 using the SQL Server Management Studio as well as from VB. But when I try to access Server1 from Server2 I get all sorts of errors.

    Here's what I'm doing to create the Linked Server:

    On Server2:
    Expand Server Objects
    Right-Click Linked Servers -> New Linked Server...

    Under the General Tab:
    Linked Server = Server1
    Provider = Microsoft OLE DB Provider for SQL Server
    Product Name = SQL Server
    Data Source = tcp:sql2k501.discountasp.net
    Provider String = SQLOLEDB.1
    Catalog = My_DASP_DB

    Under the Security Tab:
    Selected Be made with this security context:
    <Entered my UserName and Password>

    Then tried to access the data with this query:
    select * from Server1.My_DASP_DB.dbo.My_Table

    I get the following error:
    -------------------------
    OLE DB provider 'SQLNCLI' for linked server 'Server1' returned message 'Login timeout expired'.
    OLE DB provider 'SQLNCLI' for linked server 'Server1' returned message 'An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.'.
    Msg 53, Level 16, State 1, Line 0
    Named Pipes Provider: Could not open a connection to SQL Server [53].
    -------------------------

    I changed the timeout settings but then it only waits longer to give me the same message.

    I also tried using the SQL Server Native Client to no avail. I get the following error:
    -------------------------
    OLE DB provider 'SQLNCLI' for linked server 'Server1' returned message 'Invalid connection string attribute'.
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider 'SQLNCLI' for linked server 'Server1'.
    -------------------------

    Can anyone post instructions on how to create a Linked Server pointing to a DASP database? (Another solution, a way to update Server1 from Server2, would also be greatly appreciated too)
     
  2. I think you're just setting up the linked server incorrectly...

    On the General tab,
    Linked server: SQL2K501.DISCOUNTASP.NET
    Server type: SQL Server

    On Security tab, same as you had.

    Then access your db tables w/ a command like so

    SELECT * FROM [sql2k501.discountasp.net].[yourdbname].[dbo].[yourtablename]

    I've done this from SQL server 2005 and express editions, though as a matter of fact, I've only used it to update "Server2" as it happens. :)
     
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