Managing Remote Users

After you set up a remote server, you will set up remote login IDs for the users who need to access that remote server. You will also grant permissions to execute the stored procedures. This chapter explains how to add remote users. To learn how to grant permissions, see Chapter 9, Managing Security.

The type of SQL Server security chosen (integrated, mixed, or standard) does not affect the management of remote users, since the security described in this chapter is used when executing remote stored procedures are executed across server-to-server connections.

The following steps summarize the actions you perform to set up remote users. As part of this summary we provide an example, where the server GREYHOUND is the local server and the server RABBIT is the remote server. These two servers are set up as remote servers to each other, and then the login ID dan on GREYHOUND is mapped to the remote login ID danshelly on RABBIT.

These are the steps you perform to set up a remote user:

  1. The local server adds the remote server as a remote server.

    In this example, the SA on GREYHOUND types:

    sp_addserver rabbit
  2. The remote server adds the local server as a remote server.

    Viewed from the perspective of the remote server, the local server becomes a remote server to it. In this example, the SA on RABBIT types:

    sp_addserver greyhound
  3. If the necessary login ID does not already exist on the remote server, add it.

    In this example, if the login ID danshelly does not already exist on RABBIT, the SA of RABBIT adds it by using SQL Enterprise Manager or sp_addlogin.

    For information about using SQL Enterprise Manager or sp_addlogin, see Chapter 9, Managing Security.

  4. If the necessary login ID does not already exist on the local server, add it.

    In this example, if the login ID dan does not already exist on GREYHOUND, the SA of GREYHOUND adds it by using SQL Enterprise Manager or sp_addlogin.

  5. Map the login ID on the local server to the remote login ID on the remote server.

    This is accomplished on the remote server. In this example, the SA of RABBIT maps the login ID dan on GREYHOUND to the login ID danshelly on RABBIT.

    sp_addremotelogin greyhound, danshelly, dan

    Note This example shows one way to map login IDs. There are other possible mapping configurations. For information, see the topics that follow.

  6. Set the remote login option on the remote server.

    In this example, the SA of RABBIT sets the remote login option to true, which specifies that RABBIT will accept remote logins from GREYHOUND for the danshelly remote login ID without verifying the password. The SA of RABBIT would type:

    sp_remoteoption greyhound, danshelly, dan, trusted, true

The preceding procedure provides an overview of a simple implementation. Other options and more complex configurations are possible. For more information about setting up the remote server relationships, see Managing Remote Servers, earlier in this chapter. For more information about setting up remote users, choose one of the following topics:

Adding Remote Users

Setting the Remote Login Option

Displaying Information About Remote Users

Dropping Remote Users