Purge Sql history from sql workshop

in APEX decelopment-->SQL Workshops--> sql commands
you can execute sql commands.
is there a way to purge the history?

Hi,
Instance admin can do that
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35129/adm_mg_service_set.htm#sthref329
Regards,
Jari

Similar Messages

  • Extract SQL history from 10046 trace files

    Hi all,
    I need to extract the complete sql history from sql trace files to "debug" a client application.
    I know I can read the raw trc file and rebuild the sql history looking for the PARSING / EXEC / FETCH entries.
    However, this is a very long and boring manual task: do you know if there is some free tool to automate this task?
    thanks
    Andrea

    user585511 wrote:
    I agree that the 10046 trace captures everything. If I do read the raw trc file I see the DML. The problem is that tkprof's record does not record the DML (maybe it thinks that some DML is recursive sql and it gets misleaded... I am not sure) so I am looking for an alternate tool to process 10046 trace files
    Regards
    AndreaReally?
    Generate a trace of some dml:
    oracle:orcl$
    oracle:orcl$ sqlplus /nolog
    SQL*Plus: Release 11.2.0.1.0 Production on Thu May 16 08:28:55 2013
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    SQL> conn snuffy/snuffy
    Connected.
    SQL> alter session set tracefile_identifier = "snuffy_session";
    Session altered.
    SQL> alter session set events '10046 trace name context forever, level 12';
    Session altered.
    SQL> insert into mytest values (sysdate);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> ALTER SESSION SET EVENTS '10046 trace name context off';
    Session altered.
    SQL> exitrun tkprof on the trace
    oracle:orcl$ ls -l $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/*snuffy
    *.trc
    -rw-r----- 1 oracle asmadmin 3038 May 16 08:29 /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4086_snuffy_session.trc
    oracle:orcl$ tkprof /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4086_snu
    ffy_session.trc snuffy.rpt waits=YES sys=NO explain=system/halftrack
    TKPROF: Release 11.2.0.1.0 - Development on Thu May 16 08:31:32 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Look at the report:
    oracle:orcl$ cat snuffy.rpt
    TKPROF: Release 11.2.0.1.0 - Development on Thu May 16 08:31:32 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Trace file: /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4086_snuffy_session.trc
    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
    SQL ID: 938dgt554gu98
    Plan Hash: 0
    insert into mytest           <<<<<<<<<<<<<<<< oh my!  Here is the insert statement
    values
    (sysdate)
    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          1          5           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          1          5           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 86  (SNUFFY)
    Rows     Row Source Operation
          0  LOAD TABLE CONVENTIONAL  (cr=1 pr=0 pw=0 time=0 us)
    error during execute of EXPLAIN PLAN statement
    ORA-00942: table or view does not exist
    parse error offset: 83
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        3.35          3.35
    SQL ID: 23wm3kz7rps5y
    Plan Hash: 0
    commit
    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          1           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          1           0
    Misses in library cache during parse: 0
    Parsing user id: 86  (SNUFFY)
    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        4.72          8.50
      log file sync                                   1        0.00          0.00
    SQL ID: 0kjg1c2g4gdcr
    Plan Hash: 0
    ALTER SESSION SET EVENTS '10046 trace name context off'
    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        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Parsing user id: 86  (SNUFFY)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.00       0.00          0          0          0           0
    Execute      3      0.00       0.00          0          1          6           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        6      0.00       0.00          0          1          6           1
    Misses in library cache during parse: 0
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       3        0.00          0.00
      SQL*Net message from client                     3        4.72         11.86
      log file sync                                   1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      0      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        0      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
        3  user  SQL statements in session.
        0  internal SQL statements in session.
        3  SQL statements in session.
        0  statements EXPLAINed in this session.
    Trace file: /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4086_snuffy_session.trc
    Trace file compatibility: 11.1.0.7
    Sort options: default
           1  session in tracefile.
           3  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           3  SQL statements in trace file.
           3  unique SQL statements in trace file.
          58  lines in trace file.
           8  elapsed seconds in trace file.
    oracle:orcl$

  • SQL History from Entreprise Manager

    Hi Experts i need your help.. actullay i need SQL Text that is executed by DB User . i wan to know how to get SQL text history from Enterprise Manager .. my DB Version is 10gr2(10.2.0.4).
    regards,

    Duplicate thread!
    SQL History from Enterprise Manager

  • Help with translating SQL query from SQL Server syntax to Oracle syntax

    Hi,
    is it someone that can help me translate following SQL query from SQL Server syntax to Oracle syntax.
    SELECT ID,
    [LMT(MTR)] = MAX(case when TYPE = 'LMT' then VALUE end),
    [AAD(KGM)] = MAX(case when TYPE = 'AAD' then VALUE end),
    [VOL(MTQ)] = MAX(case when TYPE = 'VOL' then VALUE end)
    FROM yourtable
    GROUP BY ID
    Your help is highly appreciated, thanks in advance.

    Like this,
    SELECT ID,
    MAX(case when TYPE = 'LMT' then VALUE end) LMT_MTR,
    MAX(case when TYPE = 'AAD' then VALUE end) AAD_KGM ,
    MAX(case when TYPE = 'VOL' then VALUE end) VOL_MTQ
    FROM yourtable
    GROUP BY ID-Arun

  • Need command to run sql script from sql prompt

    Hi,
    I am beginner in sql i need a command to run sql file from sql prompt.In notepad i have write 10 to 15 tables creation and saved as .sql i want to run this file from sql promp pls some one help.I am very great full to all users in this forum.

    You can also use the 'start' command.
    You may also want to look in the SQLPlus User Guide and Reference (for your release) at the set command for commands to set the number of lines per page, turn headings on or off, and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
    HTH -- Mark D Powell --

  • SQL History from Enterprise Manager

    Hi Experts i need your help.. actullay i need SQL Text that is executed by DB User . i wan to know how to get SQL text history from Enterprise Manager .. my DB Version is 10gr2(10.2.0.4).
    regards,

    ok ..thanx .. can i view all historical SQL Text that is executed by a perticuler User say SCOTT.??? In the same page within SQL DETAIL you can find task owner also,

  • SCSM object history from sql cmdb

    HI.
    In this post explain how to accessing object history programmatically using the SDK  http://blogs.technet.com/b/servicemanager/archive/2011/09/16/accessing-object-history-programmatically-using-the-sdk.aspx
    I try to do this from sql query. And get trouble. Can you help me?

    You cannot write a single query to get the history of all the CIs. You have to decide which CIs you want to track as each CI has its own table and columns. They all derive from System.ConfigItem but it is a abstract class so there is no table for it.
    For example: If you want to write a report to capture the history of all Computer CIs, the tables you will be interested in will be MT_Computer, MT_Computer_Log. Then you have to compare Pre and Post columns.
    To capture what kind of change, you need to query EntityChangeLog table.
    Here is the good article that may be able to help you:
    http://www.concurrency.com/blog/service-manager-useful-queries-entity-change-log/

  • Migration issue in SQL Developer (from SQL Server to Oracle)

    Dear All,
    I am using SQL Developer 3.0 to migrate data from SQL Server 2008 to Oracle 11gR2. I used Quick Migration Wizard for migrating and everything was Ok but when it was running migration process, I got this message: “Migration actions have failed. Check the migration reports for details. : null”
    But there was not any report to check. Does anyone know how I can do it without any problem?
    Thanks in advance.

    I am working on a project to migrate from SQL Server 2008 to Oracle 11gR2. It includes some tables, views, indexes, triggers and store procedures. At first I worked on SQL Developer 2.1.1.64 but it doesn’t support SQL Server 2008 (I had to use SQL Server 2005 in its offline options). I got a lot of error when I used the offline options. I know that I may be having some problem in table or view definition in my SQL Server but if I don’t have any log file I can’t solve them.
    Unfortunately, in SQL Developer 3.0 there isn’t any option to generate a SQL comments from objects (convert to Oracle) because I need to rewrite comments if they have problem. For example I have a filed named USER that it’s a reserved word in Oracle so I have to change this field name.
    I also can’t use “Translation Scratch Editor” because it has some error to convert. For example when I use it for the following code:
    CREATE TABLE [dbo].[Table1](
         [ID1] [int] IDENTITY(1,1) NOT NULL,
         [Name1] [varchar](50) NULL,
         CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED
         [ID1] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    CREATE TABLE [dbo].[Table2](
         [ID2] [int] IDENTITY(1,1) NOT NULL,
    [Name1] [varchar](50) NULL,
         CONSTRAINT [PK_Table2] PRIMARY KEY CLUSTERED
         [ID2] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    I receive a wrong code like this:
    CREATE SEQUENCE Table1_ID1
    START WITH 1
    INCREMENT BY 1;
    CREATE TABLE Table1
    ID1 NUMBER(10,0) NOT NULL,
    Name1 VARCHAR2(50) ,
    CONSTRAINT PK_Table1 PRIMARY KEY( ID1 )
    CREATE OR REPLACE TRIGGER Table1_ID1_TRG
    BEFORE INSERT
    ON Table1
    FOR EACH ROW
    BEGIN
    SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
    FROM DUAL;
    END;
    CREATE SEQUENCE Table1_ID1
    START WITH 1
    INCREMENT BY 1;
    CREATE SEQUENCE Table2_ID2
    START WITH 1
    INCREMENT BY 1;
    CREATE TABLE Table2
    ID2 NUMBER(10,0) NOT NULL,
    Name1 VARCHAR2(50) ,
    CONSTRAINT PK_Table2 PRIMARY KEY( ID2 )
    CREATE OR REPLACE TRIGGER Table1_ID1_TRG
    BEFORE INSERT
    ON Table1
    FOR EACH ROW
    BEGIN
    SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
    FROM DUAL;
    ENDCREATE OR REPLACE TRIGGER Table2_ID2_TRG
    BEFORE INSERT
    ON Table2
    FOR EACH ROW
    BEGIN
    SELECT Table2_ID2.NEXTVAL INTO :NEW.ID2
    FROM DUAL;
    END;

  • Calling SQL Loader from SQL Plus

    Hi everyone,
    I currently use both SQL Loader and SQL Plus to load data and to then carry out certain DML tasks and to reinstate indexes. That all works fine but of course I need to be present to start and to monitor the various scripts.
    What I would really like to do is to be able to incorporate the calls to SQL-Loader into my SQL-Plus scripts and am wondering if this is possible.
    At the moment I run some parts of the load in 'batch' (i.e. command line calls to SQL-Loader and to SQL-Plus) but this won't work for the whole load because the batch calls (from Windows) are not able to wait for particular processes to finish before they start the next. This works OK for the SQL-Loader scripts (because they can run in parallel) but will not work for the whole load because the load needs to be finished before the further processing starts.
    Or maybe there is a way (Windows .BAT files?) to set up batch processes which are intelligent enough to wait for one action to finish before starting the next action.
    Any thoughts or any links to HOWTOs on this would be a great help.
    Regards and thanks,
    Alan Searle

    Hi Alan,
    In SQL*Plus you have the HOST command.
    I would go for the .bat solution using [START /WAIT|http://www.computerhope.com/starthlp.htm]
    Regards
    Peter

  • Tuning: how distinguish PL/SQL timings from SQL in trace and/or tkprof output?

    Hi,
    we have a performance problem with one of our customer's databases and are trying to tune it out.
    The activity in question is a long-running PL/SQL stored procedure operating more-or-less in batch mode, calling many sub-procedures along the way. The PL/SQL code has been instrumented to take timings of execution of different operations, and we are running with tracing on, and analyzing the trace output using TKPROF.
    Oddly, even though we are running through 70+ pages of PL/SQL code, with bulk-collect into large tables and nesting of SQL in other SQL cursor loops, TKPROF is reporting SQL times which account for nearly all the elapsed time reported by our log messages. I mean, we're talking within one or two percent of elapsed time.
    How can I distinguish the time spent in PL/SQL operations from the time doing an execute or a fetch in SQL? Should I just believe TKPROF when it says all the time is going into SQL?
    Thanks in advance...

    A common problem with Oracle timings is the granularity of the clock can give misleading results when viewed over many itterations. That might not be your issue but it's worth noting. I would suggest you use DBMS_PROFILER if you want to get a more accurate picture of your codes performance. In most PL/SQL processes, the SQL will account for the vast majority of the processing time (maybe even 95%+). You really have to be doing some intense string or analytical processing for that percentage to change much.
    Richard

  • Connecting to network SQL Server from SQL Developer

    Hi All,
    I am trying to connect to network SQL Server from SQLDeveloper but I am unable to connect( I am getting could not connect to SQL Server...). I have searched many sites but could not find the solution. I am giving HostName as MachineName\InstanceName and keeping the port as 1433.
    Can anyone explain how that connection string should be given.
    Thanks.

    From help with additional comments
    Host Name: Host system for the Microsoft SQL Server or Sybase Adaptive Server database.
    E.g., sybase.myCompany.org (DNS name or IP address)
    Port: TCP/IP Port on which Microsoft SQL Server or Sybase Adaptive Server will listen.
    As mentioned by others, need to know how server is configured. Common values: 1433, 5000
    Retrieve Database: Name of the Microsoft SQL Server or Sybase Adaptive Server database.
    Once the other data is correct, press this to populate list box and select which database you want associated with this connection. E.g., pixar, pubs2, etc.
    Brian Jeffries
    SQL Developer Team

  • Restoration at sql 2005 from sql 2000 backup.

    Hi experts,
    Is it possible to restore a backup taken from sql 2000 database to sql 2005 database?
    And how about attaching datafiles of sql2000 into sql 2005 server?
    Thanks and Regards,
    Amit Jana.

    > Is it possible to restore a backup taken from sql 2000 database to sql 2005 database?
    Yes its possible.
    > And how about attaching datafiles of sql2000 into sql 2005 server?
    Same method of attach/deattach.
    But recommanded you first install 2000 instance restore database and do inplace sql 2005 upgrade.
    Why you can't follow recommanded mothed ?
    Regards,
    Nikunj Thaker

  • Using SQL view From SQL Express in Flex

    Hello All ,  i am new at Flex and yet searching for a basic answere to even more basic question...
    i am currently looking for a way o extract and import SQL views from my SQL Express database ( on my local host) and present it with RIA on desktop, grpahs Charts etc.
    my question is, which way is the best to do so ? 
    need i to use Coldfusion For the Data ?  and then Flex3 For the design ( i.e Graphs)?
    or maybe using another ODBC program for XML file and then Connect it as Data Resource into the flex3 project
    as you must see , i am a bit confused....
    thanks in advance

    Hi,
             If you go for AIR you can directly connect to Database and you can get the data and can be shown graphically ,
             But if you Go for Webapplication(Flex ) then definately u should use some backend like CFC,PHP,JAVA,.Net............ in order to connect to DB and use Remote Objects/HttpService and show the Result Graphically..............

  • Cannot establish connection with SQL server from SQL developer

    Hi, I recently downloaded SQL Developer version 3.0.04 and am trying to establish a connection to a remote SQL server. The database was created on this server by someone who is no longer working on the project. I have been given the username, password and server name. Is there another piece of information I am missing? I keep receiving the error:
    Status: Failure-Test failed: IO Error: The Network Adapter could not establish the connection.

    Check out the SQL Server network configuration. When instances are used the port on which the SQL Server is listening on might be different. Use the networking utility from the SQL Server and check out the SQL Server network details.

  • SQL works from SQL*Plus command line but not as a DBMS_JOB submitted job

    Oracle 10g 10.2
    Got a procedure which does not run correctly as an Oracle job but runs fine as a SQL script.
    There are no Oracle errors (or any errors) of any kind when the job does not run fine – it just does not update any rows. But when run as a SQL script – the same way it is run as a job – then the rows are updated.
    Any ideas?

    Good stuff....
    See my replies to some of the questions in italics
    a) Different NLS settings => The job uses the NLS settings of the session that created it. If you create it with some tool like TOAD, you might have a different environment than with sql*plus. Runs good in TOAD and SQL*Plus using the command-line feature - just 'acts funky' when submitted.
    b) Interval issue. Are you sure the job was running? Isn't still running? The job runs successfully - even logs a successful message in our logging table.
    c) User/priviledge issue. Sometimes a job needs direct grants whereus a procedure can be called with priviledges granted through roles. Don't know - need to check this out.
    d) Transaction handling / Error Handling. The job runs into some error, but the error is supressed, because of bad exception handling. What is the value in the BROKEN column, when you do: select * from user_jobs; I would think that, since the errors are logged into a side table, an error would be found there. However, no errors are found. The BROKEN column is 'N'.

Maybe you are looking for

  • How do I prevent lost devices tabs from appearing in sync drawer?

    Hi, Linked Firefox Sync accounts that are no longer in use--or useable--still appear in the synced tabs drawer in Firefox for Android as different groups of tabs under corresponding device names. This is despite trying to fix the issue by changing th

  • Performa 6300CD - Which Monitor Adapter?

    A friend has a Mac Performa 6300CD with the stock Apple monitor that came with it. The monitor is starting to go, and he wants to connect a generic monitor. Does anyone know what type of adapter he would need? Thanks.

  • I cant open my account

    hi my friend have account is i cant open it and i send request to refer my password and skype send me the new password to sign in by them but when i signing in the system write to me my user or password wrong ! also i use the new password sent from y

  • Problem opening PDF from Google search

    Hi , I;m a newb to the  BB Torch 9810 and was wondering why , when I click on a link (Google search) , ffor a specific PDF file , my BB wants to save the file , rather than open it . How do I correct this problem , so the file will open and I won't b

  • How can I get visual notification for mail

    Hello, As Lion gives us a new and better mail software with a sound I would like to enquire how it would be possible to have an additional visual notification when an email is received. Many thanks Yair