Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    7

    Unanswered: Remote connection

    I'm trying to retrieve a recordset from an another database which can be reach to with a remote connection. I was trying to use the OpenDataSource, but this does not work with MS.Remote, apparently.

    This works:
    Code:
    SELECT TOP 1 * FROM
    OPENDATASOURCE(
         'SQLOLEDB', 'password=pwd;persist security info=true;user id=UID;initial catalog=Dbase;data source=SQLServer;
         use procedure for prepare=1;auto translate=true;packet size=4096;workstation id=myPC;use encryption for data=false;
         tag with column collation when possible=false'
         ).DBase.dbo.Equipment
    This doesn't:
    Code:
    SELECT TOP 1 * FROM
    OPENDATASOURCE(
         'MS REMOTE.1', 'persist security info=false;data source=SQLServer;remote server=http://iis_dv_arg;
         handler=msdfmap.handler;internet timeout=5000;transact updates=true'
         ).DBase.dbo.Equipment
    How can I fix this?



    BTW, the error I get is: "Ad hoc access to OLE DB provider 'MS REMOTE.1' has been denied. You must access this provider through a linked server."
    Last edited by Mc Brain; 03-17-03 at 18:53.

  2. #2
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    to connect from one sql server to another one, you have to create a link between these servers (in sql server called a linked server). You can do this through the Enterprise Manager.
    Johan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •