Skip to content

16.3.2 Virtual Table Dictionary

Virtual tables (dynamic views) use the V$ prefix and expose current Machbase server status as tables. They are read-only and return the latest state on each query.

Virtual Tables

CategoryTableDescription
Session/SystemV$VERSIONServer version information
Session/SystemV$SESSIONConnected sessions
DatabaseV$DATABASESActive/mounted database status
DatabaseV$DATABASE_OPERATIONSDatabase lifecycle operation history
Session/SystemV$STMTRunning SQL statements
Session/SystemV$PROPERTYCurrent server settings
Session/SystemV$SYSMEMSystem memory usage
Session/SystemV$SYSSTATSystem statistics
Session/SystemV$SYSTIMESystem time statistics
StorageV$STORAGEStorage file size summary
StorageV$STORAGE_USAGEDisk usage and usage limit ratio
StorageV$STORAGE_TABLESStorage usage per table
StorageV$STORAGE_MOUNT_DATABASESMounted backup databases
Tag RollupV$ROLLUPRollup job status
TAG TableV$<TABLE>_STATPer-table tag and axis statistics. The actual name is generated from the TAG table name
LicenseV$LICENSE_INFOLicense information
LockingV$MUTEXLock status

V$<TABLE>_STAT is generated dynamically for each TAG table and is separate from the fixed list of global virtual tables. For column names and types by time and distance axis, see Per-tag Statistics Views.

V$VERSION

Returns server version information.

ColumnDescription
BINARY_SIGNATUREServer version string
SELECT binary_signature FROM v$version;

V$DATABASES

Returns the status of logical and mounted databases. DATABASE_ID identifies a logical catalog and differs from TABLESPACE_ID.

ColumnDescription
DATABASE_IDLogical database identifier
SOURCE_DATABASE_IDSource database identifier of a mounted backup
NAMEDatabase name or mount alias
KINDACTIVE or MOUNTED
ACCESS_MODEREAD_WRITE or READ_ONLY
CAN_USEWhether the database can be selected with USE
STATELifecycle state
IS_DEFAULTWhether this is the default MACHBASEDB
SELECT database_id, name, kind, access_mode, can_use, state, is_default
  FROM v$databases
 ORDER BY database_id;

V$DATABASE_OPERATIONS

Returns status and errors for CREATE, ALTER, DROP, BACKUP, RESTORE, MOUNT, and UMOUNT operations. For FAILED_NEEDS_ACTION, also inspect the actual V$DATABASES state and server log.

ColumnDescription
OPERATION_IDOperation identifier
DATABASE_IDTarget logical database identifier
DATABASE_NAMETarget database name
STATEOperation state
LAST_ERRORFailure cause
CREATED_ATCreation timestamp
UPDATED_ATLast update timestamp
SELECT operation_id, database_name, state, last_error
  FROM v$database_operations
 ORDER BY operation_id DESC;

V$SESSION

Lists connected sessions and their status.

ColumnDescription
IDSession identifier
CLOSEDWhether the connection is closed (0: active)
USER_IDUser identifier
LOGIN_TIMEConnection timestamp
CLIENT_TYPEConnected client type
USER_NAMEUsername
USER_IPUser IP address
SQL_LOGGINGWhether trace logging is enabled for the session
IDLE_TIMEOUTIdle session termination timeout in seconds
QUERY_TIMEOUTQuery response timeout
-- List currently active sessions
SELECT id, user_name, user_ip, client_type, login_time
  FROM v$session
 WHERE closed = 0
 ORDER BY login_time;

V$STMT

Displays information about SQL statements that are running or waiting.

ColumnDescription
IDQuery identifier
SESS_IDIdentifier of the session executing the query
STATEQuery state
RECORD_SIZESELECT result record size
QUERYQuery text
-- Check running queries
SELECT id, sess_id, state, query
  FROM v$stmt
 WHERE state LIKE 'Execute in progress%'
    OR state LIKE 'Fetch in progress%'
    OR state LIKE 'Append in progress%';

V$PROPERTY

Returns all server property values.

ColumnDescription
NAMEProperty name
VALUECurrent value
TYPEData type
DEFLTDefault value
MINMinimum value
MAXMaximum value
-- Check specific settings
SELECT name, value, deflt
  FROM v$property
 WHERE name IN ('PORT_NO', 'TRACE_LOG_LEVEL', 'MAX_SESSION_COUNT');

-- Query settings that differ from defaults
SELECT name, value, deflt
  FROM v$property
 WHERE value != deflt
 ORDER BY name;

V$STORAGE_USAGE

Displays storage system disk usage.

ColumnDescription
TOTAL_SPACETotal capacity of the storage containing the data directory
USED_SPACEUsed capacity
USED_RATIOUsage ratio (%)
RATIO_CAPUsage limit (ingestion stops when exceeded)
SELECT total_space, used_space, used_ratio, ratio_cap
  FROM v$storage_usage;

V$SYSMEM

Returns system memory usage.

ColumnDescription
IDMemory manager identifier
NAMEMemory manager name
USAGECurrent usage
MAX_USAGERecorded peak usage
SELECT name, usage, max_usage
  FROM v$sysmem
 ORDER BY usage DESC;

V$LICENSE_INFO

Returns server license information.

ColumnDescription
IDLicense ID
ISSUE_DATEIssue date
TYPELicense type
CUSTOMERCustomer name
PROJECTProject name
INSTALL_DATEInstallation date
VIOLATE_STATUSLicense violation status
VIOLATE_MSGLicense violation message
SELECT id, type, customer, issue_date,
       install_date, violate_status, violate_msg
  FROM v$license_info;

Listing All Virtual Tables

-- List all V$ virtual tables available on the current server
SELECT name
  FROM v$tables
 WHERE name LIKE 'V$%'
 ORDER BY name;

Virtual tables are read-only. Tables available only in Cluster Edition, such as V$NODE_STATUS and V$REPLICATION, cannot be queried in Standard Edition.

Last updated on