How to hanganalyze and systemstate dumps for Oracle database?

Oracle support request hang analysis and system state dumps when rasing SR. One 10.1 or higher versions login as sqlplus -prelim / as sysdba To do a hanganalyze oradebug setmypid; oradebug unlimit; oradebug hanganalyze 3; Wait 60 – 90 seconds and run the last command again to identify the process state changes. To get a … Read more

Tuning “Backup:sbtbackup” Event

A few days ago a friend ask me to see a awr issue. In the TOP 5 Times Events, as you see, Obviously,database has relatively high sbtbackup wait event, Backup:sbtbackup falls under the administrative category also realted to the RMAN. These wait events will occur when there is RMAN backup running on the server. Backup: … Read more

about get bind_data column in v$sql(绑定变量值)

今天查看AWR时,发现有个sql占用的cpu很高而且也并不复杂,top 5 event出现了cpu,read by other sessions,而且sql中再次看到的hint index,随后从生产环境中拿到绑定变量参数值进行本地调试,发现hint index 选择了错误的索引一致读为93万,去掉hint立即降低到了36,随后服务器压力将了下来

程序sql不应该滥用Hint

Hint提示是优化SQL的一种手段,但不应该放在首位,记的国外有位大师说过顺序应该是学写SQL,写更好SQL,学写ORACLE SQL,写更好的ORACLE SQL,在了解原理且CBO没有走理想路线的情况下再去指引CBO。