0

Oracle エラーを返すクエリへのバインド変数の値を追跡する必要があります。

エラーを返すクエリは と に描画されてv$sql_bind_capturev$sqlareaないため、これらの表を見ることができません。

次に、Servererror の後にトリガーを作成し、作成したトレース テーブルにクエリを記録しました。残念ながら、バインド変数はトレースされません (私は , などを読み:p0まし:myVarた...)。

セッションにアクセスできない場合、これらの変数の値を追跡するにはどうすればよいですか?

4

1 に答える 1

0

セッションをトレースし、LEVELバインド変数値をキャプチャするように設定できます。

SQL> ALTER SESSION SET EVENTS '10046 trace name context forever, level 4'; 

トレース イベントの違いLEVELs:-

0 – No trace. Like switching sql_trace off.

2 – The equivalent of regular sql_trace.

4 – The same as 2, but with the addition of bind variable values.

8 – The same as 2, but with the addition of wait events.

12 – The same as 2, but with both bind variable values and wait events.

How to generate trace file – SQL Trace and TKPROF in Oracle をご覧ください。

于 2014-10-13T08:39:02.340 に答える