BUG in purging sql history entries...

Hi folks,
I am using 1.5 and have been using also the versions before. Great that the sql-history window is dockable now, much more useful this way...But...
it is still totally ununderstanble to me, with wich rule entries in the sql-history are being purged. I just open the sqldev again, and see almost entries removed. When does that happen, is it possible to configure this setting?

Hi guys,
yes, I mean an arbitrary purge. Like, you finish your job for today, close sqldev, go home, come back the next day and only 4 or 5 entries of the log are still there... (???)
No problem, I have full understanding for an algorithm for purging entries older than two or four days, or something similar. But until now, there was no repliccable rule in that process!
By the way, I cannot find a sqlhistory.xml in my install-directory...

Similar Messages

  • 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

  • 30EA2: Hangs on opening SQL History

    Hi,
    After EA1's pretty strong performance impact regarding SQL History, I was hoping for improvement in EA2.
    However, after installing, migrating from 2.1.1, and setting preferences, I connected and selected the SQL History entry from the Edit menu. Then sqldev just hung with 50% CPU use (distributed over both cores), and never came back. After almost an hour I just killed it.
    Right now I'm trying again; I just ran sqldev, and selected the SQL History entry from the Edit menu.
    What's happening? Here's a dump if it helps:
    Full thread dump Java HotSpot(TM) Client VM (14.2-b01 mixed mode):
    "Checkpointer" daemon prio=6 tid=0x06ee8c00 nid=0x16a0 in Object.wait() [0x0ea8f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:152)
            - locked <0x15bc0f80> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "INCompressor" daemon prio=6 tid=0x06deb400 nid=0xa3c in Object.wait() [0x0e98f000]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:154)
            - locked <0x15bc1070> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "pool-4-thread-1" prio=6 tid=0x06697400 nid=0x17a0 waiting on condition [0x0e88f000]
       java.lang.Thread.State: TIMED_WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x1584df78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
            at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "Timer queue for AWT thread" daemon prio=6 tid=0x06e8cc00 nid=0xd30 in Object.wait() [0x0614f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a580> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "Timer queue for AWT thread" daemon prio=6 tid=0x0687d400 nid=0x11fc in Object.wait() [0x05a4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a628> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "Timer queue for AWT thread" daemon prio=6 tid=0x0668d800 nid=0x1418 in Object.wait() [0x0560f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a6d0> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "IconOverlayTracker Timer" prio=6 tid=0x06ab4000 nid=0xe3c in Object.wait() [0x0773f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x14388ca8> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "Timer queue for AWT thread" daemon prio=6 tid=0x06a3f400 nid=0x1464 in Object.wait() [0x0634f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1424e478> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "WaitCursor-Timer" prio=6 tid=0x069dd400 nid=0x171c in Object.wait() [0x0604f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x14226650> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "BaseTreeExplorer.NodeOpeningExecutor" prio=6 tid=0x068ef800 nid=0x1354 waiting on condition [0x05e4f000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x13d92780> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
            at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "pool-2-thread-1" prio=6 tid=0x068f4c00 nid=0x11d0 waiting on condition [0x05d4f000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x13dbd6b8> (a java.util.concurrent.SynchronousQueue$TransferStack)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
            at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
            at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "Scheduler" daemon prio=6 tid=0x06944000 nid=0x378 in Object.wait() [0x05c4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at oracle.dbtools.raptor.backgroundTask.TaskLinkedList.takeNextTask(TaskLinkedList.java:47)
            - locked <0x13d929b0> (a oracle.dbtools.raptor.backgroundTask.TaskLinkedList)
            at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$SchedulerThread.run(RaptorTaskManager.java:429)
    "Thread-6" daemon prio=6 tid=0x068cfc00 nid=0x15a4 in Object.wait() [0x05b4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x13d11a80> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13d11a80> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:65)
            at java.lang.Thread.run(Thread.java:619)
    "ChangeSetService" prio=2 tid=0x06939800 nid=0x10e8 in Object.wait() [0x0594f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x138a3b68> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
            at java.lang.Object.wait(Object.java:485)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.awaitEvents(ChangeSetService.java:178)
            - locked <0x138a3b68> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.eventLoop(ChangeSetService.java:199)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.access$200(ChangeSetService.java:56)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService$2.run(ChangeSetService.java:138)
            at java.lang.Thread.run(Thread.java:619)
    "TimerQueue" daemon prio=6 tid=0x04be3000 nid=0xb34 in Object.wait() [0x0405f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at javax.swing.TimerQueue.run(TimerQueue.java:236)
            - locked <0x13510120> (a javax.swing.TimerQueue)
            at java.lang.Thread.run(Thread.java:619)
    "TimedCache-Timer" daemon prio=6 tid=0x03bb0000 nid=0x12f4 in Object.wait() [0x0476f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x1320e058> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "JarIndex Timer" daemon prio=6 tid=0x03b8a400 nid=0x14f0 in Object.wait() [0x0426f000]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.util.TimerThread.mainLoop(Timer.java:509)
            - locked <0x13198070> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "AWT-EventQueue-0" prio=6 tid=0x03b0f800 nid=0x16cc runnable [0x0415f000]
       java.lang.Thread.State: RUNNABLE
            at com.sleepycat.util.UtfOps.getCharLength(UtfOps.java:139)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:259)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            at com.sleepycat.persist.impl.ComplexFormat.readObject(ComplexFormat.java:485)
            at com.sleepycat.persist.impl.PersistEntityBinding.readEntity(PersistEntityBinding.java:90)
            at com.sleepycat.persist.impl.PersistEntityBinding.entryToObject(PersistEntityBinding.java:60)
            at com.sleepycat.persist.EntityValueAdapter.entryToValue(EntityValueAdapter.java:56)
            at com.sleepycat.persist.BasicCursor.returnValue(BasicCursor.java:214)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.reallocateIndexes(SqlHistoryFilterModel.java:73)
            - locked <0x176fc820> (a oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$1)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.tableChanged(SqlHistoryFilterModel.java:86)
            at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
            at javax.swing.table.AbstractTableModel.fireTableDataChanged(AbstractTableModel.java:182)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2$1.run(HistoryDB2.java:72)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    "AWT-Windows" daemon prio=6 tid=0x03b3b000 nid=0x128c runnable [0x03f5f000]
       java.lang.Thread.State: RUNNABLE
            at sun.awt.windows.WToolkit.eventLoop(Native Method)
            at sun.awt.windows.WToolkit.run(WToolkit.java:291)
            at java.lang.Thread.run(Thread.java:619)
    "AWT-Shutdown" prio=6 tid=0x03b3a000 nid=0x1738 in Object.wait() [0x03e5f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
            - locked <0x13198278> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "Java2D Disposer" daemon prio=10 tid=0x03b30800 nid=0xfa0 in Object.wait() [0x03d5f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13198308> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at sun.java2d.Disposer.run(Disposer.java:125)
            at java.lang.Thread.run(Thread.java:619)
    "Low Memory Detector" daemon prio=6 tid=0x03151400 nid=0x16bc runnable [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=10 tid=0x0314b800 nid=0x1270 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=10 tid=0x0314a000 nid=0x5d4 runnable [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x03148c00 nid=0x1780 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x03139c00 nid=0x17b8 in Object.wait() [0x034bf000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13140298> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x03135000 nid=0x1048 in Object.wait() [0x033bf000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
            - locked <0x13140320> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x00c77800 nid=0x1208 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "VM Thread" prio=10 tid=0x03131000 nid=0x15c0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x0315bc00 nid=0x1140 waiting on condition
    JNI global references: 2778
    Heap
    def new generation   total 17792K, used 13245K [0x10010000, 0x11350000, 0x13140000)
      eden space 15872K,  80% used [0x10010000, 0x10c851f0, 0x10f90000)
      from space 1920K,  75% used [0x10f90000, 0x110fc180, 0x11170000)
      to   space 1920K,   0% used [0x11170000, 0x11170000, 0x11350000)
    tenured generation   total 235968K, used 147184K [0x13140000, 0x217b0000, 0x38010000)
       the space 235968K,  62% used [0x13140000, 0x1c0fc380, 0x1c0fc400, 0x217b0000)
    compacting perm gen  total 63744K, used 63628K [0x38010000, 0x3be50000, 0x40010000)
       the space 63744K,  99% used [0x38010000, 0x3be33278, 0x3be33400, 0x3be50000)
    No shared spaces configured.Hope that helps,
    K.
    [WinXp Sp3, JDK 1.6.0_16]

    I selectively deleted some filling insert scripts, still resulting in 2294 rows in 76431 lines, but dropping from 27066KB to 3254KB.
    Dumping from time to time, I see the thread still working, mostly as above:
            at com.sleepycat.util.UtfOps.getCharLength(UtfOps.java:139)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:259)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...but also:
            at java.util.Arrays.copyOfRange(Arrays.java:3209)
            at java.lang.String.<init>(String.java:215)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:262)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...and:
            at java.lang.Class.isAssignableFrom(Native Method)
            at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
            at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
            at java.lang.reflect.Field.set(Field.java:657)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...After about half an hour, the thread changed somewhat this (although shortly after the lines on top continued doing the same as above):
    "AWT-EventQueue-0" prio=6 tid=0x03b40c00 nid=0xc14 runnable [0x0415d000]
       java.lang.Thread.State: RUNNABLE
            at java.lang.Object.clone(Native Method)
            at com.sleepycat.je.dbi.CursorImpl.cloneCursor(CursorImpl.java:338)
            at com.sleepycat.je.dbi.CursorImpl.cloneCursor(CursorImpl.java:313)
            at com.sleepycat.je.Cursor.beginRead(Cursor.java:2395)
            at com.sleepycat.je.Cursor.retrieveNextAllowPhantoms(Cursor.java:2178)
            at com.sleepycat.je.Cursor.retrieveNext(Cursor.java:1992)
            at com.sleepycat.je.Cursor.getNext(Cursor.java:777)
            at com.sleepycat.util.keyrange.RangeCursor.doGetNext(RangeCursor.java:899)
            at com.sleepycat.util.keyrange.RangeCursor.getNext(RangeCursor.java:423)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.getValueAt(SqlHistoryFilterModel.java:103)
            at oracle.dbtools.raptor.utils.TableSorter$Row.compareTo(TableSorter.java:328)
            at java.util.Arrays.mergeSort(Arrays.java:1144)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.sort(Arrays.java:1079)
            at oracle.dbtools.raptor.utils.TableSorter.getViewToModel(TableSorter.java:260)
            at oracle.dbtools.raptor.utils.TableSorter.modelIndex(TableSorter.java:267)
            at oracle.dbtools.raptor.utils.TableSorter.getValueAt(TableSorter.java:304)
            at javax.swing.JTable.getValueAt(JTable.java:2695)
            at javax.swing.JTable.prepareRenderer(JTable.java:5712)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$6.prepareRenderer(SqlHistoryPanel.java:247)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
            at javax.swing.JComponent.paintComponent(JComponent.java:763)
            at javax.swing.JComponent.paint(JComponent.java:1029)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JViewport.paint(JViewport.java:747)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
            at javax.swing.JComponent.paint(JComponent.java:1015)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
            at java.awt.Container.paint(Container.java:1780)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
            at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)After about an hour in total, the UI got back, so I docked the pane and used the scroll bar to see if everything was there. About halfway, the UI froze again!
    Looking at the dump, it seems to start all over again:
            at java.util.Arrays.copyOfRange(Arrays.java:3209)
            at java.lang.String.<init>(String.java:215)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:262)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            at com.sleepycat.persist.impl.ComplexFormat.readObject(ComplexFormat.java:485)
            at com.sleepycat.persist.impl.PersistEntityBinding.readEntity(PersistEntityBinding.java:90)
            at com.sleepycat.persist.impl.PersistEntityBinding.entryToObject(PersistEntityBinding.java:60)
            at com.sleepycat.persist.EntityValueAdapter.entryToValue(EntityValueAdapter.java:56)
            at com.sleepycat.persist.BasicCursor.returnValue(BasicCursor.java:214)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.getValueAt(SqlHistoryFilterModel.java:103)
            at oracle.dbtools.raptor.utils.TableSorter.getValueAt(TableSorter.java:304)
            at javax.swing.JTable.getValueAt(JTable.java:2695)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$6.prepareRenderer(SqlHistoryPanel.java:257)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
            at javax.swing.JComponent.paintComponent(JComponent.java:763)
            at javax.swing.JComponent.paint(JComponent.java:1029)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a12d0> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JViewport.paint(JViewport.java:711)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
            at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1475)
            at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1406)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:294)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
            at javax.swing.JComponent.paintForceDoubleBuffered(JComponent.java:1065)
            at javax.swing.JViewport.paintView(JViewport.java:1642)
            at javax.swing.JViewport.windowBlitPaint(JViewport.java:1564)
            at javax.swing.JViewport.setViewPosition(JViewport.java:1118)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:1027)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1016)
            at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
            at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
            at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
            at javax.swing.JScrollBar.setValue(JScrollBar.java:446)
            at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.setValueFrom(BasicScrollBarUI.java:1220)
            at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.mouseDragged(BasicScrollBarUI.java:1162)
            at java.awt.Component.processMouseMotionEvent(Component.java:6311)
            at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
            at java.awt.Component.processEvent(Component.java:6032)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)After about 10 minutes I saw my processor use drop to normal, so I switched back to the UI, which made the CPU rise high again!
    Sorry guy, at this point I killed sqldev. I will skip further testing until EA3, in the hope that will address these issues.
    I regret so much the history mechanism has changed. Why on earth did you guys do so?
    Everything was so accessible and responsive... Now various users noted various problems.
    Haven't you heard of the golden rule: "don't change working code"?
    Why not take care of all recent issues and revert to as it was before?
    A deceived K.

  • SQL History - purged

    How does SQL Developer determine what SQL History records to retain or purge?
    Over time most of the history is purged. I do have a few history records from last Spring though.
    Why are some older history records saved and others purged?
    I'm using version 3.0.04.
    Todd

    Hi Todd,
    So I take it you already know about and use Tools|Preferences|Database|Worksheet|SQL History Limit, and your question pertains solely to the inner workings of respecting the history limit. It actually depends on the order java.io.File.list() retrieves the *history.xml files from (on WinXP) the C:\Documents and Settings\<user>\Application Data\SQL Developer\SqlHistory directory.
    If you have old history in ...\SQL Developer\SqlHistory.xml to migrate, that could also be a factor.
    Whenever the limit would be surpassed by adding new SQL (not already present in the list for the current connection), the entry at the end of list is removed and the associated xml file physically deleted from the directory. The new SQL is inserted at the top of the list and an associated xml file saved to the directory. If you execute enough new SQL during a session, all the old SQL will eventually get flushed out. So this means that, during a session, the replacement rule is LIFO on the loaded history then, if necessary, FIFO on new history.
    Other options to remove old SQL:
    1) Delete only the old *history.xml files (including any old SqlHistory.xml, if you have no pre-3.0 version that still relies on it).
    2) Set the SQL History Limit to a low value then, after some history gets purged, back to the higher value.
    Regards,
    Gary
    SQL Developer Team

  • Quantity of SQL History shrinking

    I've noticed since about Dec. 2006 or Jan. 2007 that the quantity of SQL History kept has varied greatly and generally shrunk. In the last five days it has shrunk from 21 days to 10 days. I currently only have 47 entries in SQL History. I estimate that I execute a minimum of 20 unique queries every business day, so a significant number of my queries over the last 10 days are missing from SQL History.
    In addition, today I'm noticing that I only have entries from a single database connection in SQL History. I have executed queries against two database connections today and at least 4 others over the last week. But only one of those database connections is reflected.
    I've counted the entries in "SqlHistory.xml" and it matches the number of entries I see in the SQL History dialog.
    Any ideas on what is happening to my SQL History? I am aware of the bug that can wipe out all of the SQL History prior to the time when a second instance of SQL Developer is opened. In this case though, I still have 10 days of history and history for all but one database connection is missing.
    SQL Developer 1.1.2.25
    Oracle 10g Enterprise Edition 10.2.0.2.0 - 64bit (all databases I access are the same version)
    Java 1.5.0_05
    Windows XP Pro SP2
    132gb free space on the drive which has both Windows installed and SQL Developer.
    Pentium 4 3GHz
    2GB Ram

    Bill,
    I assume this happened on htmldb.oracle.com. I bet one of our (necessary) cleanup jobs kicked in and purged some old statements.
    Sergio

  • SQL History and timestamp order

    Hi, I have SQL Developer 12.84 (4.0.0.12).
    Sql history forces MM/DD/RR format in Timestamp instead of NLS format: DD.MM.YYYY HH24:MI:SS.
    As a consequence the sort order fails.
    Played with  C:\Users\<user>\AppData\Roaming\SQL Developer\SqlHistory files but each new entry ignores manual date changes and writes timestamp in strange format.
    Any idea?

    Already identified by developer team as:
    Bug 17740406 - SQL HISTORY TIMESTAMP NOT SORTED AS DATE FOR NON-US LOCALES
    Info based on: https://forums.oracle.com/thread/2601066 (why new thread)
    This is important drawback in SQL Developer 4 for non US users. BTW, still not fixed in build 13.30 (4.0.0.13)

  • 30EA1 SQL History spikes cpu and hangs, un-usable

    app works fine until I open the sql history (F8) , cpu spikes and stays above 50% until I close history window. As soon as I close it, the app is responsive again.
    I have less than 1000 entries in the sql history window.
    Has anyone else experienced this?

    There have been performance issues associated with having the SQL History pane open (30EA1: SQL History performance so if you have that open, you could try with it closed. Maybe that is bug 10233068 that gggraham referred to, but I couldn't find another reference to that bug on the forum and it is not a published bug.

  • SQL Developer SQL History no longer working 3.2.20.09.87

    Hi guys, The SQL History (F8) option has started to no longer work within my copy of OSD.
    it was working at one point but has gone away.
    I have confirmed that "Enable Local History" is enabled and has been set for 30 days history and 50 max revisions
    I have confirmed that I still have a SqlHistory.xml file located in my user\operator\AppData\Roaming\SQL Developer\ directory with entries in it (6933 rows of data)
    This started to happen after I started to play with the Garbage Collection settings to reduce the memory footprint of OSD.
    I have since restored all of my backed up delivered settings, rebooted and the SQL History will not show up again.
    My snippets and custom reports are working and I can still see the log detail where I used to see log and sql history options at the bottom of OSD.
    I'm using Windows 7 and can provide an OSD dump if it helps.
    Thanks...
    Tom
    Edited by: ERPDude on Mar 6, 2013 10:03 AM

    Hi Tom,
    Be careful about which preference settings relate to the functionality in question.
    1. Tools > Preferences > Environment > Local History > Enable relates to a worksheet's History tab when you File > Open
    2. Tools > Preferences > Database > Worksheet > SQL History Limit relates to View > SQL History pane.
    You do not say how you backed up and restored your settings during all your experimentation, but let's assume whatever you did was valid. Whenever some UI component mysteriously disappears, one thing I always check (usually just delete) is the windowinglayout.xml in system3.2.20.09.87\o.ide.11.1.1.4.37.59.48 of my user settings.
    For example, I can use the SQL History pane's tab context menu to Float it, then adjust it's size by dragging it's edges down to a grey square a few pixels wide/high. Close SQL Developer, reopen, View > SQL History. Darn! Where did it go?
    Hope this helps,
    Gary

  • SQL History - returning wrong statement if history is sorted

    I have searched the forum and not seen anything on this, but I have been getting the wrong SQL statement returned when I select Append/Replace.
    I have statements going back to 12-Jan-06 (using 804 since 13-Jan-06, 796 since 12-Jan-06 and 715 last year), so I don't know if I have hit the aging limit or not (I think I counted 221 entries).
    It seems to me that it works out the cursor position and then returns that statement number from the history - independently of resorting the history.
    For example, if I sort from oldest to newest (based on timestamp) and then select the bottom statement (displays as newest) and Replace, I get the oldest statement in the worksheet. If I select the top statement (displays as oldest) and Replace, I get the newest statement in the worksheet.
    This is further complicated by the fact that sorting on the Timestamp is doing an alpha-numeric sort, rather than a date sort. When sorting from oldest to newest, the bottom three timestamps are (in "oldest to newest" order) are:
    1/23/06 10:58 AM
    1/23/06 9:21 AM
    1/23/06 9:31 AM
    If I then remove the sorting, the statement returned is the correct one.

    It was great to get the fix for the SQL History returning the right statement if sorted (we got it in v1184).
    However v1215 still does a text sort on the TimeStamp column rather than a date sort, so 2PM comes before 9AM, etc.
    Also, where is the format for the TimeStamp column coming from? As someone who doesn't live in the US and thinks that days should come before months in date formats (ie DD-Mon-YYYY), I am frustrated by yet another product that uses MM/DD/YY, despite my best efforts at telling it otherwise.

  • EA3/EA2 - SQL History Timestamp column

    The formatting of the Timestamp column in the SQL History now uses the NLS Timestamp Format (yay!), but unfortunately does not cope with the seconds component of the format:
    NLS Timestamp Format is DD-Mon-YYYY HH24:MI:SSXFF
    Timestamp column in the SQL History displays as 25-Feb-2008 15:03:.
    I assume from what has previously shown in the SQL History timestamp column (2/25/08 3:03 PM) that we do not record seconds in the SQL History timestamp. I don't really have a problem with that, but can we please trim the second and sub-second components from the format?
    theFurryOne

    Just to add, this specific problem has been fixed. Hiding of sec/mill-sec information is handled by ignoring 'S/F', '.X', ':X' fields . But keeping the bug open so that a more generic fix is made which will handle symbols like '#SSXFF' in time field.

  • SQL History not sorting by timestamp; new v4 TS format ?

    I was worried that  my SQL History was not accumulating post upgrade, as it did not appear as I expected.
    I typically sort it by descending timestamp, but I'm finding that since installing the 4.0 production version that a different timestamp format on SQL History has taken hold, ignoring the NLS settings that I put in my preferences (which were not the default ones by the way for my territory and language, by the way).  
    I migrated all my settings from the previous installation I had ...sqldev4 ea3.  previous migrations from v3 to v4 ea1 to v4 ea2 to v4 ea3 never disrupted my SQL History.
    Now my recent entries are buried in the SQL History and won't show on top anymore, and the sorting by timestamp seems erratic making it impossible to see a chronological order of SQLs executed before and after the migration.
    Is there a control for formatting the SQL History timestamps or do I need to go spelunking through xml files to alter a setting ?
    Curiously,
    Steve 

    A timestamp found inside one of my older  "history.xml"  files looks like this:
    <timestamp><![CDATA[12/11/13 2:18 PM]]></timestamp>
    A newer one looks like this:
    <timestamp><![CDATA[12/17/13 20:54]]></timestamp>
    It would probably give Xquery fits reconciling the different formats, sorting, eliminating older SQLs in the history according to one's preferences inside SQL Developer 4, etc.
    I'm going back to the last early adopter release just to preserve history and sequence until the tool makers resolve the timestamp and the weird sort order problem.

  • SQL History behaviour

    Can we have an option to switch to the JDeveloper behaviour for SQL History please ?
    I am getting p'd off with Replace/Append in Raptor instead of just dbl-clicking on the line of SQL I want and having it replace whatever's there.

    Thanks for your feedback. I haven't been able to reproduce your second issue so far, as to your first issue we will look at possible further improvements and I have filed a bug for this.
    The SQL history implementation is different to JDeveloper, as we have included additonal information such as connection, timestamp, number of times executed. Are these useful to you?
    Donal

  • Purging the cache entries accordingto table and SA

    Hi Gurus,
    I have few questions on Cache purging
    1>How many types of purging.
    2>Is it possible to purge the cache based on tables i.e.(if entries are generated on table A only that entries should purge in cache manager).
    3>Is it possible to purge the cache based on Subject Areas i.e.(if entries generated on subject area A only that entries should purge in cache manager).
    4>supose in cache manager there are 100 entries and i want to purge only selected entries i.e.(if i want to purge 25th, 50th and 75th,100th entries ) how i can achieve this.
    Regards,

    The same you can get it from Helpfile
    To purge the cache manually with the Cache Manager facility
    Use the Administration Tool to open a repository in online mode.
    Select Manage > Cache to open the Cache Manager dialog box.
    Select Cache or Physical mode by selecting the appropriate tab in the left pane.
    Navigate the explorer tree to display the associated cache entries in the right pane.
    Select the cache entries to purge, and then select Edit > Purge to remove them.
    In Cache mode, select the entries to purge from those displayed in the right pane.
    In Physical mode, select the database, catalog, schema or tables to purge from the explorer tree in the left pane.
    In Cache mode, you can purge:
    One or more selected cache entries associated with the open repository.
    One or more selected cache entries associated with a specified business model.
    One or more selected cache entries associated with a specified user within a business model.
    In Physical mode, you can purge:
    All cache entries for all tables associated with one or more selected databases.
    All cache entries for all tables associated with one or more selected catalogs.
    All cache entries for all tables associated with one or more selected schemas.
    All cache entries associated with one or more selected tables.
    SAPurgeCacheByQuery. Purges a cache entry that exactly matches a specified query. For example, using the following query, you would have a query cache entry that retrieves the names of all employees earning more than $100,000:
    select lastname, firstname from employee where salary > 100000;
    The following call purges the cache entry associated with this query:
    Call SAPurgeCacheByQuery('select lastname, firstname from employee where salary > 100000' );
    SAPurgeCacheByTable. Purges all cache entries associated with a specified physical table name (fully qualified) for the repository to which the client has connected.
    This function takes up to four parameters representing the four components (database, catalog, schema and table name proper) of a fully qualified physical table name. For example, you might have a table with the fully qualified name of DBName.CatName.SchName.TabName. To purge the cache entries associated with this table in the physical layer of the Oracle BI repository, execute the following call in a script:
    Call SAPurgeCacheByTable( 'DBName', 'CatName', 'SchName', 'TabName' );
    NOTE: Wild cards are not supported by the Oracle BI Server for this function. Additionally, DBName and TabName cannot be null. If either one is null, you will receive an error message.
    SAPurgeAllCache. Purges all cache entries. The following is an example of this call:
    Call SAPurgeAllCache();
    SAPurgeCacheByDatabase. Purges all cache entries associated with a specific physical database name. A record is returned as a result of calling any of the ODBC procedures to purge the cache. This function takes one parameter that represents the physical database name and the parameter cannot be null. The following shows the syntax of this call:
    Call SAPurgeCacheByDatabase( 'DBName' );
    For Q4:
    SAGetSharedRequestKey. An ODBC procedure that takes a logical SQL statement from the Oracle BI Presentation Services and returns a request key value.
    The following shows the syntax of this procedure:
    SAGetSharedRequestKey('sql-string-literal)
    Pls mark if helps

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

  • EA2 SQL History

    SQL History does not work. Even after clearing history and reducing the number of days to save history. The clear did not work at all. Any suggestions or is this a bug with the new release?
    Edited by: user13308397 on Dec 20, 2010 12:35 PM
    Edited by: user13308397 on Dec 20, 2010 12:38 PM
    Edited by: user13308397 on Dec 20, 2010 12:41 PM

    There are several problems with the history on the new EA's. Let's see what EA3 gives...
    Regards,
    K.

Maybe you are looking for