SQL trace query parameters round 2

Hi,
This is a follow up of this topic:
SQL trace query parameters
My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
I have tried several approach including this:
http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
Any idea why it isn't working? (I'm using Oracle XE 11g)
Thanks

user610868 wrote:
Hi,
This is a follow up of this topic:
SQL trace query parameters
My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
I have tried several approach including this:
http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
Any idea why it isn't working? (I'm using Oracle XE 11g)
Thankshttp://www.lmgtfy.com/?q=oracle+sql_trace+level=4

Similar Messages

  • SQL trace query parameters

    Hi,
    I'm sending SQL queries to Oracle through JDBC, and I want to debug these SQL queries with SQL trace.
    My problem is when i want to view the trace files via tkprof, my queryies do not show the parameters.
    For example: SELECT * FROM mytable WHERE mycolumn = :1
    I would like to see the value of :1.
    How can i do that?
    Thanks

    user610868 wrote:
    Hi,
    I'm sending SQL queries to Oracle through JDBC, and I want to debug these SQL queries with SQL trace.
    My problem is when i want to view the trace files via tkprof, my queryies do not show the parameters.
    For example: SELECT * FROM mytable WHERE mycolumn = :1
    I would like to see the value of :1.
    How can i do that?
    Thankstrace level must be set to 4 to capture BIND variable values

  • PL/SQL region. query get rounded up when displayed using htp.p procedure.

    Hi,
    I tried to apply the above code, but the coordinates don't seem to come out right.
    When I test the following query:
    select c.employee_id
    ,t.X
         , t.Y
    from employees c, TABLE(SDO_UTIL.GETVERTICES(c.geom)) t;
    It works fine. Don't let the spatial component discourage you. The output are just two coordinates, just like normal sql. I tested the output in a Report page.
    When I display the columns via an alert, instead of ( 43.907787,-79.359741) I get (43,-79).
    for row in employees loop
    htp.p('
    alert('||to_char(row.y)||');
    alert('||row.x||');
    Any idea how to get around this?
    ThanX,
    Pim

    Hi,
    I tried to apply the above code, but the coordinates don't seem to come out right.
    When I test the following query:
    select c.employee_id
    ,t.X
         , t.Y
    from employees c, TABLE(SDO_UTIL.GETVERTICES(c.geom)) t;
    It works fine. Don't let the spatial component discourage you. The output are just two coordinates, just like normal sql. I tested the output in a Report page.
    When I display the columns via an alert, instead of ( 43.907787,-79.359741) I get (43,-79).
    for row in employees loop
    htp.p('
    alert('||to_char(row.y)||');
    alert('||row.x||');
    Any idea how to get around this?
    ThanX,
    Pim

  • Create sql trace files on client machine

    Hi
    oracle creates sql trace files on server side, what are possible and best ways of sharing those files with end users? is it possible to create them on client side instead?

    Dbb wrote:
    Hi
    Hi
    oracle creates sql trace files on server side,
    Yes
    what are possible and best ways of sharing those files with end users?
    Using shared directory. Use the parameters dump to point to it
    is it possible to create them on client side instead?
    No
    . :-) any help with my english is wellcome :-) .does this mean sharing user_dump destination at linux level and then mounting it from client machines ( win xp )?is there any doc on this?

  • Can I set up SQL Trace or Audit to connect to servers

    I have a server (2003) with SQL (2005) on it. 
    If i install MS SQL Management Studio 2012 on my PC, can I audit what SQL on that server is doing by connecting to it from the PC ?
    Or would it be better to set up SQL Trace on the server itself ?
    Thanks
    Pete

    So if I install SSMS 2012 on my PC, I can connect to the databases on different servers from 1 place. 
    Yes, as long as there is network connection.  In SSMS open up the Registered Servers window and register all servers:
    http://technet.microsoft.com/en-us/library/ms188231.aspx
    Related thread:
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/8209ad2c-6efd-49d6-9605-b7f348eb56bb/how-to-connect-sql-database-on-different-network
    Setting up server-side tracing:
    http://www.sqlusa.com/bestpractices/createtrace/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • "Define query parameters" popup in Dataset properties - Refersh field, not displayed for Sps in SSDT 2010 (Works fine in BIDS)

    When we upgraded our SSRs projects to 2012, we are facing an issue in Data tools environment.
    When we click REFRESH FIELDS button in Dataset properties, With query type as SP (For all our sps), the "Define query parameters"  popup is not displayed. 
    When we checked the SQL Profiler for queries executed at back end , NULL values are used for parameters.
    But when we Used the QUERY DESIGNER button, and clicked execute for sp, the popup comes.
    For User defined Functions, the Popup comes correctly.
    In BIDS, still we can open the RDLs and do the operations correctly
    Please advice

    Dear Wendy Fu
    My Scenario is different.
    In Query Designer, Every thing is fine (Parameter Popup is coming, and fields are populated under data set)
    But what we need to do is
    1, Select Query Type As SP
    2, Select the required SP
    3, Click Refresh Button
    4, A "Define
    query parameters" window popsup
    5, Provide values and click Ok
    6, Fields will be populated under the dataset
    The issue we face is that, we are not getting the  Define query parameters popup,
    Hence NULL values are passed to execute the sp, to retrieve the fields set.
    The Work around we are using now is editing the sp, and use
    set @Parameter = Value
    for each parameters in sp, and then we get the fields populated under dataset, when we click refresh.
    The issue exists in both  MSDT for
    Visual studio 2010 &  MSDT for  Visual studio 2012.
    But every thing is fine in BIDS with VS 2008 Shell for the same RDL

  • OCCI/ODBC application sql trace failure...

    Hi,
    I was doing the sql*net trace for an OCCI/ODBC Application writen in c++. I have an InstantClient on my PC. I was trying to access the Oracle through my C++ program to
    compare the performance of OCCI and ODBC.
    I was using the Oracle 10g(ver10.2.0.1.0 ), Oracle instant cilent(win32-10.2.0.3-20061115), and VS 8.0.
    TNSNAMES.ora:
    ORCL =  
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    (SID = ORCL)
    LISTENER.ORA:(It was created by net manager.)
    SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = F:\oracle\product\10.1.0\Db_3)
      (SID_NAME = ORCL)
    LISTENER =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = HOST_NAME)(PORT = 1521))
    The sqlnet.ora file was writen to trace the client sql. Fortunately, my C++ program can access the oracle and get my result back successfully. In the same time, the trace files
    can be created, but when using the tkprof tool to explain it, it comes to the file with useless information.
    One of the *.trc file explaind by tkprof tool:
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    Trace file: ora21763.trc
    Trace file compatibility: 8.00.04
    Sort options: default
    1 session in tracefile.
    0 user SQL statements in trace file.
    0 internal SQL statements in trace file.
    0 SQL statements in trace file.
    0 unique SQL statements in trace file.
    327 lines in trace file.
    Finally, I got TNS-12518 TNS-12564 error. I tried to add DIRECT_HANDOFF_TTC_LISTENER=OFF, but it didnt work. I traced the listener, the error occured in the listener.trc "
    ntt2err: soc 464 error " and " nsbequeath: error reading REDIR/NSE msg".
    I just cann't get the right trace file and cann't sovle the two errors(TNS-12518 TNS-12564). Can somebody give me some advices, please.

    Hi,
    The TKPROF facility accepts as input an SQL trace file generated when SQL Trace has been turned on for the system or a session, not a SQL*NET trace file. A SQL*Net trace file is a dump of raw data packets and communications at the SQL*NET layer. If you want to get performance statistics from SQL beign executed by your application, then you need to turn on SQL Trace not SQL*MET tracing.
    To enable SQL trace at the system level, you need to execute:
    alter system set SQL_TRACE=TRUE
    The NS-12518 TNS-12564 normally means you are running into some sort of resource deletion issue. This can be caused by various things. Make sure you are properly cleaning up and closing sessions in your application.
    Are you performing some sort of stress test or have you just written a Multi-threaded test harness that executes different types of SQL with OCCI/ODBC?
    HTH
    J.B.

  • SQL: Infoset query

    Hi,
        I create on infoset query in SQL trace using LDB.
        Now my problem is, I want to the link text in corresponding value field how to link it.  that screen is customized screen

    Look also at <a href="https://service.sap.com/sap/support/notes/491403">Note 491403 - Identifying text in SAP Query</a> or <a href="http://help.sap.com/saphelp_46c/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm">Application-specific Enhancements</a>
    Regards

  • SQL TRACE for WEB deployed report

    When I put
    Alter Session Set sql_trace=TRUE
    into the BEFORE Parameter Form trigger...
    I get a trace file showing data on the one SQL in that trigger.
    There is no TRACE output of the main query or any of the PL/SQL in the Program Units.
    The report is invoked from company-wide intra-net.
    I think it is Oracle Apps running in Linux server.
    What am I doing wrong?
    PS
    I cannot execute this report from Report Builder.

    Hello,
    Just a remark : if you are using Reports 9.0.4 / 10.1.2, you don't have to modify the reports , you can activate the SQL trace with the parameter SQLTRACE=YES
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/cmdline/common/cla_sqltrace.htm
    Regards

  • Urgent : How to do the SQL trace analysis

    Hi Floks,
    How to do the SQL  Trace analysis and any another tools is there to test abap programming then this tools runtime analysis,extended Programming Checking,Code inspector .How to utilize that tools .please forward me
    thanks
    suresh

    HI,
    <b>SQL Trace Use:</b>
    The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement was executed, its duration, its input parameters and results (where applicable) as well as context information.
    <b>
    Features</b>
    The SQL Trace is especially useful for:
    Development
    SQL Trace can help JDO, enterprise beans, servlet and JSP developers to learn which kind of database accesses their code produces.
    1.      Performance analysis
    Typically, performance issues are caused by inefficient database accesses. In this case SQL Trace can be used to show the issued SQL statements and their duration, thus helping to identify inefficient SQL statements.
    <b>Activities</b>
    Typically, you should use the SQL Trace when you need to check the behavior of a particular application. This is the following scenario:
    Look at the below links, you will get the idea
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801f89454211d189710000e8322d00/content.htm
    Re: Runtime Analysis vs SQL Trace
    http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html

  • Plz help me to understand sql trace

    Hi,
    i need your help to understand the sql trace and where exactly i should concentrate,
    i am also going through docs,
    your help is appreciated,
    select count(rep)
    from
    (select /*+ leading(v1 v2) use_nl_with_index(v2) */ count(v1.val) rep from
      (select rn, val from (select rownum rn, val from (select /*+ no_merge
      no_parallel(t) no_parallel_index(t) dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring */"FFPR_FFAMS_ID" val
      from sys.ora_temp_1_ds_108308 t where "FFPR_FFAMS_ID" is not null group by
      "FFPR_FFAMS_ID" having count("FFPR_FFAMS_ID") = 1)) where ora_hash(rn) <=
      273538662) v1, (select /*+ index(t2) */ "FFPR_FFAMS_ID" val from
      "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t2) v2 where v2.val = v1.val
      group by v1.val having count(v1.val) <= 2)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.29          0       8131          0           1
    total        3      0.00       0.30          0       8131          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_FFAMS_FK_I") dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
      no_expand index(t,"FFPR_FFAMS_FK_I") */ count(*) as nrw,count(distinct
      sys_op_lbid(692895,'L',t.rowid)) as nlb,count(distinct "FFPR_FFAMS_ID") as
      ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where ("FFPR_FFAMS_ID" is not
      null) and (TBL$OR$IDX$PART$NUM("DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS",
      0,4,0,"ROWID") = :objn)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       2.56          0        425          0           1
    total        3      0.00       2.56          0        425          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_FFAMS_FK_I") dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
      no_expand index(t,"FFPR_FFAMS_FK_I") */ count(*) as nrw,count(distinct
      sys_op_lbid(692895,'L',t.rowid)) as nlb,count(distinct "FFPR_FFAMS_ID") as
      ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where "FFPR_FFAMS_ID" is not
      null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       2.56          0        427          0           1
    total        3      0.00       2.56          0        427          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_PK_I") dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring no_expand index(t,
      "FFPR_PK_I") */ count(*) as nrw,count(distinct sys_op_lbid(692907,'L',
      t.rowid)) as nlb,null as ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as
      clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where ("FFPR_ID" is not null
      or "FFPR_PLAN_NAME" is not null) and
      (TBL$OR$IDX$PART$NUM("DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS",0,4,0,
      "ROWID") = :objn)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       1.51        847        857          0           1
    total        3      0.00       1.52        847        857          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    select /*+ no_parallel_index(t,"FFPR_PK_I") dbms_stats cursor_sharing_exact
      use_weak_name_resl dynamic_sampling(0) no_monitoring no_expand index(t,
      "FFPR_PK_I") */ count(*) as nrw,count(distinct sys_op_lbid(692907,'L',
      t.rowid)) as nlb,null as ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as
      clf
    from
    "DM_FM_REPORTING_OWNER"."FM_FP_PLAN_RESULTS" t where "FFPR_ID" is not null
      or "FFPR_PLAN_NAME" is not null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       1.26          0        850          0           1
    total        3      0.00       1.27          0        850          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 213     (recursive depth: 1)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       13      0.00       0.03          0          0          0           0
    Execute     13      0.00       1.32         43        242         29           9
    Fetch        4      0.00       0.00          0          0          0           4
    total       30      0.00       1.36         43        242         29          13
    Misses in library cache during parse: 4
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse     2945      0.00       1.04          0          0          0           0
    Execute   3741      0.00       5.49       3137      12995       7050      203362
    Fetch     3088      0.00      38.42       3344      39486         27        9811
    total     9774      0.00      44.96       6481      52481       7077      213173
    Misses in library cache during parse: 284
    Misses in library cache during execute: 160
      144  user  SQL statements in session.
    2814  internal SQL statements in session.
    2958  SQL statements in session.Regards
    nic

    Hi,
    i did the homework, but some how i dont seem to understand what oracle is doing behind
    esp with hints like
    select /*+ leading(v1 v2) use_nl_with_index(v2) */ count(v1.val)
    /*+ no_parallel(t) no_parallel_index(t) dbms_stats
      cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
    substrb(dump(min("XXX"),16,0,32),1,120),
      substrb(dump(max("XXX"),16,0,32),1,120),i havent used this things any where in my program, but still they are used,
    so i got confused, can you throw some light on this issue,
    regards
    nic

  • Regarding SQL trace

    Hi all,
    I want to run a SQL trace for processing of CREMAS IDOC's ( custom Functional module)  and i want to see which all tables or SQL statement is taking more time .
    Can you tell me procedure to run SQL trace.

    HI,
    Here are the 2 good links
    http://publib.boulder.ibm.com/tividd/td/ITMAN/SC32-9195-00/en_US/HTML/sap_add06.htm
    http://help.sap.com/saphelp_webas610/helpdata/en/d1/8022e5454211d189710000e8322d00/content.htm
    Well using SQL trace
    like as follows:
    Goto transaction ST05. Press TRACE ON.
    Execute your transaction .
    Come back to this screen and click TRACE OFF.
    Then check the trace details.
    You end up getting unnecessary details
    Lets say you have to analyze your particular SQL query,
    1. put a breakpoint at the select statement and execute the transaction , as it stops at your breakpoint , run SQL trace in seperate session.
    2. Trace ON
    3. Execute the select statement.
    4. Trace OFF
    5. Analyze.
    In this way you can analyze your particular select query
    Pls check links like:
    http://help.sap.com/saphelp_nw04/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/d1/801f89454211d189710000e8322d00/frameset.htm
    http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html
    SQL Trace
    SQL trace (ST05) provides the developer with the ability to analyze database select statements. Simply execute ST05 to turn on SQL trace, then execute the statement/program you want to analyze. Now turn off SQL trace using ST05
    And click on list trace to view the details.
    Authorization trace analysis
    1. Open two sessions
    2. Execute transaction ST01 in one of the sessions
    3. Select the authorization checkbox, note the other traces
    you can perform (SQL, RFC, Table Buffer etc)
    4. Click the 'Trace On' button
    5. Within your other session execute the transaction/report
    you want to trace or get the user in question to do it
    6. Return to the session where you turned the trace on and
    click on 'Trace Off' otherwise it will continue to record all authorization checks
    7. Click on the 'Analysis' button
    8. Enter appropriate data into selection screen such as
    Username, type of trace records (i.e. Authorization check)
    9. Click on the Execute button.
    10. Report displaying trace results will now be displayed
    GO THROUGH THIS
    Tools provided for Performance Analysis
    Following are the different tools provided by SAP for performance analysis of an ABAP object
    Cheers,
    Simha.

  • How using sql trace event  10128 level 1&2

    hi all,i want ask about sql trace event 10128. how using sql trace event 10128 level 1&2??
    when I've enabled sql trace event 10128 level 2,and i execution query then appears error
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00942: table or view does not exist
    where the fault lies??
    i'm using
    ALTER SYSTEM SET timed_statistics=TRUE;
    ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2';

    But nothing issue with me on 10g on windows xp:
    SQL> ALTER SYSTEM SET timed_statistics=TRUE;
    System altered.
    SQL> ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2';
    ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2'
    ERROR at line 1:
    ORA-00927: missing equal sign
    SQL> ALTER SESSION SET EVENTS
      2      '10128 trace name context forever, level 2';
    Session altered.
    SQL>HTH
    Girish Shamra
    Edited by: Girish Sharma on Dec 9, 2009 11:46 AM
    This is not "EVENT" .. it is "EVENTS"

  • Ask result sql trace events 10046 level 8 and 12

    hi all, i read result of sql trace events 10046 level 8 on
    http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php#trace_example
    and I do sql trace event 10046 level 8 or 12. But the results did not same, execution plan does not appear
    how to have execution plan appears??

    We use level 12 and we have both RSO (row source operation) and execution plan. Remember, execution plan is just the preditive estimate execution path by the opimizer. RSO is actually how the optimizer executes.
    ALTER SESSION SET EVENTS '10046 trace name context forever, level 12'
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.01 0.00 0 66 1 1
    total 3 0.02 0.01 0 66 1 1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 1767 (DELTEK) (recursive depth: 2)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=66 pr=0 pw=0 time=8793 us)
    4732 TABLE ACCESS SAMPLE Z_PJPCOMPR_UPSUM47 (cr=66 pr=0 pw=0 time=74 us)
    Rows Execution Plan
    0 SELECT STATEMENT MODE: HINT: ALL_ROWS
    1 SORT (AGGREGATE)
    4732 TABLE ACCESS (SAMPLE) OF 'Z_PJPCOMPR_UPSUM47' (TABLE)

  • Ability to perform ALTER SESSION SET SQL TRACE but not all alter clauses

    I see that in order to run the ALTER SESSION SET SQL TRACE command, the user should be explicitly granted alter session privilege as the CREATE SESSION privilege alone is not enough. Is there a way to grant the ability to perform ALTER SESSION SET SQL TRACE but not the other clauses such as GUARD, PARALLEL & RESUMABLE?.
    Thanks
    Sathya

    If you are using Oracle 10g and above, you can use DBMS_SESSION.session_trace_enable procedure,
    it doesn't require alter session system privilege.
    Simple example:
    SQL> connect test/test@//192.168.1.2:1521/xe
    Connected.
    SQL> alter session set tracefile_identifier='my_id';
    Session altered.
    SQL> alter session set sql_trace = true
      2  ;
    alter session set sql_trace = true
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL> execute dbms_session.session_trace_enable;
    PL/SQL procedure successfully completed.
    SQL> select * from user_sys_privs;
    USERNAME                 PRIVILEGE                    ADM
    TEST                      CREATE PROCEDURE                NO
    TEST                      CREATE TABLE                    NO
    TEST                      CREATE SEQUENCE                    NO
    TEST                      CREATE TRIGGER                    NO
    TEST                      SELECT ANY DICTIONARY               NO
    TEST                      CREATE SYNONYM                    NO
    TEST                      UNLIMITED TABLESPACE               NO
    7 rows selected.
    SQL> execute dbms_session.session_trace_disable;
    PL/SQL procedure successfully completed.
    SQL> disconnect
    Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Productionand here is result from tkprof:
    TKPROF: Release 10.2.0.1.0 - Production on So Paź 23 00:53:07 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: xe_ora_176_my_id.trc
    ( ---- cut ---- )
    select *
    from
    user_sys_privs
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.08       0.08          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.01       0.01          0         15          0           7
    total        4      0.09       0.09          0         15          0           7
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 61 
    Rows     Row Source Operation
          7  HASH GROUP BY (cr=15 pr=0 pw=0 time=11494 us)
          7   CONCATENATION  (cr=15 pr=0 pw=0 time=4913 us)
          0    MERGE JOIN CARTESIAN (cr=4 pr=0 pw=0 time=1169 us)
          0     NESTED LOOPS  (cr=4 pr=0 pw=0 time=793 us)
          0      TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=592 us)
          0      INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=0 pr=0 pw=0 time=0 us)(object id 312)
          0     BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
          0      TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
          7    NESTED LOOPS  (cr=11 pr=0 pw=0 time=3429 us)
          9     HASH JOIN  (cr=9 pr=0 pw=0 time=2705 us)
          9      TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=512 us)
         63      TABLE ACCESS FULL USER$ (cr=5 pr=0 pw=0 time=914 us)
          7     INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=2 pr=0 pw=0 time=510 us)(object id 312)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2       20.64         20.65
    BEGIN dbms_session.session_trace_disable; END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.01       0.00          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 61 

Maybe you are looking for

  • Error(1200467) while running FR report.

    Hi, We are getting the below error just for one of the reports. Even the person with Admin acess is getting the below error *5200: Error executing query: [Thu Jul 12 11:42:03 2012]USNCPDHYPEDB1v/Asia_Pac/Asia_Pac//Error(1200467) Error executing formu

  • How to switch off the pop-up message in rspcm

    Hi there, Does anyone know how to switch off the pop-up message in rspcm? The monitoring user shouldn't get the pop-up below anymore: „Statusänderung des Requests – Sollen Folge-Events ausgelöst werden?“ The pop-up in english might be “status change

  • Invoices report that displays also the VAT number

    Hi I am looking for invoices report that displays also the customer/vendor name and its VAT registration number. The customer invoices are SD invoices (can be displayed using the FI) and the supplier invoices are MM or FI invoices. It is relevant for

  • Error in uploading file using webutil_file_transfer

    Hi, I am using webutil for a forms module which would upload the required file into the database using webutil_file_transfer.client_to_db_with_progress. I have made the necessary changes to the files webutil.cfg and formsweb.cfg as per the instructio

  • Help in script logic - problem in FOR loop

    Hi Experts, We are using BPC 7.5 SP08. I have written a FOR loop in script logic default.lgf which is as follows: *FOR %TIM_MEM%=%TIME_SET% *XDIM_MEMBERSET TIME =%TIM_MEM% *WHEN P_ACCT2 *IS "OSDU" REC(EXPRESSION=[P_ACCT2].[ASSTCAINVURO][P_ACCT2].[COG