Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Returns ODBC or OLE DB data source information from the Distributor associated with the current server. This stored procedure is executed at the Distributor on any database.
Transact-SQL syntax conventions
sp_dsninfo
[ @dsn = ] 'dsn'
[ , [ @infotype = ] 'infotype' ]
[ , [ @login = ] 'login' ]
[ , [ @password = ] 'password' ]
[ , [ @dso_type = ] dso_type ]
[ ; ]
The name of the ODBC DSN or OLE DB linked server. @dsn is varchar(128), with no default.
The type of information to return. If @infotype isn't specified or if NULL
is specified, all information types are returned. @infotype is varchar(128), and can be one of these values.
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. |
The login for the data source. If the data source includes a login, specify NULL
or omit the parameter. @login is varchar(128), with a default of NULL
.
The password for the login. If the data source includes a login, specify NULL
or omit the parameter. @password is varchar(128), with a default of NULL
.
The data source type. @dso_type is int, and can be one of these values.
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
.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today