2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Cognos AnalyticsでDQMレポート実行時に発行されるSQLクエリーのモニター

Last updated at Posted at 2017-07-27

概要

Cognos AnalyticsやBIで動的クエリーモード(DQM)のレポートを実行した際に、通常のトレースでは発行されるMDXの取得は可能ですが、以下の手順で発行されるSQLクエリーの取得が可能です。

手順

以下のファイルを編集します。
C:\Program Files\ibm\cognos\analytics\configuration\xqe.diagnosticlogging.xml
001.PNG

まずは、編集前のオリジナルファイルをバックアップしておきます。
002.PNG

テキストエディターで、xqe.diagnosticlogging.xmlファイルを開きます。
赤枠の箇所を編集します。
003.PNG

以下のように、「level="Info"」を記載します。
004.PNG

Cognos Analyticsサービスを再起動し、何かしらDQMのレポートを実行します。
005.PNG

以下のフォルダに生成される、xqelog-*.xmlの最新のものを、テキストエディターで確認します。
C:\Program Files\ibm\cognos\analytics\logs\XQE
006.PNG

この様に、SQLクエリーが出力されています。
007.PNG

トレースを止めたい時は、バックアップしていたオリジナルファイルに戻して、Cognosサービスを再起動します。
008.PNG

参考情報

・Cognos Analyticsの場合
How to trace the native SQL for relational DQM data sources or Dynamic Cubes in Cognos Analytics 11.
http://www-01.ibm.com/support/docview.wss?uid=swg22001034

・Cognos 10 BIの場合
How to trace native SQL for relational DQM datasources or Dynamic Cubes
http://www-01.ibm.com/support/docview.wss?uid=swg21579065

2020/10/29 追記

いつの間にやら、DQMでも監査テーブルにNATIVEQUERY出力可能になっているようです。
Cognos Analytics DQMモードで監査テーブルにNATIVEQUERY出力
https://qiita.com/shinyama/items/2af71434e77a0c1cd5a7

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?