Note: Documentation for Pivotal SQLFire 1.1.x is now available at http://docs.gopivotal.com/sqlfire/index.html. Please reference the docs.gopivotal.com site for the latest and most up-to-date documentation on SQLFire. The vFabric SQLFire documentation site will no longer be updated.

Using Trace Flags for Advanced Debugging

SQLFire provides debug trace flags to record additional information about SQLFire features in the log file.

SQLFire provides these trace flags that you can use with the sqlfire.debug.true system property to log additional details about SQLFire behavior:
Trace flag Enables
QueryDistribution Detailed logging for distributed queries and DML statements, including information about message distribution to SQLFire members and scan types that were opened.
StatementMatching Logging for optimizations that are related to unprepared statements.
TraceAuthentication Additional logging for SQLFire authentication.
TraceDBSynchronizer DBSynchronizer and WAN distribution logging.
TraceClientConn Client-side connection open and close stack traces.
TraceClientStatement Client-side, basic timing logging.
TraceClientStatementMillis Client-side wall clock timing.
TraceIndex Detailed index logging.
TraceJars Logging for JAR installation, replace, and remove events.
TraceTran Detailed logging for transaction events and operations, including commit and rollback.
TraceLock_* Locking and unlocking information for all internal locks.
TraceLock_DD Logging for all DataDictionary and table locks that are acquired or released.
If you are asked to set a trace flag in a SQLFire member for debugging purposes, do so using the sqlfire.debug.true system property when you start a server or locator. For example, this command sets both the QueryDistribution and TraceIndex flags:
sqlf server start -J-Dsqlfire.debug.true=QueryDistribution,TraceIndex
For applications that use the JDBC peer driver, set trace-related flags in the sqlfire.debug.true system property before the application connects to the SQLFire cluster. For example, this code sets traces for index and query distribution and then connects using the peer driver:
Properties props = new Properties();
props.put("sqlfire.debug.true", "TraceIndex,QueryDistribution");
System.setProperties(props);
Java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:sqlfire:");

Client-side trace flags write additional information to the client log file, which is configured using the sqlfire.client.log-file property.

If you need to set a trace flag in a running system, use the SYS.SET_TRACE_FLAG system procedure. The procedure sets the trace flag in all members of the distributed system, including locators. You must execute the procedure as a system user. For example:
sqlf> call sys.set_trace_flag('traceindex', 'true');
Statement executed.