1. Ilya Milin
  2. PowerBuilder
  3. Friday, 26 May 2023 20:29 PM UTC

Please advice.

I've lost my settings to output All SQLs during an application run from PowerBuilder 2017 R3 on Windows10 x64 and is only outputting now the connection to Oracle 11 but not SQLs.

 

getting to dbtrace.log now this only(no SQLs), after I've lost my setting:

/*---------------------------------------------------*/
/* 5/26/2023 11:54 */
/*---------------------------------------------------*/
(09F91818): DIALOG CONNECT TO TRACE ORA ORACLE:
(09F91818): LOGID=MFDB_USER
(09F91818): SERVER=buqa.world(DBI_DIALOG_CONNECT) (2430.584 MS / 2430.584 MS)
(09F91818): DISCONNECT:(DBI_DISCONNECT) (65.185 MS / 2495.769 MS)
(09F91818): SHUTDOWN DATABASE INTERFACE:(DBI_SHUTDOWN_INTERFACE) (0.000 MS / 2495.769 MS)

Before, I was getting this:


/*---------------------------------------------------*/
/* 2/7/2023 10:33 */
/*---------------------------------------------------*/
(0348BC10): LOGIN:(DBI_LOGIN) (1550.311 MS / 1550.311 MS)
(0348BC10): CONNECT TO TRACE ORA ORACLE:
(0348BC10): DATABASE=BUQA
(0348BC10): LOGID=MFDB_USER
(0348BC10): SERVER=BUQA
(0348BC10): DBPARM=DisableBind=1,DelimitIdentifier='No',ThreadSafe='Yes',PackageProcs=1,StaticBind=0, Timestamp=0, BinTxtBlob=1 , PWDialog=1(DBI_CONNECT) (0.001 MS / 1550.312 MS)
(0348BC10): (DBI_ADJUST_CONNECT) (0.004 MS / 1550.316 MS)
(0348BC10): (DBI_CURRENT_OF_CURSOR) (0.000 MS / 1550.316 MS)
(0348BC10): PREPARE:(DBI_PARSE_ONLY) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_SPECIAL_CURSOR) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_SKIP_VERIFY) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_DESCRIBE_BEFORE_EXEC) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_SUPPORT_INPUT_PARM_BIND) (0.000 MS / 1550.316 MS)
(0348BC10): BEGIN TRANSACTION:(DBI_START_TRAN) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_SUPPORT_RPC) (0.000 MS / 1550.316 MS)
(0348BC10): (DBI_SPECIAL_DOUBLE) (0.000 MS / 1550.316 MS)
(0348BC10): EXECUTE REMOTE PROCEDURE: FUNDS.MFDB_USER_INIT.VALIDATE_USER_LOGIN
TYPE LONG REFERENCE
TYPE VCHAR REFERENCE
TYPE LONG REFERENCE
TYPE VCHAR (DBI_RPC_EXECUTE) (183.281 MS / 1733.597 MS)
(0348BC10): (DBI_SUPPORT_RPC) (0.000 MS / 1733.597 MS)
(0348BC10): (DBI_SPECIAL_DOUBLE) (0.000 MS / 1733.597 MS)
(0348BC10): EXECUTE REMOTE PROCEDURE: FUNDS.MFDB_ANNOUNCEMENT_PKG.GET_ACTIVE_ANN_NUM(DBI_RPC_EXECUTE) (41.218 MS / 1774.815 MS)
(0348BC10): (DBI_SUPPORT_RPC) (0.001 MS / 1774.816 MS)
(0348BC10): (DBI_SPECIAL_DOUBLE) (0.000 MS / 1774.816 MS)
(0348BC10): EXECUTE REMOTE PROCEDURE: FUNDS.MFDB_ANNOUNCEMENT_PKG.GET_ACTIVE_ANN_NUM(DBI_RPC_EXECUTE) (44.653 MS / 1819.469 MS)
(0348BC10): (DBI_SPECIAL_DECIMAL) (0.000 MS / 1819.469 MS)
(0348BC10): (DBI_SPECIAL_DOUBLE) (0.000 MS / 1819.469 MS)
(0348BC10): PREPARE:
(0348BC10): SELECT UPPER ( e.EMPLOYEE_ID ) , e.EMAIL_ID , e.LAST_NAME , e.FIRST_NAME , e.EMPLOYEE_GROUP_ID , e.DEFAULT_CURRENCY_CODE , e.EMPLOYEE_DEPARTMENT_ID , e.MI , e.TELEPHONE_NUM , e.EMPLOYEE_ROLE_CODE , e.sso_id FROM FUNDS.V_EMPLOYEES e WHERE UPPER ( e.sso_ID ) =Upper ( 'FirstName_LastName' ) AND UPPER ( NVL ( E.ACTIVE_IND , 'N' ) ) ='Y' AND e.EMPLOYEE_DEPARTMENT_ID =### AND E.EMPLOYEE_GROUP_ID =### (DBI_PREPARE) (0.044 MS / 1819.513 MS)
(0348BC10): GET AFFECTED ROWS:(DBI_GET_AFFECTED_ROWS) (0.002 MS / 1819.515 MS)
(0348BC10): ^ 1 Rows Affected

----------------------------------------------------------------------

Please advise.

Ilya.milin@spglobal.com

 

Ilya Milin Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 18:51 PM UTC
  2. PowerBuilder
  3. # 1

Thank you everyone for help, but the most suitable advice was provided by John Fauss. Special thanks to John - all working as expected.

Regards,

Ilya Milin

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 27 May 2023 14:51 PM UTC
  2. PowerBuilder
  3. # 2

Or use an object inherited from transaction and use that in the application object's variables:

You can then use the n_tr.preview() event to log all the SQL to a file.

 

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Saturday, 27 May 2023 13:26 PM UTC
  2. PowerBuilder
  3. # 3

The 'Generate Trace' option in the first image only applies to the Database Painter.

Turn that off and change sqlca.DBMS in your app to 'TRACE ORA'.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 26 May 2023 21:54 PM UTC
  2. PowerBuilder
  3. # 4

I'm not entirely sure what you mean by "SQLs"... Are you referring to SQL statements issued by code in your application when it executes?

Try changing the Transaction object's DBMS property (SQLCA.DBMS) from "ORA" to "TRACE ORA". Changing a Database Profile as you have shown affects only the Painters/designers within the PB IDE. You have to preface the DBMS property with the word "TRACE" (and a space) for you application to write to the PBTrace.log file. Enabling database tracing this way works for everything that Transaction object sends/receives to/from the database it is connected to, and you don't need to check the checkbox in the Database Profile (unless you want to, of course).

Best regards, John

Comment
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.