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.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist