Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    16

    Question Unanswered: How to create multiple connection in T_SQL script

    How to create multiple connection in the same T-SQL script and apply this in a query.

    *I can do that?



    Exemple like that (is not working...!)
    ========================
    Server NameerverName1
    User:user_srv1
    Password : PW_srv2
    Server NameerverName2
    User:user_srv2
    Password : PW_srv2

    SELECT a.FieldID, b.FieldID FROM
    ServerName1.DatabaseName.dbo.TableName a,
    ServerName2.DatabaseName.dbo.TableName b
    WHERE a.FieldID=b.FieldID

  2. #2
    Join Date
    Sep 2003
    Location
    Dallas, Texas
    Posts
    311

    Re: How to create multiple connection in T_SQL script

    Create server1 and server2 as link servers, then you can execute the query.

Posting Permissions

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