sp_dsninfo (version 6.5)

Retrieves ODBC data source name (DSN) information from the replication distribution server that is associated with the current server if replication is installed. Information retrieved is the database vendor name, the database version, the database name, and whether the database permits subscribers.

Syntax

sp_dsninfo dsn [, infotype ][, login ][, password ]

where

dsn
Is the name of the ODBC DSN.
infotype
Is the type of information to return. If an infotype is not specified or if NULL is specified, all information types are returned. The infotype can be one of these.
Infotype Description
DBMS_NAME Specifies the returned DSN database vendor name.
DBMS_VERSION Specifies the returned DSN database version.
DATABASE_NAME Specifies the returned DSN database name.
SQL_SUBSCRIBER Specifies the returned information about whether the database permits subscribers. Omitting this parameter or setting it to NULL returns rows for all infotype values.

login
Specifies the login for the DSN. If the DSN includes a login, specify NULL or omit the parameter.
password
Specifies the password for the login. If the DSN includes a login, specify NULL or omit the parameter.

Remarks

This stored procedure retrieves ODBC DSN information that shows what other databases can be used for replication or querying.

Example

This example returns all infotype data for the DSN northwind.

Note To receive the output shown, you must have Microsoft Access installed on your computer.

sp_dsninfo 'northwind'

Information Type      Value
--------------------- -----------------------------------
DBMS Name             ACCESS
DBMS Version          3.0
Database Name         D:\MSOFFICE\Access\Samples\Northwind
SQL Subscriber        TRUE