【oracle】查看数据库最近执行了哪些sql语句
生活随笔
收集整理的這篇文章主要介紹了
【oracle】查看数据库最近执行了哪些sql语句
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
前言
- oracle 12.1.0.2.0
- 為了確定功能是否生效,需要查看數(shù)據(jù)庫最近執(zhí)行的sql語句,在里面找到想要的SQL語句
查看數(shù)據(jù)庫最近執(zhí)行了哪些sql語句
# 查看1小時內(nèi)執(zhí)行的sql語句,并按照執(zhí)行時間倒序排序 select s.LAST_ACTIVE_TIME,s.SQL_TEXT,s.SQL_FULLTEXT,s.FIRST_LOAD_TIME,s.LAST_LOAD_TIME,s.EXECUTIONS from v$sql s where s.SQL_TEXT like '%DUAL%' and s.LAST_ACTIVE_TIME>sysdate-1/24 order by s.LAST_ACTIVE_TIME desc- LAST_ACTIVE_TIME : TIme at which the query plan was last active。sql語句最后一次的執(zhí)行時間。
- FIRST_LOAD_TIME : Timestamp of the parent creation time.
- LAST_LOAD_TIME : Time at which the query plan (heap 6) was loaded into the library cache.
- EXECUTIONS : Number of executions that took place on this object since it was brought into the library cache。執(zhí)行次數(shù)。
總結(jié)
以上是生活随笔為你收集整理的【oracle】查看数据库最近执行了哪些sql语句的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 牙齿的作用有哪些
- 下一篇: mysql命令:查看表结构