1. Tamilselvan Ramesh
  2. PowerBuilder
  3. Sunday, 20 September 2020 03:45 AM UTC

Hi,

I am new to power builder, have some query

1) To capture db logs, enable DB trace options in *.ini file and database logs are capturing successfully.

But every time logging in application it shows popup dialog to start & capture logs. I had changed show dialog option as 0 but even still it shows popup.

Below are database trace option used in *.ini file


[DbTrace]
ShowDBINames=0
FetchBuffers=1
ShowBindings=1
SumTiming=1
Timing=1
ShowDialog=0
LogFileName=logs\dbtrace.log

 

2) I want to capture event logs, how can I start and capture event error logs and to write in file

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 21 September 2020 16:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tamilselvan;

  The data base log that you are referring to via the DBTRACE setting is not a DB Log but an SQL Tracing log of what is sent by your PB App and what the DBMS returns back to your App. The DB Log is something that the DBMS server maintains within its address space.

  If your App would like to track the SQL, you can use the Transaction Object's SQLPREVIEW event (aka SQLCA) to record your App's DB activity.

  For the Event Log, I assume that you are referring to the MS-Windows Event log. You can write to this log (via SDK calls) but you cannot read or intercept applications writing to the O/S event log.

  You can record your App's event execution though by using the EXE tracing option. For example: <YourApp.exe?  /pbdebug

   Then read the log output to review the various event execution.

Note that you can also use the Application Profiler feature of PB as well to trace Event execution within your PB App from the IDE. You can also embed this into your production deployed App's via the TraceXxxx() commands.

 

HTH

Regards ... Chris

Comment
  1. Miguel Leeuwe
  2. Monday, 21 September 2020 18:27 PM UTC
As Chris explained already (I think):

What's in your DBMS setting of your connection profile?

If for example you connect to Oracle and you see something like

"TRACE ORA..." in the Dbms setting, tracing will be active. Delete the word TRACE (or TRA) if you don't want the db tracing to be active.

Other examples for tracing DBMS:

TRACE ODBC

TRACE JDBC

  1. Helpful
  1. Tamilselvan Ramesh
  2. Tuesday, 22 September 2020 01:48 AM UTC
TRACE SYC -> It is sybase
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 22 September 2020 15:09 PM UTC
Hi Tamilselvan;

FWIW: The SYC DB Client was *deprecated* by Sybase many years ago for ASE. If you are using a newer version of ASE (ie v15.x or v16.x), then you should be using the new "ASE" DB client driver.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Tamilselvan Ramesh Accepted Answer Pending Moderation
  1. Tuesday, 22 September 2020 01:47 AM UTC
  2. PowerBuilder
  3. # 2

Hi Chris,

Thank you for response..

1) If your App would like to track the SQL, you can use the Transaction Object's SQLPREVIEW event (aka SQLCA) to record your App's DB activity.

  --> I am using sybase, so added as "TRACE SYC" to capture SQL logs

2) You can record your App's event execution though by using the EXE tracing option. For example: <YourApp.exe?  /pbdebug

   Then read the log output to review the various event execution.

Note that you can also use the Application Profiler feature of PB as well to trace Event execution within your PB App from the IDE. You can also embed this into your production deployed App's via the TraceXxxx() commands.

  --> Can I get any examples to records event execution and also for exception handling

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 22 September 2020 15:18 PM UTC
Hi Tamilselvan;



1) Yes, that is another way - but outside of your Apps processing vs SQLPREVIEW which is inside your Apps processing control. This would allow you more control, formatting & capture of DBMS interactions vs reading & deciphering the external log file.

2) Yes, you would need to read & parse this external file.

3) Have a look in the PB Help file starting with the TraceOpen, TraceBegin, etc commands
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.