Active Directory Services

SQL Replication

Replication

Active Directory Services

Replication publications can be accessed using Active Directory™ Services on the Microsoft® Windows® 2000 operating system. Through Active Directory, you can view replication objects, such as a publication, and, if allowed, subscribe to that publication.

Typically, if a user wants to subscribe to a publication, they must know the name of the instance of Microsoft SQL Server™ and the database where the publication is published. Having publication information available in Active Directory allows users to browse based on publication properties and, if allowed, to subscribe to publications using pull subscriptions. Users do not need to know the server name and database where the publication is located. 

Active Directory is a central component of the Windows 2000 operating system and provides a place to store information about network-based entities, such as applications, files, printers, and people.

The properties listed in the Active Directory may not always be exactly the same as they are in SQL Server. If there is discrepancy between the publication and attributes in the Active Directory and publication properties in SQL Server, the publication properties in SQL Server are the correct settings to use. This also applies to database and server listings in the Active Directory.

Adding or Removing a Server Object to the Active Directory

Adding an instance of SQL Server object to the Active Directory requires a login with local administrator privileges on the server. If the login used to register the instance of SQL Server does not have sufficient permissions, and the server is a local server, the Connect to SQL Server dialog box is displayed requesting a login with the required permissions. If the login does not have sufficient permissions, and the server is a remote server, an error message is displayed.

To add a SQL Server object to the Active Directory

  1. On the SQL Server Properties dialog box, Active Directory tab, click Add.

  2. After the SQL Server object is added, click Refresh to update the attributes of the instance of SQL Server object in the Active Directory. (Clicking Refresh does not add new objects to the Active Directory; it only refreshes the attributes of the server object).

To remove a SQL Server object from the Active Directory

  • On the SQL Server Properties dialog box, Active Directory tab, click Remove. Removing this SQL Server object from the Active Directory also removes its databases and publications from the Active Directory.

To add or remove a SQL Server object from the Active Directory using Transact-SQL

  • Execute sp_ActiveDirectory_SCP and set @action='CREATE' to add to Active Direcotry or set @action='DELETE' to remove from Active Directory.
Adding Publications as Active Directory Objects

After the SQL Server object is enabled for the Active Directory, you can add publications as Active Directory objects. To add publications the SQL Server service account must have at least Power User privileges.

To add a publication to the Active Directory

  1. Right-click the publication, and then click Publication Properties.

  2. On the General tab, select List this publication in the Active Directory. Or when you are creating a publication using the Create Publication Wizard, on the Select Publication Name and Description page, select List this publication in the Active Directory. If a Subscriber has access to the publication, you can subscribe to the publication using Active Directory.

To add a publication to Active Directory using Transact-SQL

  • For new publications, execute sp_addpublication or sp_addmergepublication and set @add_to_active_directory='TRUE'.

  • For existing publications, execute sp_changepublication or sp_changemergepublication and set @property=publish_to_ActiveDirectory, @value='TRUE'.
Browsing or Subscribing to Publications in Active Directory

You can browse publications in Active Directory and, if allowed, subscribe to publications using the Pull Subscription Wizard or Windows Synchronization Manager.

Browsing or Subscribing to Publications in Active Directory Using the Pull Subscription Wizard

  1. At the Subscriber, start the Pull Subscription Wizard, and then on the Look for Publication page, select Look at publications in the Active Directory or specify publication information.

  2. On the Specify Publication page, click the browse button (...) to browse for publications in Active Directory.

Browsing or Subscribing to Publications in Active Directory Using Windows Synchronization Manager

  1. In Windows Synchronization Manager, double-click To create a subscription, and then select By browsing Active Directory for publications.

  2. On the Create Anonymous Subscription (Browse the Active Directory) dialog box, view the publication listed in Active Directory or click the browse (...) button to browse for publications in Active Directory.

For more information, see the Windows 2000 Server documentation.