1) The document discusses Oracle database auditing features before and after version 12.1. It describes migrating the audit trail to the unified audit trail and using the SYS.UNIFIED_AUDIT_TRAIL table.
2) It provides steps to configure syslog auditing on Linux for Oracle database audit records. Procedures are created to output messages to syslog and call it from a fine-grained auditing policy handler.
3) An example fine-grained auditing policy is created to audit access to the SECDEMO.CUSTOMER table and call the syslog handler for non-application users.
1) The document discusses Oracle database auditing features before and after version 12.1. It describes migrating the audit trail to the unified audit trail and using the SYS.UNIFIED_AUDIT_TRAIL table.
2) It provides steps to configure syslog auditing on Linux for Oracle database audit records. Procedures are created to output messages to syslog and call it from a fine-grained auditing policy handler.
3) An example fine-grained auditing policy is created to audit access to the SECDEMO.CUSTOMER table and call the syslog handler for non-application users.
S2E: A Platform for In Vivo Multi-Path Analysis of Software Systems. Vitaly Chipounov, Volodymyr Kuznetsov, George Candea. 16th Intl. Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), Newport Beach, CA, March 2011.
24. DB2の必修モニタリングポイント② トランザクション数
トランザクション数(定期時間内のトランザクションの数)を把握しておく事は重要です
– Transactions Per Minute (TPM)
– (狭義の)トランザクション≒コミット発行数+ロールバック発行数
エレメントで計算するには、以下の2つを組み合わせて...
– TOTAL_APP_COMMITS: 総COMMIT数
– TOTAL_APP_ROLLBACKS:総ROLLBACK数
SELECT CURRENT TIMESTAMP,TOTAL_APP_COMMITS+TOTAL_APP_ROLLBACKS
FROM SYSIBMADM.MON_DB_SUMMARY
MON_DB_SUMMARYは良く使う
情報がまとめられた便利なビュー
上記にはDB2システムが内部で発行したSQLの分も含まれる
– ユーザSQLのみをカウントしたい場合は、以下のようにMON_GET_SERVICE_SUBCLASS
でスーパークラスに'SYSDEFAULTUSERCLASS'を指定してデータを取り出す
SELECT CURRENT TIMESTAMP,TOTAL_APP_COMMITS FROM
TABLE(MON_GET_SERVICE_SUBCLASS('SYSDEFAULTUSERCLASS','',-2)) AS T
24
25. DB2の必修モニタリングポイント③ 遅いクエリーの発見
パフォーマンスチューニングでは、遅いクエリーに対してチューニングする事が重要
– 一番良いのは、クライアントアプリケーション側でSQLを管理していること
– 無いなら、パッケージキャッシュから(実行されたSQLを一次的にキャッシュしておく領域)
エレメントで計算するには、
– STMT_EXEC_TIME:クエリーを実行した時間
– EXECUTABLEID:SQL毎に付けられるID(ハッシュ値)
をベースに検索
? 以下の例は、同じクエリーの実行時間をSUMで足して、遅いもの順でトップ10を出力した例
SELECT
SUM(STMT_EXEC_TIME) AS TOTAL_EXEC_TIME,
SUM(TOTAL_ACT_WAIT_TIME) AS TOTAL_WAIT_TIME,
EXECUTABLE_ID
FROM TABLE(MON_GET_PKG_CACHE_STMT(NULL, NULL, NULL, -2)) AS T
GROUP BY EXECUTABLE_ID
ORDER BY TOTAL_EXEC_TIME DESC
FETCH FIRST 10 ROWS ONLY
? EXECUTABLEIDではSQLが分からないので、以下のようにして情報を出力
EXECUTABLEIDを第二引数に指定。(xを付けるのをお忘れ無く)
call
db2perf_browse('MON_GET_PKG_CACHE_STMT(NULL,x''010000000000000084000
25 0000000000000000000020020120223161303238342'',NULL,-2)');