Returns a list of attribute names and matching values for SQL Server, the database gateway, and/or the underlying data source.
sp_server_info [@attribute_id = ] attribute_id]
where
The sp_server_info stored procedure is a subset of the information provided by SQLGetInfo in ODBC.
This is the results set:
Column | Datatype | Description |
---|---|---|
ATTRIBUTE_ID | int | NOT NULL |
ATTRIBUTE_NAME | varchar(60) | NOT NULL |
ATTRIBUTE_VALUE | varchar(255) |
These are the rows in this results set. Microsoft DB-Library and ODBC client libraries currently use attributes 1, 2, 18, 22, and 500 at connection time.
ATTRIBUTE_ID |
ATTRIBUTE_NAME Description |
ATTRIBUTE_VALUE |
---|---|---|
1 | DBMS_NAME Name of the DBMS accessed by the gateway. |
Microsoft SQL Server |
2 | DBMS_VER Version of the DBMS accessed by the gateway. |
@@version string |
10 | OWNER_TERM DBMS vendor's term for a table owner (the second part of a three-part name). |
Owner |
11 | TABLE_TERM DBMS vendor's term for a table (the second part of a three-part name). |
Table |
12 | MAX_OWNER_NAME_LENGTH Maximum length of the name for a table owner (the second part of a three-part name). |
30 |
16 | IDENTIFIER_CASE The case-sensitivity of user-defined names (table names, column names, stored procedure names) in the database (the case in which these objects are presented in the system catalogs). |
MIXED |
15 | COLUMN_LENGTH Maximum number of characters for a column name. |
30 |
13 | TABLE_LENGTH Maximum number of characters for a table name. |
30 |
100 | USERID_LENGTH Maximum number of characters for a username. |
30 |
17 | TX_ISOLATION Initial transaction isolation level the server assumes, corresponding to an isolation level defined in ANSI SQL-92. |
2 |
18 | COLLATION_SEQ Assumed ordering of the character set for this server. |
charset ID |
14 | MAX_QUAL_LENGTH Maximum length of the name for a table qualifier (the first part of a three-part table name). |
30 |
101 | QUALIFIER_TERM DBMS vendor's term for a table qualifier (the first part of a three-part name). |
Database |
19 | SAVEPOINT_SUPPORT Specifies whether the underlying DBMS supports named savepoints. |
Y |
20 | MULTI_RESULT_SETS Specifies whether the underlying database or the gateway itself supports multiple results sets (multiple statements can be sent through the gateway with multiple results sets returned to the client). |
Y |
102 | NAMED_TRANSACTIONS Specifies whether the underlying DBMS supports named transactions. |
Y |
103 | SPROC_AS_LANGUAGE Specifies whether stored procedures can be executed as language events. |
Y |
113 | REMOTE_SPROC Specifies whether stored procedures can be executed through the remote stored procedure functions in DB-Library. |
Y |
22 | ACCESSIBLE_TABLES Specifies whether in the sp_tables stored procedure, the gateway returns only tables, views, and so on that are accessible by the current user (that is, the user who has at least SELECT privileges for the table). |
Y |
104 | ACCESSIBLE_SPROC Specifies whether in the sp_stored_procedures stored procedure, the gateway returns only stored procedures that are executable by the current user. |
Y |
105 | MAX_INDEX_COLS Maximum number of columns in an index for the DBMS. |
16 |
106 | RENAME_TABLE Specifies whether tables can be renamed. |
Y |
107 | RENAME_COLUMN Specifies whether columns can be renamed. |
Y |
108 | DROP_COLUMN Specifies whether columns can be dropped. |
N |
109 | INCREASE_COLUMN_LENGTH Specifies whether column size can be increased. |
N |
110 | DDL_IN_TRANSACTION Specifies whether DDL statements can appear in transactions. |
N |
111 | DESCENDING_INDEXES Specifies whether descending indexes are supported. |
N |
112 | SP_RENAME Specifies whether a stored procedure can be renamed. |
Y |
500 | SYS_SPROC_VERSION The version of the catalog stored procedures currently implemented. |
Current version number |