HammerDB simple query Replay errors

From: k.hadd <kouss.hd_at_gmail.com>
Date: Tue, 30 Jul 2019 15:52:15 -0400
Message-ID: <CAF+xsmQH0BOQ5zcMT_K58fYRytYj9JKBwLNUZ6JncGfNu8LsTg_at_mail.gmail.com>



Hi guys ,
 I am opening this thread because I haven't found anything specific so far in the O-list archive .

My problem is that I installed HammerDb along with TPCC schema in my Oracle 12c test DB and wanted to convert a single session trace file to tcl and replay it but I am having errors related to the cursor.

Steps : (the test DB is both source and destination )

  • HAMMER DB Installation :
  • Build TPCC schema

-1. Run a query On the Database : other than TPCC



SQL> alter session set tracefile_identifier = 'HORDEP_HammerDB_trace'; SQL> alter session set events '10046 trace name context forever, level 4';

run my query on schema X
SQL> alter session set events '10046 trace name context off';

  • 2. Convert Trace File : (see CH14 ) in the docs https://www.hammerdb.com/docs/ch14.html
    • Open HammerDB >Oracle > Open File Select Directory : File Type : *.trc File Name :{TraceFile} • Select the Trace Conversion button {Convert Trace to Oratcl} (converted into a format that can be replayed against the database) • Remove the comment before the “set connect” line on line 4 and enter the correct username and password (user that ran the query).

when I check the converted script I get this content a bind variable seems missing but it's a level 4 trace file :
----------------------TCL

#!/usr/local/bin/tclsh8.6
package require Oratcl
####UPDATE THE CONNECT STRING BELOW###
set connect myUser/123#_at_test
set lda [oralogon $connect]
set curn496002728 [oraopen $lda ]
set sql496002728 "BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END; " oraparse $curn496002728 $sql496002728
###CANNOT EXECUTE 496002728:Failed to find expected bind variables in PL/SQL statement before execute
set curn465764584 [oraopen $lda ]
set sql465764584 "alter session set events '10046 trace name context off' " orasql $curn465764584 $sql465764584
oraclose $curn465764584
oralogoff $lda

Conversion Output



Unmatched Background Error - can't read "*cur2hash(496002728)*": no such variable

    while executing
"set text($cur2hash($cursor)) [remspace $text($cur2hash($cursor))]"

    (procedure "convert_to_oratcl" line 79) invoked from within "convert_to_oratcl" invoked from within".ed_mainFrame.buttons.console invoke "

    invoked from within ".ed_mainFrame.buttons.console instate !disabled { .ed_mainFrame.buttons.console invoke } "

    invoked from within ".ed_mainFrame.buttons.console instate pressed { .ed_mainFrame.buttons.console state !pressed; .ed_mainFrame.buttons.console instate !disabled { .ed_ma..."

    (command bound to event)

 Has anybody encountered similar issues when converting a trace file ?

 Thank you in advance
K.H

--

http://www.freelists.org/webpage/oracle-l Received on Tue Jul 30 2019 - 21:52:15 CEST

Original text of this message