sp_serveroption System Stored Procedure

For SQL Server 6.5 information, see sp_serveroption in What's New for SQL Server 6.5.

Sets server options.

Syntax

sp_serveroption [server_name, optname, {true | false}]

where

server_name
Specifies the server for which you want to set the option.
optname
Is the type of server. Can be:
dist Distribution server
dpub Combination publisher/subscriber
pub Publication server
rpc Remote server
sub Subscription server

The default is rpc.

true | false
Specifies whether to set the option. Choose true if you want to set the option, false if you want to turn it off.

Remarks

To display a list of the server options, execute sp_serveroption with no parameters.

Examples

A.    List Options

This example lists the server options.

sp_serveroption
go

Settable server options.
server_option
--------------------------------
dist
dpub
pub
rpc
sub
B.    Set an Option

This example sets the server as a combination publisher/subscriber server.

sp_serveroption ACCOUNTS, dpub, TRUE

Permission

Only the system administrator can use sp_serveroption to set server options.

Tables Used

master.dbo.sp_values, master.dbo.sysserver

See Also

sp_addpublisher sp_helpserver
sp_droppublisher.