Database Characteristics (API Guide)

From InterBase

Go Up to Request Buffer Items and Result Buffer Values (API Guide)


Several items are available for determining database characteristics, such as its size and major and minor ODS version numbers. The following table lists the request buffer items that can be passed, and the information returned in the result buffer for each item type

Database Information Items for Database Characteristics
Request buffer item Result buffer contents

allocation

Number of database pages allocated

base_level

Database version (level) number:

  • 1 byte containing the number 1
  • 1 byte containing the version number

db_id

  • Database file name and site name:
  • 1 byte containing the number 2 for a local connection or 4 for a remote connection
  • 1 byte containing the length, d, of the database file name in bytes
  • A string of d bytes, containing the database file name
  • 1 byte containing the length, l, of the site name in bytes
  • A string of l bytes, containing the site name

implementation

Database implementation number:

  • 1 byte containing a 1
  • 1 byte containing the implementation number
  • 1 byte containing a “class” number, either 1 or 12

no_reserve

0 or 1

  • 0 indicates space is reserved on each database page for holding backup versions of modified records [Default]
  • 1 indicates no space is reserved for such records

ods_minor_version

On-disk structure (ODS) minor version number; an increase in a minor version number indicates a non-structural change, which does not affect database access

ods_version

  • ODS major version number

page_size

Number of bytes per page of the attached database; use with isc_info_allocation to determine the size of the ­database

sql_dialect

The SQL dialect supported by the database software

version

Version identification string of the database ­implementation:

  • 1 byte containing the number 1
  • 1 byte specifying the length, n, of the following string
  • <n> bytes containing the version identification string

The version string is for display only. Use the base level or version to identify versions functionally.

Advance To: