DBAppender<SQL_LOG>:Append.
See
the Server Logging Configuration topic for more information about the logging facility for SAS Federation Server.
/etc
directory
of the server’s configuration path. Using dfs_log_SQL_Logging.xml,
you can set the level of information that each logger captures by
specifying a logging level of WARN or TRACE. You can also change logging
levels dynamically without stopping the server.
<logger name="Perf.ARM.FederationServer" additivity="false"> <level value="TRACE"/> <appender-ref ref="ARM"/> </logger> <logger name="Perf.ARM.SQLServices" additivity="false"> <level value="TRACE"/> <appender-ref ref="ARM"/> </logger>
/etc
directory
of the server’s configuration path.
value="X{App.Name}"
. When a SAS Federation Server connection string has been configured with a particular client name, you can define the name in SQL
Logging by modifying the following value in dfs_log_SQL_Logging.xml:<param name="column" value="X{App.Name}" />
and
replacing App.Name with Client.AppName:<param name="column" value="X{Client.AppName}" />
See Federation Server (FEDSVR) Driver Reference for information about the APPLICATION NAME connection string
option.
/etc
directory
of the Federation Server installation path. After setting up your database and specifying
the domain, configure
a connection to the driver, and modify the data types to suit your environment as outlined below.
ALTER DATA SERVICE SQL_LOG domain ORA1
param name="connectionString" value="CATALOG=*;DEFAULT_CATALOG=catalog_name;DRIVER=driver; CONOPTS=(DSN={yourdsn};UID='your user id';PWD='your password')"For a list of possible connection options see the Database Functionality and Driver Performance in this guide.
'IN <name
of your table space>'
to reflect the name of
the tablespace for your setup.CREATE TABLE &DFS_DBAPPENDER_TABLE;
(ARM_NAMESPACE VARCHAR(256),
TRAN_TIMESTAMP TIMESTAMP,
APP_HANDLE VARCHAR(36),
APP_ID VARCHAR(36),
APP_NAME VARCHAR(50),...
) IN <name of your table space>"/>
/etc
directory
of the Federation Server installation path.
Name
|
Type
|
Associated Namespace
|
---|---|---|
SESSION
|
Session transaction
|
Perf.ARM.FederationServer.Session.Transaction.SESSION
This is a session transaction.
A session transaction starts when a user initiates a server session.
|
DBC
|
Database connection
|
Perf.ARM.SQLServices.Connection.Transaction.DBC
This is a database connection.
A database connection transaction is a child object of the SESSION
transaction. A database connection begins when a user connects to
a data source and ends when the user disconnects from the data source.
|
DBTRAN
|
Database transaction
|
Perf.ARM.SQLServices.Connection.Transaction.DBTRAN
This is an RDBMS transaction. DBTRAN is the actual database transaction. It is a child
object of the DBC transaction. A DBTRAN transaction begins with an established driver
connection, or when a previous transaction is committed or rolled back, such that
a new one begins. DBTRAN records are written to the log only if AUTOCOMMIT is set
to OFF. The DBTRAN transaction stops when AUTOCOMMIT is set to ON or when a COMMIT
or ROLLBACK command is issued. SQL statements can span DBTRAN transaction boundaries.
|
SQL
|
SQL statement
|
Perf.ARM.SQLServices.Statement.Transaction.SQL
This is an SQL Statement. SQL is a logical transaction. It encapsulates a series of
activities related
to one SQL statement. It is a child object of a DBC transaction. An SQL transaction
starts when a user issues an SQL statement. Regardless of the statement type (DQL, DML, or DDL) the SQL transaction stops when the statement is either closed,
or the call to Prepare ends. Subsequent executions of the same statement are recorded
under the same SQL transaction, even if the statement is a DQL and the result set associated with it has been is closed.
|
Prepare
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.Prepare
The prepare transaction measures the Prepare phase of an SQL statement. It is a child
object of an SQL transaction. The Prepare transaction starts
when a user Prepares an SQL statement and stops when the call to prepare returns.
|
Execute
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.Execute
The execute transaction measures the Execute phase of an SQL statement. It is a child
object of the SQL transaction. The EXEC transaction starts
when a user executes an SQL statement and stops when the call to execute returns.
|
CURSOR
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.Transaction.CURSOR
CURSOR is a logical transaction. CURSOR is a child object of an SQL transaction and
it encapsulates all operations executed in a cursor, including reading,
positioning and updates. The CURSOR transaction starts when the Execute transaction
finishes. It stops when the cursor is closed. All operations on the same result set
belong to the same CURSOR transaction.
|
Fetch
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.Fetch
The FETCH transaction is a child object of the CURSOR transaction. The FETCH transaction
has an Execute transaction as its predecessor. It is started when a user issues the
first fetch on a result set using Fetch or Fetch Scroll. It stops when the call to
Fetch or Fetch Scroll returns.
|
Fetch Scroll
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.FetchScroll
See Fetch.
|
SetPos
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.SetPos
The SetPos transaction
is a child object to a CURSOR transaction. The SetPos transaction
has an execute transaction as its predecessor. It is started when
a user issues a SetPos call and stops when the call returns.
|
BulkOps
|
SQL Statement
|
Perf.ARM.SQLServices.Statement.BulkOperations
The BulkOperations transaction
is a child object of a CURSOR transaction. The BulkOperations transaction
has an Execute transaction as its predecessor. It is started when
a user issues a call to BulkOperations and stops when the call returns.
|
SELECT COUNT(*) FROM EVENTS
CREATE TABLE <archive_catalog>.<archive_schema>.<archive_table> AS SELECT * FROM SQL_LOG.SQL_LOG.EVENTS WHERE <where_condition>
WHERE TRAN_TIMESTAMP > TIMESTAMP '2012-01-25 01:00:00'
INSERT INTO <archive_catalog>.<archive_schema>.<archive_table> SELECT * FROM SQL_LOG.SQL_LOG.EVENTS WHERE <where_condition>
DELETE FROM SQL_LOG.SQL_LOG.EVENTS WHERE TRAN_TIMESTAMP < TIMESTAMP ‘2011-04-11 12:00:00’
Column
|
Data Type
|
Description
|
---|---|---|
APP_HANDLE
|
VARCHAR(36)
|
A unique ID that is
associated with an application instance.
|
APP_ID
|
VARCHAR(36)
|
The application ID.
|
APP_NAME
|
VARCHAR(50)
|
The name of the logical
server registered in SAS Metadata Server.
|
ARM_NAMESPACE
|
VARCHAR(256)
|
The logger name (namespace)
of the logging event.
|
AUTHORIZATION_ID
|
VARCHAR(128)
|
UUID for the authenticated
user.
|
AUTHORIZATION_NAME
|
VARCHAR(128)
|
The user name from SAS
Metadata Server.
|
BYTES_FETCHED
|
BIGINT
|
The size of data read
in bytes.
|
BYTES_INSERTED
|
BIGINT
|
The size of data inserted
in bytes.
|
CACHE_VIEW_CATALOG
|
VARCHAR(256)
|
The cache view catalog
name.
|
CACHE_VIEW_NAME
|
VARCHAR(256)
|
The cache view name.
|
CACHE_VIEW_SCHEMA
|
VARCHAR(256)
|
The cache view schema
name.
|
CATALOG_NAME
|
VARCHAR(256)
|
The catalog name.
|
CLIENT_CORRELATOR
|
VARCHAR(56)
|
The transaction’s
client correlator (base64 encoded).
|
CONNECTION_DRIVER
|
VARCHAR(25)
|
The driver that was used for the connection (for example, FEDSQL, ORACLE, TERADATA,
ODBC, MYSQL,
DB2, and others).
|
CONNECTION_NAME
|
VARCHAR(256)
|
The expanded connection string.
|
CONNECTION_TRAN_HANDLE
|
VARCHAR(36)
|
The DBC transaction
under which the current transaction is assigned to.
|
CURR_SAS_TIMEOFDAY
|
DOUBLE PRECISION
|
The current time-of-day for the ARM event.
|
CURR_SYSTEM_CPU_TIME
|
DOUBLE PRECISION
|
The process current system CPU time for the ARM event.
|
CURR_USER_CPU_TIME
|
DOUBLE PRECISION
|
The process current user CPU time for the ARM event.
|
CURRENT_CORRELATOR
|
VARCHAR(56)
|
The transaction’s
correlator (base64 encoded).
|
CURSOR_TRAN_HANDLE
|
VARCHAR(36)
|
The CURSOR transaction
under which the current transaction is assigned to.
|
DBTRAN_STATE
|
VARCHAR(15)
|
The state of the current
transaction, such as OPEN, CLOSED.COMMIT, CLOSED.ROLLBACK.
|
DBTRAN_TRAN_HANDLE
|
VARCHAR(36)
|
The UUID that points to the driver’s DBTRAN transaction handle, which is not its
parent (the CONNECTION handle is
parent) since the SQL can span multiple DBMS transactions.
|
EVENT_SEQUENCE
|
BIGINT
|
A unique value associated with the ARM record. Values increase for each record, usually
with an increment of 1 (database-specific).
|
EXEC_PARAM_DATA
|
VARCHAR(1024)
|
The XML format for encoding
parameter array data.
|
GROUP_NAME
|
VARCHAR(128)
|
The group name of the
application instances.
|
IO_COUNT
|
BIGINT
|
The total number of
process disk, tape, or related input and output operations for the
transaction event.
|
IP_ADDRESS
|
VARCHAR(48)
|
The IP address of the
client.
|
LOGIN_ID
|
VARCHAR(128)
|
The current user ID
that is associated with the transaction.
|
MEM_CURRENT
|
BIGINT
|
The current process
memory utilization for the transaction event.
|
MEM_HIGH
|
BIGINT
|
The highest amount of
process memory used for the transaction event.
|
OBJECT_NAME
|
VARCHAR(256)
|
The object name used in the SQL statement.
|
OBJECT_TYPE
|
VARCHAR(60)
|
The type of object that was accessed.
|
PARENT_CORRELATOR
|
VARCHAR(56)
|
The transaction’s
parent correlator (base64 encoded).
|
PREDECESSOR_TRAN_HANDLE
|
VARCHAR(36)
|
The driver’s Execute transaction handle. This ties the Fetch transaction to an execution
and
its metrics.
|
ROWS_DELETED
|
BIGINT
|
The number of rows deleted.
|
ROWS_FETCHED
|
BIGINT
|
The number or rows read.
|
ROWS_INSERTED
|
BIGINT
|
The number of rows inserted.
|
ROWS_UPDATED
|
BIGINT
|
The number of rows updated.
|
SCHEMA_NAME
|
VARCHAR(256)
|
The name of the schema
being accessed.
|
SERVER_MESSAGE
|
VARCHAR(500)
|
The message associated
with the event.
|
SESSION_TRAN_HANDLE
|
VARCHAR(36)
|
The SESSION transaction
that the current transaction is assigned to.
|
SOURCE_FILE_NAME
|
VARCHAR(128)
|
The filename where the
logging request was issued.
|
SQL_DIALECT
|
VARCHAR(15)
|
The dialect that is
being used: FEDSQL or NATIVE.
|
SQL_TRAN_HANDLE
|
VARCHAR(36)
|
The SQL transaction that the current transaction is assigned to.
|
STATEMENT_ID
|
BIGINT
|
The SQL statement hash. The value derived from the SQL statement content.
|
STATEMENT_NAME
|
VARCHAR(256)
|
The SQL statement name.
|
STATEMENT_PLAN
|
VARCHAR(15000)
|
Column valued for SQL statement types only.
Note: The plan value can truncate
if the character limit is exceeded. For example, Oracle has a VARCHAR
limit of 4000 while SQL Server is 8000.
|
STATEMENT_STATE
|
VARCHAR(15)
|
The state of the SQL statement, such as S0, S1 and S2.
|
STATEMENT_TEXT
|
VARCHAR(15000)
|
The text of the SQL statement.
Note: The plan value can truncate
if the character limit is exceeded. For example, the VARCHAR limit
for Oracle is 4000 while SQL Server is 8000.
|
STATEMENT_TYPE
|
VARCHAR(15)
|
The type of SQL statement, such as DQL, DQL.Metadata (catalog methods), DML, or DDL.
Empty if unknown.
|
THREAD_CURRENT
|
BIGINT
|
The current process thread count for the transaction event.
|
THREAD_HIGH
|
BIGINT
|
The process highest thread count for the transaction event.
|
TRAN_CLASS_ID
|
VARCHAR(36)
|
The UUID of transaction
class.
|
TRAN_HANDLE
|
VARCHAR(36)
|
The UUID of transaction
instance.
|
TRAN_NAME
|
VARCHAR(50)
|
SESSION, DBC, DBTRAN, SQL, Execute, Fetch, CURSOR. For additional information see
—ARM Transactions .
|
TRAN_START_SAS_TIMEOFDAY
|
DOUBLE PRECISION
|
The time-of-day value
for the current transaction start event.
|
TRAN_STATE
|
VARCHAR(15)
|
The state of the transaction:
START, STOP, UPDATE, BLOCK, UNBLOCK, DISCARD.
|
TRAN_STATUS
|
VARCHAR(15)
|
The transaction status:
UNKNOWN, ABORTED, GOOD, FAILED, STOP.
|
TRAN_STOP_SAS_TIMEOFDAY
|
DOUBLE PRECISION
|
The time-of-day value
for the current transaction stop event.
|
TRAN_TIMESTAMP
|
TIMESTAMP
|
The current timestamp
of the transaction.
|
TRANRESP_SYS_CPU_TIME
|
DOUBLE PRECISION
|
The calculated system
CPU time for the duration of the transaction.
|
TRANRESP_TIME
|
DOUBLE PRECISION
|
The calculated elapsed
time for the duration of the transaction.
|
TRANRESP_USER_CPU_TIME
|
DOUBLE PRECISION
|
The calculated user
CPU time for the duration of the transaction.
|
TRANSTART_SYS_CPU_TIME
|
DOUBLE PRECISION
|
The process system CPU
time for the current transact-ion start event.
|
TRANSTART_USER_CPU_TIME
|
DOUBLE PRECISION
|
The process user CPU
time for the current transaction start event.
|
TRANSTOP_SYS_CPU_TIME
|
DOUBLE PRECISION
|
The process system CPU
time for the current transaction stop event.
|
TRANSTOP_USER_CPU
|
DOUBLE PRECISION
|
The process user CPU
time for the current transaction stop event.
|
<param name="maxBufferedEvents" value="100" />
alter service SQL_LOG {options AUTOINDEX off}
alter service SQL_LOG {options AUTOINDEX on}