Setting Database Properties Using the Services API

From InterBase

Go Up to Invoking Service Tasks with isc_service_start( )


You can configure the properties of local or remote databases using the cluster identifier isc_action_svc_properties. This functionality corresponds to several of the options of the gfix command-line utility.

The following table lists arguments to isc_action_svc_properties:

Services API database properties arguments
Argument Purpose Argument length Argument value

isc_spb_dbname

Path of the primary file of the database, from the server’s point of view

2 bytes + string

String

isc_spb_prp_page_buffers

Set the default number of cache buffers to the specified number; corresponds to gfix -buffers

4 bytes

Unsigned long

isc_spb_prp_set_sql_dialect

Set the SQL dialect in the database header page to the specified number (1 or 3)

4 bytes

Unsigned long

isc_spb_prp_sweep_interval

Set the sweep interval to the specified number; specify zero to disable sweeping; corresponds to gfix -housekeeping

4 bytes

Unsigned long

isc_spb_prp_shutdown_db

Shuts down the database when:

  • There are no connections to the database, or
  • At the end of the timeout period you specify

Corresponds to gfix -shut -force n

4 bytes

Unsigned long

isc_spb_prp_deny_new_transactions

Shuts down the database if there are no active transactions at the end of the timeout period you specify; deny new transactions during this timeout period; fail if there are active transactions at the end of the timeout period; corresponds to gfix -shut -tran n

4 bytes

Unsigned long

isc_spb_prp_deny_new_attachments

Shuts down the database if there are no active transactions at the end of the timeout period you specify; deny new database attachments during this timeout period; fail if there are active database attachments at the end of the timeout period; corresponds to gfix -shut -attach n

4 bytes

Unsigned long

isc_spb_prp_reserve_space

Configure the database to fill data pages when inserting new records, or reserve space on each page for later record deltas; the next byte must be one of:

  • isc_spb_prp_res_use_full
  • isc_spb_prp_res

Corresponds to gfix -use

1 byte

Byte

isc_spb_prp_write_mode

Set the write mode for the database; the next byte must be one of:

  • isc_spb_prp_wm_async
  • isc_spb_prp_wm_sync
  • isc_spb_prp_wm_direct

Corresponds to gfix -write

1 byte

Byte

isc_spb_prp_access_mode

Set the access mode of the database; the next byte must be one of:

  • isc_spb_prp_am_readonly
  • isc_spb_prp_am_readwrite

Corresponds to gfix -mode

1 byte

Byte

isc_spb_prp_set_sql_dialect

Set the SQL dialect for the database; value must be either 1 or 3

4 bytes

Unsigned long

isc_spb_options

The following value is a bitmask of isc_spb_prp_xxxx options below

4 bytes

Bitmask

isc_spb_prp_activate

Activate shadow file for use as a database; corresponds to gfix -activate

Bit

isc_spb_prp_db_online

Bring a shutdown database back online; corresponds to gfix -online

Bit

Advance To: