Export (0) Print
Expand All
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

sp_ActiveDirectory_SCP

SQL Server 2000

Controls the registration of an instance of Microsoft® SQL Server™ in the Microsoft Windows® 2000 Active Directory™. The actions of sp_ActiveDirectory_SCP always apply to the instance of SQL Server to which you are currently connected.

Syntax

sp_ActiveDirectory_SCP [ @Action = ] N'action'

Arguments

[ @Action = ] N'action'

Specifies whether the Active Directory object registering the instance of SQL Server is to be created, updated, or deleted. action is nvarchar(20) with a default of N'create'.

Value Description
create Registers the instance of SQL Server in the Active Directory by creating an MS-SQL-SQLServer object in the directory. The MS-SQL-SQLServer object records the attributes of the instance of SQL Server at the time the create action is performed. If you specify create and the instance is already registered, an update action is performed.
update Refreshes the attributes registered for the current instance of SQL Server in the Active Directory. Updates the attributes recorded in the MS-SQL-SQLServer object in the Active Directory. If you specify update and the instance is not registered, a create action is performed.
delete Removes the Active Directory registration for the current instance of SQL Server. Deletes the MS-SQL_SQLServer object from the Active Directory. Also removes the registrations of any databases and publications in the instance.

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

After registering an instance of SQL Server in the Active Directory, you can use sp_ActiveDirectory_Obj to register any of the databases in the instance, and you can use sp_addpublication or sp_addmergepublication to register publications.

Permissions

Only members of the sysadmin fixed server role can execute sp_ActiveDirectory_SCP.

Examples

This example registers the current instance of SQL Server in the Active Directory.

DECLARE @RetCode INT

EXEC @RetCode = sp_ActiveDirectory_SCP @Action = N'create'

PRINT 'Return code = ' + CAST(@RetCode AS VARCHAR)

See Also

Active Directory Integration_active_directory_integration

Active Directory Services

sp_ActiveDirectory_Obj_sp_activedirectory_obj

sp_addmergepublication

sp_addpublication

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.