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_info system procedure

Reports database property information.

sa_db_info( [ dbidparm ] )
  • dbidparm

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

Result set
Column name Data type Description

Returns the connection ID (a number) for the current connection.

Alias VARCHAR(255)

Returns the database name.

File VARCHAR(255)

Returns the file name of the database root file, including path.


Returns the number of connections to the database. The property value does not include connections used for internal operations, but it does include connections used for events and external environment support.


Returns the page size of the database, in bytes.

LogName VARCHAR(255)

Returns the file name of the transaction log, including path.


If you specify a database ID, sa_db_info returns a single row containing the Number, Alias, File, ConnCount, PageSize, and LogName for the specified database.

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


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



The following statement returns a row for each database that is running on the server:

CALL sa_db_info( );