sa_db_info system procedure

Reports database property information.

Syntax

sa_db_info( [ dbidparm ] )

Arguments

Result set

Column name Data type Description
Number INTEGER

Returns the ID number of the connection.

Alias VARCHAR(255)

Returns the database name.

File VARCHAR(255)

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

ConnCount INTEGER

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.

PageSize INTEGER

Returns the page size of the database, in bytes.

LogName VARCHAR(255)

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

Remarks

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 not supplied, properties for all databases are returned.

Because of tenant database isolation rules, when this system procedure is run in the cloud it returns only information about the current tenant database.

Permissions

None

Side effects

None

Example

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

CALL sa_db_info( );
Property Value
Number 0
Alias demo
File
ConnCount 1
PageSize 4096
LogName

C:\Documents and Settings\All Users\Program Data\SybaseIQ\demo\iqdemo.log