Returns information about database connections.
sp_helpconn [conn_name]
is the name of a database connection. Connection names must be specified in the form ds.db, where:
ds is the name of the data server on which the database resides.
db is the name of the database.
sp_helpconn "boulder.doc"
Returns information about any primary and replicate database connections for the database doc on the data server boulder.
When listing information about connections, the following result set is returned:
Column |
Datatype |
Description |
---|---|---|
conn_type |
varchar(3) |
Type of connection:
|
ds |
sysname |
If conn_type is PRI, then ds is the name of the local primary data server. If conn_type is REP, then ds is the name of the replicate data server. |
db |
sysname |
If conn_type is PRI, then db is the name of the local primary database. If conn_type is REP, then db is the name of the replicate database. |
maint_user |
sysname |
Maintenance User name in the database identified in db. |
lastcmt_proxy |
sysname |
Lastcommit proxy table name. |
restart_locator |
varchar(64) |
If conn_type is PRI, then restart_locator identifies the restart position in the database log. If conn_type is REP, then restart_locator identifies the restart position in the stable queue. |
timestamp |
datetime |
Timestamp of the restart locator. |
status |
smallint |
Status of the connection:
|
status_desc |
varchar(255) |
Description of the connection status. |
When sp_helpconn is invoked with no keyword, it returns information about all primary and replicate connections.
When an error occurs, an error message is returned.
sp_helpprimaryconn, sp_helpreplicateconn