Returns ODBC or OLE DB data source information from the Distributor associated with the current server.
sp_dsninfo [@dsn =] 'dsn'
[, [@infotype =] 'info_type']
[, [@login =] 'login']
[, [@password =] 'password']
[, [@dso_type =] dso_type]
Value | Description |
---|---|
DBMS_NAME | Specifies the data source vendor name. |
DBMS_VERSION | Specifies the data source version. |
DATABASE_NAME | Specifies the database name. |
SQL_SUBSCRIBER | Specifies the data source can be a Subscriber. |
Value | Description |
---|---|
1 (default) | ODBC data source |
3 | OLE DB data source |
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
Information Type | nvarchar(64) | Information types such as DBMS_NAME, DBMS_VERSION, DATABASE_NAME, SQL_SUBSCRIBER. |
Value | nvarchar(512) | Value of the associated information type. |
sp_dsninfo is used in all types of replication.
sp_dsninfo retrieves ODBC or OLE DB data source information that shows whether the database can be used for replication or querying.
Only members of the sysadmin fixed server role can execute sp_dsninfo.
sp_enumdsn | System Stored Procedures |