scripts:查看数据库版本及补丁情况
查看数据库版本及补丁情况
--数据库10.2以后可用
SET lines 100 numwidth 12 pages 100
COL action_time FOR a30
COL action FOR a12
COL version LIKE action
COL comments FOR a30
SELECT action_time, action, version, id, comments FROM dba_registry_history ORDER BY action_time;
--数据库通用
SET lines 100 numwidth 12 pages 100
COL action_time FOR a30
COL action FOR a12
COL version LIKE action
COL comments FOR a30
SELECT action_time, action, version, id, comments FROM registry$history ORDER BY action_time;
--数据库10.2.0.4以后才有psu
hbdb2:oracle:/oracle>$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | egrep -i 'PSU|DATABASE PATCH SET UPDATE'
8576156 9352164 Wed May 26 13:56:10 GMT+08:00 2010DATABASE PSU 10.2.0.4.1 (INCLUDES CPUJUL2009)
8833280 9352164 Wed May 26 13:56:10 GMT+08:00 2010DATABASE PSU 10.2.0.4.2 (INCLUDES CPUOCT2009)
9119284 9352164 Wed May 26 13:56:10 GMT+08:00 2010DATABASE PSU 10.2.0.4.3 (INCLUDES CPUJAN2010)
9352164 9352164 Wed May 26 13:56:10 GMT+08:00 2010DATABASE PSU 10.2.0.4.4 (INCLUDES CPUAPR2010)
--10g
select substr(action_time,1,30) action_time,
substr(id,1,10) id,
substr(action,1,10) action,
substr(version,1,8) version,
substr(BUNDLE_SERIES,1,6) bundle,
substr(comments,1,20) comments
from registry$history;
--9i
select substr(action_time,1,30) action_time,
substr(id,1,10) id,
substr(action,1,10) action,
substr(version,1,8) version,
substr(comments,1,20) comments from registry$history;