Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » System procedures » Alphabetical list of system procedures

sa_db_properties system procedure

Reports database property information.

Syntax
sa_db_properties( [ dbidparm ] )
Parameters
  • dbidparm

    Use this optional INTEGER parameter to specify the database ID number. The default is NULL.

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

You must have EXECUTE privilege on the system procedure.

To execute this system procedure for other databases, you must also 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 );