Undocumented SQL Server 2000 System Tables

syscursorcolumns


Contains the list of the a cursor’s columns. This table is stored in the master database. The syscursorcolumns table is used by the sp_describe_cursor_columns system stored procedure to report the attributes of the columns in the result set of a server cursor.
Column name Data type Description
cursor_handle int A unique value for the cursor within the scope of the server.
column_name sysname, nullable The column name. The column is NULL if the column was specified without an accompanying AS clause.
ordinal_position int Relative position of the column. The first column is in position 1. The value for any hidden columns is 0.
column_characteristics_flags int A bitmask indicating the information stored in DBCOLUMNFLAGS in OLE DB. Can be one of the following: 1 = Bookmark 2 = Fixed length 4 = Nullable 8 = Row versioning 16 = Updateable column (set for projected columns of a cursor that has no FOR UPDATE clause and, if there is such a column, can be only one per cursor).
column_size int Maximum possible size for a value in this column.
data_type_sql smallint Number indicating the SQL Server data type of the column.
column_precision tinyint Maximum precision of the column as per the bPrecision value in OLE DB.
column_scale tinyint Number of digits to the right of the decimal point for the numeric or decimal data types as per the bScale value in OLE DB.
order_position int If the column participates in the ordering of the result set, the position of the column in the order key relative to the leftmost column.
order_direction varchar(1), nullable A = The column is in the order key and the ordering is ascending. D = The column is in the order key and the ordering is descending. NULL = The column does not participate in ordering.
hidden_column smallint If a value of 0, this column appears in the select list. The value 1 is reserved for future use.
columnid int Column ID of the base column. If the result set column was built from an expression, columnid is -1.
objectid int Object ID of the base table supplying the column. If the result set column was built from an expression, objectid is -1.
dbid int ID of the database containing the base table supplying the column. If the result set column was built from an expression, dbid is -1.
dbname sysname, nullable Name of the database containing the base table supplying the column. If the result set column was built from an expression, dbname is NULL.

syscursorrefs


Contains one row for each server cursor. This table is stored in the master database and contains the cursor name, cursor scope (local or global) and cursor handler. The syscursorrefs table is used by the sp_describe_cursor, sp_describe_cursor_columns, sp_describe_cursor_tables and sp_cursor_list system stored procedures to get cursor name, cursor scope and cursor handler.
Column name Data type Description
reference_name sysname, nullable Name used to refer to the cursor.
cursor_scope tinyint 1 = LOCAL
2 = GLOBAL
cursor_handl int A unique value for the cursor within the scope of the server.
Continues…

Leave a Reply

Your email address will not be published. Required fields are marked *