Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

FairCom DB SQL Built-in Stored Procedures

A variety of built in procedures are available for administrative database tasks. These can be called in the same manner as user defined procedures:

call fc_get_fcproclist();

A result set, if returned, is handled in the standard caller manner.

These stored procedures are useful in iSQL and other SQL clients because they return valuable information about the FairCom SQL engine and perform operations that cannot be done with SQL statements.

Categorized list

Locks

fc_set_blockinglock controls when iSQL and other SQL clients block or return an error when they encounter a record with a read lock or a pending UPDATE or DELETE operation.

Databases

fc_add_db creates a new database. The JSON DB “createDatabase” action is more capable.

fc_get_dblist lists existing databases. The JSON DB “listDatabases” action is more capable.

Users

fc_set_impersonation uses the FairCom task ID to impersonate another SQL connection.

fc_get_taskid returns the FairCom task ID of the SQL connection.

fc_create_user creates a new user. The JSON Admin “createAccount” action is more capable.

fc_get_userlist lists existing users. The JSON Admin “listAccounts” action is more capable.

Tables

fc_set_file_tran_state removes or adds a table to the transaction logs.

fc_check_file_tran_state returns how a table uses the transaction logs.

fc_set_rowid_visible adds a table’s ROWID column (if it exists) to its list of columns.

fc_ptadmin_num purges, reuses, archives, activates, adds, or rebuilds a table partition.

fc_get_partbounds returns the first and last active partition numbers for a partitioned table.

fc_purge_db removes tables from the dictionary when they do not have a data file on disk.

fc_get_hosttablename returns the physical file name for a multi-record type (MRT) table.

SQL Debugging

fc_set_debug sets the debug level in the SQL log.

fc_set_nodename assigns a name to the connection for SQL logging.

Server settings

fc_get_server_version returns the current version of the FairCom server.

fc_set_sysconfig changes system settings dynamically.

fc_get_sysconfig returns system settings.

fc_set_min_card sets the minimum cardinality number for identity columns.

fc_get_min_card returns the minimum cardinality number for identity columns.

fc_set_priority sets the Windows OS priority of the FairCom server.

fc_get_priority returns the Windows OS priority of the FairCom server.

fc_set_selectivity sets the server selectivity.

fc_get_selectivity returns the server selectivity.

Server statistics

fc_get_sqlstats returns SQL performance statistics.

fc_get_transtats returns SQL transaction statistics.

fc_get_cachestats returns server cache statistics.

fc_get_iostats returns IO statistics.

fc_get_memstats returns memory statistics.

fc_get_connstats returns connected user counts.

fc_get_filestats returns open data file counts.

fc_get_isamstats returns ISAM engine statistics.

fc_get_lockstats returns lock statistics.

fc_get_replstats returns replication statistics.

Stored procedures

fc_get_fcproclist returns the list of built-in stored procedures.

Alphabetical list

In This Chapter

fc_add_db( )

fc_check_file_tran_state( )

fc_create_db( )

fc_create_user( )

fc_get_cachestats()

fc_get_connstats()

fc_get_dblist( )

fc_get_fcproclist( )

fc_get_filestats()

fc_get_hosttablename()

fc_get_iostats()

fc_get_isamstats()

fc_get_lockstats()

fc_get_memstats()

fc_get_min_card( )

fc_get_priority( )

fc_get_partbounds()

fc_get_replstats()

fc_get_selectivity( )

fc_get_server_version( )

fc_get_sqlstats()

fc_get_sysconfig()

fc_get_taskid( )

fc_get_transtats()

fc_get_userlist( )

fc_ptadmin_num()

fc_purge_db()

fc_set_blockinglock( )

fc_set_debug( )

fc_set_file_tran_state( )

fc_set_impersonation( )

fc_set_min_card( )

fc_set_nodename( )

fc_set_priority( )

fc_set_rowid_visible()

fc_set_selectivity( )

fc_set_sysconfig()

TOCIndex