DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: tracking a query

  1. #1
    Join Date
    Feb 2004
    Posts
    11

    Red face tracking a query

    Hi

    how can I track a query that I know it has been executed in the past on my instance.
    correct me if I'm wrong but v$sqlarea is saving only the ones on the sqlarea right now.
    so where is the db history for queries is saved?
    is it limited? how can control it.

    and another thing - ones I've found my query, is there a way to find out for how long it ran? or an average time for it's running without running it again.

    Thanks

  2. #2
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    You can see the past queries using oracle logminer.

    The database must be in the archived log mode and you need the archived logs at the approximate time or SCN at which the transaction/query took place.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    logminer wont show selects unless I'm mistaken, only updates inserts and deletes (stuff that generates redo)

  4. #4
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    Yup!! Not past queries.. past DML. Saturday night hangover..
    I guess there is no way to retrieve a past query once it is cached out of library cache. Any other ideas?
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  5. #5
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    If it was important, then I guess auditting would have been turned on.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width