Contents Index DB_NAME function [System] DB_PROPERTY function [System]

ASA SQL Reference
  SQL Functions
    Alphabetical list of functions

DB_EXTENDED_PROPERTY function [System]


Function 

Returns the value of the given property. Allows an optional property-specific string parameter to be specified.

Syntax 

DB_EXTENDED_PROPERTY (
{  property_id  |  property_name  },
[, property-specific_argument
[, { database_id | database_name  } ] ])

Parameters 

property_id    The database property ID.

property_name    The database property name.

database_id    The database ID number, as returned by DB_ID. Typically, the database name is used.

database_name    The name of the database, as returned by DB_NAME.

property_specific_argument    The optional property-specific string parameter associated with FileSize and FreePages properties. If you provide a property specific argument for a property that does not require one (for example, any property other than FileSize or FreePages), the item is ignored. For a list of properties, see Database-level properties.

Usage 

Returns a string. The current database is used if the second argument is omitted.

Db_extended_property() is similar to db_property() except that it allows an optional property-specific string parameter to be specified. The interpretation of the property-specific argument depends on the property id or name specified in the first argument. Calling db_extended_property( x ) is equivalent to calling db_property( x ).

Standards and compatibility 
See also 

DB_ID function [System]

DB_NAME function [System]

Database-level properties

Example 

The following statement returns the file size of the system dbspace, in pages.

SELECT DB_EXTENDED_PROPERTY( 'FileSize' )

The following statement returns the file size of the transaction log, in pages.

SELECT DB_EXTENDED_PROPERTY( 'FileSize', 'translog')

Contents Index DB_NAME function [System] DB_PROPERTY function [System]