How to disable a remote server setup (Transact-SQL)

To disable a remote server setup

  1. Run the following code on the second server running Microsoft® SQL Server™.

    EXEC sp_remoteoption ServerName1,sa, sa, trusted, false
    EXEC sp_dropremotelogin ServerName1, sa, sa
    RECONFIGURE

    GO

      

    EXEC sp_configure 'remote access', 0
    EXEC sp_dropserver ServerName1
    EXEC sp_dropserver ServerName2

    RECONFIGURE

    GO

      

  2. Stop and restart the second SQL Server.
  3. Run the following code on the first SQL Server:

    EXEC sp_configure 'remote access', 0

    EXEC sp_dropserver ServerName2

    EXEC sp_dropserver ServerName1, local

    RECONFIGURE

    GO

      

  4. Stop and restart the first SQL Server.
See Also
sp_configure sp_remoteoption
sp_dropremotelogin RECONFIGURE
sp_dropserver  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.