sa_db_properties system procedure

Reports database property information.

Syntax

sa_db_properties( [ dbidparm ] )

Arguments

Result set

Column name Data type Description
Number INTEGER The database ID number.
PropNum INTEGER The database property number.
PropName VARCHAR(255) The database property name.
PropDescription VARCHAR(255) The database property description.
Value LONG VARCHAR The database property value.

Remarks

If you specify a database ID, the sa_db_properties system procedure returns the database ID number and the PropNum, PropName, PropDescription, and Value for each available database property. Values are returned for all database properties and statistics related to databases. Valid properties with NULL values are also returned.

If dbidparm is greater than zero, then database properties for the supplied database are returned. If dbidparm is less than zero, then database properties for the current database are returned. If dbidparm is not supplied or is NULL, then database properties for all databases running on the database server are returned.

Privileges

No privileges are required to execute this system procedure for the current database. To execute this system procedure for other databases, you must have either the SERVER OPERATOR or MONITOR system privilege.

Side effects

None

Example

The following example uses the sa_db_properties system procedure to return a result set summarizing database properties for all databases when the invoker has SERVER OPERATOR or MONITOR system privilege. Otherwise, database properties for the current database are returned.

CALL sa_db_properties( );
Number PropNum PropName ...
0 0 ConnCount ...
0 1 IdleCheck ...
0 2 IdleWrite ...
... ... ... ...

The following example uses the sa_db_properties system procedure to return a result set summarizing database properties for a second database.

CALL sa_db_properties( 1 );