Udostępnij za pośrednictwem


Configure the remote access Server Configuration Option

This topic describes how to configure the remote access server configuration option in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL. The remote access option controls the execution of stored procedures from local or remote servers on which instances of SQL Server are running. This default value for this option is 1. This grants permission to run local stored procedures from remote servers or remote stored procedures from the local server. To prevent local stored procedures from being run from a remote server or remote stored procedures from being run on the local server, set the option to 0.

Ważna informacjaWażne:

This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use sp_addlinkedserver instead.

In This Topic

  • Before you begin:

    Limitations and Restrictions

    Security

  • To configure the remote access option, using:

    SQL Server Management Studio

    Transact-SQL

  • Follow Up:  After you configure the remote access option

Before You Begin

Limitations and Restrictions

  • The remote access option only applies to servers that are added by using sp_addserver, and is included for backward compatibility.

Security

Permissions

Execute permissions on sp_configure with no parameters or with only the first parameter are granted to all users by default. To execute sp_configure with both parameters to change a configuration option or to run the RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. The ALTER SETTINGS permission is implicitly held by the sysadmin and serveradmin fixed server roles.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using SQL Server Management Studio

To configure the remote access option

  1. In Object Explorer, right-click a server and select Properties.

  2. Click the Connections node.

  3. Under Remote server connections, select or clear the Allow remote connections to this server check box.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using Transact-SQL

To configure the remote access option

  1. Connect to the Database Engine.

  2. From the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute. This example shows how to use sp_configure to set the value of the remote access option to 0.

USE AdventureWorks2012 ;
GO
EXEC sp_configure 'remote access', 0 ;
GO
RECONFIGURE ;
GO

For more information, see Server Configuration Options (SQL Server).

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Follow Up: After you configure the remote access option

The setting takes effect immediately without restarting the server.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Zobacz także

Odwołanie

RECONFIGURE (Transact-SQL)

sp_configure (Transact-SQL)

Koncepcje

Server Configuration Options (SQL Server)