SQL Trace for ODS Scripts

Hi,
How can I turn on SQL Tracing for ODS Transfer scripts?
Best regards,
Johan

Hi Johan,
If SAP Note 1289112 is not the case, please clarify what "ODS Transfer" means.
Regards,
Sergiy

Similar Messages

  • No insert Statements for EKKO EKPO in ST05 sql trace for transaction me21n

    No insert Statements for EKKO EKPO in ST05 sql trace for transaction me21n.
    IN ST05 I set a filter for ME21N and executed transaction to create a Purchase Order and then checked
    ST05 but there is  NO insert for EKKO or EKPO??
    How Do I find in which columns of EKKO and EKPO data is inserted in ST05?
    Edited by: DeepakNandikanti on Apr 28, 2010 8:27 AM

    Hi,
    I tried in my system and I can see INSERT statement on EKKO and EKPO tables. What exactly you are looking for? Some one else might have switched on the trace at the same time. Can you try again and see.
    ST05=>Switch on trace
    ME21N=>Create PO.
    ST05=>Switch off and display trace.
    In trace list search for EKKO and EKPO.
    Column names are not shown in the trace list. It is the SQL trace and column list is generated dynamically like :A0, :A1....
    @ Suhas,
    That might be because the tables are updated via BAPIs ... Do you think SAP uses direct update statements on the DB tables ??
    I didn't get above statement. Is there any other way of updation that happens when using BAPI? I believe that, even in case of BAPI there will be update task FMs called during database update. Please correct if i got it wrong.
    Thanks,
    Vinod.

  • SQL trace for Background jobs

    Hi
    Can anyone suggest how to find the SQL trace for background jobs.
    Thanks in advance.
    Regards
    D.Vadivukkarasi

    Hi
    Check the transaction ST05.
    Plz Reward Points if helpful

  • Automize SQL TRACE for a selected session

    Hi,
    Should I automize the process of SQL Tracing for a particular session of our choice?
    Let’s say when there are several sessions, and we want to select the particular session for SQL TRACING, then the SQL tracing for that session enable via running a routine.
    I used AFTER LOGON trigger for enabling SQL trace, but using this approach enable SQL TRACING all the sessions.
    My Logon Trigger for enabling SQL Tracing:
    create or replace trigger LOGON_SQL_TRACE
    after logon on database
    begin
    execute immediate
    'alter session set sql_trace=true';
    end;
    I want to use a perfect routine that first get the sid, serial# or username etc. from V$session, V$process or else, and then enable the SQL TRACING for the selected session.
    Like SYS.DBMS.SYSTEM.SET_SQL_TRACE_IN_SESSION package is available for doing that or may be some others as well.
    But how should we use these packages or other SQL tracing commands in a routine, which we can use for, enable SQL Tracing implicitly.
    Any ideas will be great.
    Bill

    SYS.DBMS.SYSTEM.SET_SQL_TRACE_IN_SESSION is just fine.
    You can get the SID and SERIAL# from v$session; you just have to know the username, osmachine, the OS process, ...
    Fred

  • SQL Trace for schema level

    Hi
    Database 10.1.0.4
    Sql trace file which I have used but didn't get the trace file. I have tried to get per session Id but not able to get the trace file, when ever user logged into application, virtually 6 user get lgged in and you never know about user. So I have desided to capture for schema
    I have used this for tracing
    SQL> ALTER SESSION SET sql_trace=TRUE;
    SQL> ALTER SESSION SET sql_trace=FALSE;
    Or
    SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => TRUE);
    SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => FALSE);
    or
    SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>TRUE);
    SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>FALSE);
    I want to get trace file for schema, can anyone suggest how do I get trace file at schema level.
    Thanks for help

    Hi,
    Using instance-level tracing by setting the init.ora/spfile... parameter SQL_TRACE=TRUE, all processes against the instance will create their own trace files. This particular method of tracing should be used with care since it creates a great deal of overhead against the system. In addition, the default value for this parameter is FALSE.
    Cheers
    Legatti

  • SQL TRACE FOR THIRD PART TOOL

    Hi,
    Should we use the Logon trigger for SQL TRACING,for the third party tool?
    How should we manage SQL tracing and then read this trace file using
    TKPROF for that specific session that is using the third party tool?
    I wanted that whenever this third party tool connect to database with any user, the sql tracing will start for that specific seesion and then read the sqltrace for that session using TKPROF.
    Any ideas/exmp will be great.
    Regards
    CLEE

    Should we use the Logon trigger for SQL TRACING,for the third party tool?
    Yes you can use like
    CREATE OR REPLACE TRIGGER af_sess_Logon
    After logon on database
    Begin
    if ( user='SCOTT') then
    execute immediate 'alter session set sql_trace=true';
    End if;
    End;
    sql tracing will start for that specific seesion and then read the sqltrace for that session using TKPROF.
    for tkprof you can user command line
    or use host in sql
    kuljeet pal singh

  • 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

  • Help in sql trace for vf03

    Hi,
      i was tracing the sql statments present in vf03 transaction for the invoice no.'s with accounting document over all status as not clear.
    i want to know the flow of the sql statements right from the user giving the invoice no. as input to the document flow window to know from where and how it is picking the accounting doucment over all processing status
    waiting for ur replies
    regards,
    maqsood

    Hi
    You should look at the code of std fm RV_ORDER_FLOW_INFORMATION, here you can see all selects the system does.
    Anyway the tables are VBFA (document flow), VBUK and VBUP. But you can't find that information here, because it's only in accounting not in sales.
    So perhaps the abap code you're looking for it's this:
    if vbrk-vbeln <> vbfa_tab-vbeln.
        perform vbrk_ermitteln using vbfa_tab-vbeln.
        check sy-subrc = 0.
        check xvbrk-rfbsk = 'C' or  xvbrk-rfbsk = 'J'.
        read table xdoc_num with key vbeln = vbfa_tab-vbeln
                            binary search.
        tabix_xdoc = sy-tabix.
        if sy-subrc = 0.
          check xdoc_num-not_found is initial.
        else.
          refresh xbkpf.
          call function 'FI_DOCUMENT_READ'
               exporting
                    i_awtyp     = 'VBRK'
                    i_awref     = vbfa_tab-vbeln
                    i_awsys     = vbrk-logsys
                    i_bukrs     = vbrk-bukrs
                    i_gjahr     = vbrk-gjahr
               tables
                    t_bkpf      = xbkpf
                    t_bseg      = xbseg
               exceptions
                    wrong_input = 1
                    not_found   = 2.
          describe table xbkpf lines sy-tabix.
          if sy-tabix ne 0.
    Delete documents from other fiscal year
            if sy-tabix > 1.
              CALL FUNCTION 'FI_PERIOD_DETERMINE'
                EXPORTING
                  i_budat        = vbrk-fkdat
                  i_bukrs        = vbrk-bukrs
                IMPORTING
                  e_gjahr        = da_gjahr
                  e_poper        = da_poper
                EXCEPTIONS
                  fiscal_year    = 1
                  period         = 2
                  period_version = 3
                  posting_period = 4
                  special_period = 5
                  version        = 6
                  posting_date   = 7
                  OTHERS         = 8.
              IF sy-subrc = 0.
                CONCATENATE da_gjahr da_poper INTO vbrk-gjahr.
              loop at xbkpf where gjahr ne vbrk-gjahr.
                delete xbkpf index sy-tabix.
              endloop.
              ENDIF.
            endif.
            loop at xbkpf.
              clear l_xdoc_num-status.
              move 'BKPF'      to l_xdoc_num-awtyp.
              move xbkpf-bukrs to l_xdoc_num-bukrs.
              move xbkpf-belnr to l_xdoc_num-docnr.
              move xbkpf-cpudt to l_xdoc_num-cpudt.
              move xbkpf-gjahr to l_xdoc_num-gjahr.
              l_xdoc_num-vbeln = vbfa_tab-vbeln.
              l_xdoc_num-logsys = vbrk-logsys.
              clear l_xdoc_num-not_found.
              loop at xbseg where bukrs eq xbkpf-bukrs
                            and   belnr eq xbkpf-belnr
                            and   gjahr eq xbkpf-gjahr
                            and   ( koart eq 'D' or koart eq 'K' ).
              endloop.
              if sy-subrc ne 0.
                l_xdoc_num-status = 'C'.
              else.
                loop at xbseg where not augbl is initial
                              and   ( koart eq 'D' or koart eq 'K' ).
                endloop.
                if not sy-subrc is initial.
      SET STATUS TO 'No items are cleared'
                  l_xdoc_num-status = 'A'.
                else.
                  loop at xbseg where augbl is initial
                                and   umskz ne 'A'
                                and   vorgn ne 'AZUM'
                                and   ( koart eq 'D' or koart eq 'K' ).
                  endloop.
                  if not sy-subrc is initial.
      Set status to 'All items are cleared'
                    l_xdoc_num-status = 'C'.
                  endif.
                endif.
    Otherwise: If there are customer/vendor positions where AUGBL is
    filled and some other ones where AUGBL is blank then set status
    to 'Partially cleared'
                if l_xdoc_num-status is initial.
                  l_xdoc_num-status = 'B'.
                endif.
              endif.
              append l_xdoc_num.
            endloop.
            insert lines of l_xdoc_num into xdoc_num index tabix_xdoc.
    This is extracted from include LV05CF01
    Max

  • Sql trace for forms sessions

    Q1.How can you trace the session of forms?

    c:\ifrun60 module=<formname> userid=scott/tiger
    statistics=yes
    This will do a alter session set sql_trace=true in the background.

  • How to set SQL trace in OCI session ?

    Hello,
    In a SQL*Plus session, I can use the SQL statement "alter session set sql_trace=true;" to set SQL trace in that session only. I assume I could execute the same SQL statement from C code in an OCI client and achieve the same goal.
    However, if I cannot change the code of this OCI client, is there a way to set SQL trace for that single session alone, without changing the C code? Say, through an environment variable, configuration file, etc.?
    Thanks.

    I am not aware of a way to selectively enable the server-side tracing without modifying the client code.
    There is client tracing available by setting the environment variable EVENT_10842 as follows:
    "server=<>;user=<>;stmt=<>;level=<>;interval=<>"
    e.g.
    setenv EVENT_10842 "server=inst1,inst2;user=scott,system;stmt=all;level=15"
    Where:
    "server" is a comma separated list or "all"
    "user" is a comma separated list or "all"
    "stmt" can be INSERT,UPDATE,DELETE,SELECT or "all"
    The following levels are supported:
    1 - Trace all server attach and server detach calls for servers listed in "server" attribute of the environment variable.
    2 - Trace all session begin, logon, session end, logoff calls for the users listed in "user" attribute of the environment variable.
    3 - Trace all prepare, execute, fetch calls for the specified statement types listed in "stmt" attribute of environment variable.
    4 - Trace all Bind, Define, Describe calls.
    5 - Trace all OCI LOB calls
    7 - Get statistical info on all connection pooling /connection related calls
    8 - Get statistical info on all session info
    9 - Get statistical info on all handle info
    10 - Get statistical info on time taken in execute and fetch calls
    11 - Get statistical info on transaction related calls
    15 - Trace all calls with statistical info.

  • SQL Tracing for session started from Java code

    I am working with Oracle 10g on Solaris 9. I am facing a problem when trying to enable SQL Trace for Oracle sessions initiated from Weblogic server. I am querring V$SESSION to get the SID and SERIAL# of those sessions and then using DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(<sid>, <serial#>, TRUE); from the SQLPlus (using sys login). But the trace file is not being generated in UDUMP even after some queries are fired from the application. But when I am using the same procedure to turn SQL Trace on for SQLPlus sessions or SQLDeveloper sessions, they are just working fine.
    Can anyone please help me out?

    Please help.....
    There is already a thread
    Problem with SQL_Trace for a Session
    but there is no solution there.

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

  • SQL Trace over JDBC

    I'm not sure if this is possible but I'm looking to retrieve a running total of the number of rows processed by the OLAP option without polling the "longops" dynamic management view. As such, is it possible to set a SQL Trace running but rather than spooling the results to a file, return them over the JDBC connection for the client application to interpret? (I am naturally assuming here that it is possible to get this "running information" from a SQL trace for a given session ID. If not, the question is moot I guess...
    I am using 11.1.0.7.0.
    Thanks for any help.

    Hi
      Whether if you use Sender or Receiver communication channel, SAP PI always open the connection to remote server. That is, SAP PI is always the component client, therefore the only thing you should to open is the MS SLQ port.
    Regards
    Ivá

  • How to SQL trace File in udump Folder

    Hi,
    I kept the Sql Trace for one database. Now i am getting the bulk of files in udump folder. I tryed the command
    ALTER SESSION SET SQL_TRACE=FALSE
    to stop the trace, but it is not stoping.
    Now my problem is how to stop this file load in to that folder.
    Thank u,

    hi,
    Thank u alok, Thank u very much. its working fine.
    U told first that it is my mistake of enabling in database level. What are the real commands to start the trace and stop the trace by that session. What the Oracle Books says is this commands i followed ( Book name --- ORACLE HIGH PERFORMANCE TUNING FOR 9i AND 10g BY GAVIN POWELL ) Page -- 339
    ALTER SESSION SET TIMED_STATISTICS = TRUE;
    ALTER SESSION SET TIMED_OS_STATISTICS = 5;
    ALTER SESSION SET MAX_DUMP_FILE_SIZE=1M;
    ALTER SESSION SET SQL_TRACE = TRUE;
    ALTER SESSION SET STATISTICS = ALL;
    This command i followed. This is for session only, then why this is happened in database level.
    Can u provide me the commands for start and stop the SQL TRACE.
    Thank u for ur reply.

  • Analysing details of SQL trace and runtime analysis for a report.

    Hi,
    I am trying to tune the performance of a Z ABAP report for target group export. A brief overview of what is done in the report is the retrieval of BP details present in the Target group including BP general, address, marketing attributes, person responsible and contact person details. As the target groups can be quite huge (around 6000 BPs), the report gives performance issues. I want to understand on how to analyse the details which I obtained from the run time analysis and SQL trace and on how to take it forward.
    Any inputs in this regard would be helpful.
    Thanks in advance,
    Anushree

    In Runtime analysis Look for
    ABAP -  In your ABAP code
    DATABASE  -  It shows the performance of your SELECT statements in your program.
    Just check how much % it is showing for both.
    Check for following in your code.
    1) Avoid SELECT *
    2) Clear internal tables values which are not required at the ending of program, as it saves memory
    etc.

Maybe you are looking for