Tkprof : 0  user  SQL statement in trace file

Hello!
Please explain , what is difference of tkprof-converting of user session trace file and an internal/background process ?
Get I message "0 user SQL statement in trace file" cause this difference?
In my target session I issued :
begin
sys.dbms_system.set_ev(...., .., 10046, 12, '');
end;
begin
sys.dbms_system.set_ev(..., .., 10053, 1, '');
end;
/Thanks and regards,
Pavel

Did you try to tkprof a 10053 trace ?
That is not going to show anything. 10053 traces are meant to be read as they are. tkprof is there to deal with 10046 traces.

Similar Messages

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • How to audit alter user sql statements in Oracle 11g.

    I want to audit all the alter user sql statements that show who is altered with what sql stment including the connections performed by sys and system.
    Ex: If I use the command : alter user xxx quota 50 GB on users;
    Then how can i grab this sql stement and who performed it with the timings.

    Pl post OS and database versions.
    What have you learned from the documentation ?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_4007.htm#SQLRF01107
    http://download.oracle.com/docs/cd/E11882_01/network.112/e16543/guidelines.htm#DBSEG508
    What have you tried to implement so far ?
    HTH
    Srini

  • How to monitor user logs,security logs,trace file,and performance monitori

    Hi guys,
    pls tel me how to monitor user logs,security logs,trace file,and performance monitoring.
    thanks
    regards
    kamal

    Hi,
    you can have a look in the Netweaver administration :
    http://<portal>:<port>/nwa
    Go to monitoring, Java system reports, etc..., you will find what you want.
    Fabien.

  • Run sql statement from batch file

    How can we execute SQL Statement using Batch file???
    I did a test.
    create batch file test.bat
    sqlplus "username@db /pass" @\script.sql
    script.sql file has following statement
    select sysdate from dual;
    exit
    it is working but I want to call sql statement in the same batch file instead of calling .sql script file. how can I do that any idea..

    This is very easy in unix shell scripting, but AFAIK, not available with Windows. It's a function of how the shell/command processor handles input redirection.

  • Tkprof list each sql statement

    I think I registered this question once, but I cannot find it now so I'll do it again.
    I have a 10046 trace with a statement executed twice in the same session (same bind values) . I have different plans for each execution
    When formatting the sql is showed once.
    I wonder if I can make tkprof list each single execution individually, I checked the aggregate function but if I understand it
    correct it only divides sql based on users.
    Anyone who knows a tool that can do what I want or if I can do this with tkprof.
    Version is 11.2.0.3
    Appreciate your feedback.
    Thanks
    Magnus

    Hi Magnus,
    a SQL profiler can just use and interpret the traced information. In your case you have captured the following "As of 11.1 an execution plan is written to the trace file only after the first execution of every cursor. The execution statistics associated to it are the ones of the first execution only.". TKPROF itself is also able to re-compile and show an execution plan for a SQL (if not captured at all), but this is faulty due to various feature / general limitations (e.g. cardinality feedback or the general limits).
    You need to use the following trace options, if you want both execution plans (for every execution) in the raw SQL trace file for further interpretation:
    SQL> exec DBMS_MONITOR.SESSION_TRACE_ENABLE(NULL,NULL,TRUE,TRUE,'ALL_EXECUTIONS');
    Regards
    Stefan

  • How to execute sql statement under bat file?

    I want to execute following statement
    C:\>sqlplus /nolog
    SQL> conn scott/tiger
    SQL> select * from tab;
    I know I can realize it as following test.bat and testdb.sql file
    test.bat is follows:
    sqlplus /nolog @testdb.sql
    testdb.sql is follows:
    conn scott/tiger
    select * from tab;
    Now I don't want to use sql file,I only want to use bat file,like follows:
    test.bat is follows:
    sqlplus /nolog
    conn scott/tiger
    select * from tab;
    when I run test.bat,I find only sqlplus /nolog statement execute,the other statements don't execute.
    1)I want to know whether there is a method to execute sql statement only by bat file without a sql file? How to realize it?
    2)If I call sql file,how to hide passord of user? Because I don't want to other persons know scott password,if I use conn scott/tiger in testdb.sql,other person can see testdb.sql and know the password. Is there a good method to avoid?
    Thanks!

    I'm running *NIX, but works the same on Windows
    bcm@bcm-laptop:~$ cat here.sh
    sqlplus dbadmin/admindb << EOF
    select count(*) from user_objects;
    exit
    EOF
    bcm@bcm-laptop:~$ sh here.sh
    SQL*Plus: Release 11.2.0.1.0 Production on Mon May 17 18:14:09 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
      COUNT(*)
          9
    SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    bcm@bcm-laptop:~$ Edited by: sb92075 on May 17, 2010 6:15 PM

  • How to store data into database by reading sql statements from text file

    how to write java program for storing data into database by reading sql statements from text file

    Step 1: Create a property file to add various queries.
    Step 2: Read the properties file using ResourceBundle
    Step 3: Use the jdbc to execute the query read from the property file.
    So in future if you need to change query no need do any modifications in java program. But depends on how you use the property file.

  • FDM-generated SQL statement in log file?

    Hello all, hopefully a simple question:
    When you perform an import using FDM, I know that behind the scenes a SQL SELECT statement is composed and executed against the database server. My question: is the actual SQL statement kept in a log somewhere (so that we can see it?) In our case it's an Oracle DB server and we're using the ERPI Adapter; not sure if that's relevant. We would like to grab that SQL statement and use it as a jumping-off point for some other things.
    Thanks in advance for anything you can offer.

    The SQL Statement is not written to the log for the adapter.  The only things that are logged are what show in the adapter log file if you enable loggin for the ERPi source adapter in the "Get Data" action.    

  • SQL statements in XML File

    Folks
    I need to separate SQL statements from Java Code, How do i put these SQL Statements in an XML file and how to access these SQL statements from a Java code,
    Any help with sample code is greatful,

    The use of entities as kstc_jyu may help. It really depends on how you design the XML vocabulary based on the expected usage (e.g., if the SQL statements change very often).
    Back to the original question, I am right to interpret "how to use SQL statements in XML ?" as how to design an XML vocabulary to store SQL statements?
    If not, you can simply use the scheme proposed by DrClap. Reading and extracting the SQL statement would be just as you would with any other XML document. Google for a Java XML tutorial.

  • Spooling Extracts from Multiple SQL statements in 1 File

    Hi all,
    I am trying to spool extract results of 3 separate SQL statements into one single file. I wrote a SQL block similar to the one below. However, the result of the statements overwrite each other: 3 overwrote 2 and overwrote 1. Any suggestion how to combined there extracted results in one file?
    spool c:\test.txt
    <SQL statement 1>
    <SQL statement 2>
    <SQL statement 3>
    /spool OFF
    Thanks in advance
    Jason

    Please paste you SQL file here. These is no way one should overwrite another.
    Eric

  • Suppressing sql statement in spool file

    I am trying to run a report in sql and I am spooling the output to a file. I cannot seem to figure out what set command will suppress the sql statement.

    Hi,
    It is "set echo off"
    Deepak

  • No SQL text in trace file on NT4 client.

    I am getting a trace file back, but it has no SQL statments. i get connection msg(s), bytes to transport etc. etc. But no
    select, insert, update stmts.
    Here is my Sqlnet.ora file:
    # Filename......: sqlnet.ora
    # Name..........: tcp.db_ucu.com
    # Date..........: 20-JUN-96 11:28:08
    AUTOMATIC_IPC = ON
    TRACE_LEVEL_CLIENT = ADMIN
    SQLNET.EXPIRE_TIME = 0
    NAMES.DEFAULT_DOMAIN = db_ucu.com
    NAME.DEFAULT_ZONE = db_ucu.com
    SQLNET.CRYPTO_SEED = "19243487011925150191"
    NAMES.DIRECTORY_PATH = (TNSNAMES)
    trace_directory_client = c:\orant\network\admin
    trace_file_client = ora_sql.txt
    Any one run into this before, i would appreciate a reply. Thanks!
    null

    OK. You don't want to be playing around in your sqlnet file to generate an ODBC trace file. If you open the ODBC Data Source Administrator, you can turn on ODBC tracing. This will generate a log file that contains all the ODBC calls that are being made as well as the arguments.
    Justin

  • Load sql statement in .bat file

    Hi
    I need to execute a simple sql command eg: +"truncate table tab1"+ from a DOS batch file...
    my bat file contains following statement
    sqlplus dilanjan/dilanjan@XE @trun.sql
    my trun.sql file contains following statement
    truncate tabe base
    once I save the .bat file and double click it. It connects to database but the table is not getting truncated...
    Some one please help me with this!

    What does your screen output show you.
    Did you try to execute the statement in the batch file manually?
    Are the files in the same directory?
    Please post some screen output
    Thanks
    FJFranken

  • Correct the PL/SQL statement to open file in MS Word?

    Hi Friends,
    I use this command in when button press trigger , to open the MS Word file. But it gives some compilation errors.
    word.fileopen (oshook.filespec('c:\user1.rtf'));
    kindly solve this problem on urgent.
    Best regards,
    Shahzad

    This works for me on Forms v6:
    out_file := "your_file_pathname"
    -- Call Word to edit the new document output.
    host ('c:\program files\microsoft office\office\winword.exe '||out_file);

Maybe you are looking for