sp_dsninfo (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sp_dsninfo (Transact-SQL)

 

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.

Topic link icon Transact-SQL Syntax Conventions

  
sp_dsninfo [ @dsn =] 'dsn'   
    [ , [ @infotype =] 'info_type']   
    [ , [ @login =] 'login']   
    [ , [ @password =] 'password']  
    [ , [ @dso_type=] dso_type]  

[ @dsn =] 'dsn'
Is the name of the ODBC DSN or OLE DB linked server. dsn is varchar(128), with no default.

[ @infotype =] 'info_type'
Is the type of information to return. If info_type is not specified or if NULL is specified, all information types are returned. info_type is varchar(128), with a default of NULL, and can be one of these values.

ValueDescription
DBMS_NAMESpecifies the data source vendor name.
DBMS_VERSIONSpecifies the data source version.
DATABASE_NAMESpecifies the database name.
SQL_SUBSCRIBERSpecifies the data source can be a Subscriber.

[ @login =] 'login'
Is the login for the data source. If the data source includes a login, specify NULL or omit the parameter. loginis varchar(128), with a default of NULL.

[ @password =] 'password'
Is the password for the login. If the data source includes a login, specify NULL or omit the parameter. passwordis varchar(128), with a default of NULL.

[ @dso_type=] dso_type
Is the data source type. dso_type is int, and can be one of these values.

ValueDescription
1 (default)ODBC data source
3OLE DB data source

0 (success) or 1 (failure)

Column nameData typeDescription
Information Typenvarchar(64)Information types such as DBMS_NAME, DBMS_VERSION, DATABASE_NAME, SQL_SUBSCRIBER.
Valuenvarchar(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 (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft