Author |
Message
|
Gama |
Posted: Mon Jul 09, 2012 7:00 am Post subject: WMB - PASSTHRU dump/trace |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Hi,
Exist any way to log or dump the statment in PASSTHU?
DECLARE var1 CHARACTER 'a';
DECLARE var2 INTEVER 11;
DECLARE var3 CHARACTER 'aaaa';
Ex:
PASSTHRU('INSERT INTO A_A1 VALUES(?,?,?)', var1,var2,va3);
All I need is somethink like that in the trace file:
"INSERT INTO A_A1 VALUES('a',11,'aaaa')"
I'm using wmb8.0
Thanks. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jul 09, 2012 7:04 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Yes, use a trace node or take a user trace. If using a Trace node, store your ESQL statement in LocalEnvironment and include LocalEnvironment in your Trace pattern. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 09, 2012 7:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Or use the LOG statement from ESQL. |
|
Back to top |
|
 |
Gama |
Posted: Mon Jul 09, 2012 7:14 am Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Thanks to both but i need do insert into a db table all the statments done in runtime, all the statment, do you understand?
How can i do that with the LOG statment?
LOG statement is used to write a record to the event log or to the user trace.
tkanks. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jul 09, 2012 7:17 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 09, 2012 7:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
First, go remove the wheels from your automobile.
Then mount another automobile under yours, that keeps track of every turn your wheel hubs makes, and writes them into a piece of paper, and then reads that piece of paper to turn the wheels on the bottom automobile.
Now complain that you get bad gas mileage, and watch your neighbors laugh. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 09, 2012 7:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Gama wrote: |
Thanks to both but i need do insert into a db table all the statments done in runtime, all the statment, do you understand?
|
Why? What value is this information?
Aside from the massive overhead you're introducing (which my most worthy associate mentions) I'm worried about the security aspects. You plan to add to a plain text log file all the db statements executed. If the values are 'aa', '11', 'aaaa' it's not a problem; your new customer's name, address, SSN, income and other personal information it's a very serious problem. I imagine even non-customer information could be commercially sensitive.
Do your auditors know about this? Or the DBAs? Because they can stop bothering about access controls to the data in the database now.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 09, 2012 7:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
You plan to add to a plain text log file all the db statements executed. |
gama wrote: |
nsert into a db table all the statments done in runtime, all the statment, do you understand? |
One of these things is not like the other. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 09, 2012 7:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
You plan to add to a plain text log file all the db statements executed. |
gama wrote: |
nsert into a db table all the statments done in runtime, all the statment, do you understand? |
One of these things is not like the other. |
But both as odd & pointless as I am grumpy. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gama |
Posted: Mon Jul 09, 2012 7:59 am Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Hi Vitor an mqjeff,
Thaks for both updates,
All i want is write/insert all the sql statments into a text file or database table.
Is thast possible? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 09, 2012 8:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Gama wrote: |
All i want is write/insert all the sql statments into a text file or database table. |
Yes.
I ask again, why would you want to given the issues we've raised? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gama |
Posted: Mon Jul 09, 2012 8:07 am Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Is only for debug when we are developing our SOA environment.
I understand you worriers but believe that is not for fraudulent issues |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 09, 2012 8:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Gama wrote: |
All i want is write/insert all the sql statments into a text file or database table. |
A service trace will give you everything you could possibly want to know about the execution of the runtime.
In a text file.
Most of what it will tell you will not make any sense, since it includes the internal workings of the product.
If you only want to know how your code is interpreted, you can use a ... user trace.
If you only want to know what the database interactions are, you can use an odbc trace.
All Broker traces produce text files.
What are you trying to do that you can't do with any of these methods? |
|
Back to top |
|
 |
Gama |
Posted: Mon Jul 09, 2012 8:46 am Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
mqjeff,
I understand all of you point's and the trace node for debug is more then suficient, but is not i want.
We need to log inline all the statments to the database.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 09, 2012 8:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Gama wrote: |
mqjeff,
I understand all of you point's and the trace node for debug is more then suficient, but is not i want.
We need to log inline all the statments to the database.
Thanks |
You will destroy your performance.
How will you log into the database those statements that log into the database? |
|
Back to top |
|
 |
|