|
|
|
bind variable
|
|||
|---|---|---|---|
|
#18+
I need to see the actual value of bind variables, but not by using 10046 Event Trace which writes to trace file. The goal is to write a script , but the following script got me nowhere: declare text varchar2(1024); tracef utl_file.file_type; begin tracef:=utl_file.fopen('/aviv/app/oracle/admin/work/udump','bind.trc','w'); text:=''; FOR cr in (select q.sql_text line, c.curno cno from v$sql q, v$sql_cursor c where q.address=c.parent_handle ) LOOP text:=' Cursor#='||cr.cno||' SQL='||cr.line||' Bind Vars='; FOR cr2 in (select cursor_num,position,datatype, value from v$sql_bind_data where value is not null and cursor_num=cr.cno) LOOP text:=text||' position:'||cr2.position||' type:'|| cr2.datatype||' Value=' || cr2.value; END LOOP; utl_file.put_line(tracef,text); END LOOP; end; need to see value of bind variables of other sessions. Thanks ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 14:14 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
Этот скрипт конечно ничего не даст, т.к. v$sql_bind_data показывает бинд переменные только своей сессии. Непонятно, почему нельзя использовать 10046 Event Trace ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 15:32 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
1. why don't you like solution with "10046 Event Trace"? 2. Could you please explain this - "the following script got me nowhere"? do you mean you're getting NULLS in "v$sql_bind_data.value" column? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 15:40 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
Гена!!! за тобой не успеешь! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 15:41 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
Hi The main reason the Trace is not the option is very simple. You have to analyze the trace files, which are not very readble and control your disk space. Does anyone have experience with LogMiner ? Can it be the answer ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 15:56 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
hi again! after playing with LogMiner you'll consider "Trace is the option is VERY simple" ! digging in code returned by LogMiner is "a pain in the ass", but i'm still not sure it allows to see values of bind variables, this was out of interest when i've been playing with LogMiner... you'd better ask Tom , because if he doesn't know the answer then most probably nobody will help you... PS just my 2 eurocents: i'd consider parsing Trace files instead... good luck! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 16:05 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
I guess you have a wrong point of view on a trace file and on using of a event 10046. You have to run TKPROF utility for prepare a trace file to a readble format ant then you can read and research information from a trace without any problems. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 18:17 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
>You have to run TKPROF utility for prepare a trace file to a readble format ant >then you can read and research information from a trace without any problems. Мне кажется, что tkprof не парсит дополнительные уровни трассировки. Т.е. bind variables в выходном файле уже не останется. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 18:39 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
In most cases - Yes, this is correct, because EXPLAIN PLAN can't recognize type of a bind variables. It can work with a varchar2 (or just character) variables only. But you can avoid this limitation/restriction in sql statments by putting appropriate type conversions in the SQL statement. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 18:55 |
|
||
|
bind variable
|
|||
|---|---|---|---|
|
#18+
>In most cases - Yes, this is correct, because EXPLAIN PLAN can't recognize type >of a bind variables. It can work with a varchar2 (or just character) variables only. >But you can avoid this limitation/restriction in sql statments by putting >appropriate type conversions in the SQL statement так мы вроде о разных вещах говорим. Человек хочет увидеть значения bind variables (а не тип). Их можно получить в трейс-файл. Но после обработки tkprof их в выходном файле не будет, т.к. это не предусмотрено в утилите tkprof. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2003, 19:22 |
|
||
|
|

start [/forum/topic.php?fid=52&msg=32104638&tid=1991855]: |
0ms |
get settings: |
8ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
168ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
33ms |
get tp. blocked users: |
1ms |
| others: | 211ms |
| total: | 453ms |

| 0 / 0 |
