devxlogo

Set SQL Server as a DSN Server Using the Stored Procedure sp_serveroption

Set SQL Server as a DSN Server Using the Stored Procedure sp_serveroption

A Data Source Name (DSN) server is one that receives replication data through ODBC. This DSN can be accessed only through Microsoft SQL Server because replication is being used. The DSN has information about the database vendor name, the database version, the database name, and whether the database permits subscribers. You can set SQL Server as a DSN server using the stored procedure sp_serveroption:

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

where optname is the type of server and can be one of these:

 dist		Distribution serverdpub		Remote publisher to this distribution server.dsn		DSN serverfallback	Fallback serverpub		Publication serverrpc		Remote server ( Default)sub		Subscription server

For example, this code sets MyServer server as a DSN server:

 sp_serveroption MyServer, dsn, true

Note that only the system administrator has permission to use this procedure to set server options.

devx-admin

Share the Post: