您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“數(shù)據(jù)庫(kù)中打補(bǔ)丁有哪些注意事項(xiàng)”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“數(shù)據(jù)庫(kù)中打補(bǔ)丁有哪些注意事項(xiàng)”吧!
在打補(bǔ)丁的時(shí)候 遇到了以下幾個(gè)問(wèn)題
1、打補(bǔ)丁時(shí) 遇到中央目錄不存在或者被損壞的問(wèn)題
如果遇到中央目錄報(bào)錯(cuò)的情況,可以去相應(yīng)的$ORACLE_BASE的上一級(jí),oraInventory下查看inventory.xml這個(gè)文件是否存在,如果不存在或者被損壞,根據(jù)主機(jī)的情況進(jìn)行恢復(fù)
如果是RAC環(huán)境下,查看其它節(jié)點(diǎn)的這個(gè)文件是否完好,是就可以SCP到被損壞節(jié)點(diǎn)上。
如果是單實(shí)例單機(jī)環(huán)境或者RAC環(huán)境所有節(jié)點(diǎn)的inventory文件都被破壞的情況下,可以通過(guò)運(yùn)行 $ORACLE_HOME/oui/bin/attachHome.sh
運(yùn)行這個(gè)腳本可以自動(dòng)生成此文件 但是僅支持10.2.0.2以后的版本
生成過(guò)程的日志可以查看/u01/app/oraInventory/logs 下的AttachHome2019-03-14_09-39-21PM.log.rac02
每個(gè)主機(jī)的目錄可能不一致 但是都在oraInventory下
2、空間不足 如何打補(bǔ)丁
LINUX系統(tǒng)通過(guò) du -h|sort -n
du配合sort查找當(dāng)前目錄下所有文件的大小以及從小到大排序
以下三個(gè)地方
①審計(jì)日志 查看審計(jì)是否開(kāi)啟
show parameter audit;
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
audit_file_dest string /u01/app/oracle/admin/racdb/ad
ump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB
audit_trail 的value值為NONE表示不開(kāi)啟;
audit_trail 的value值為FALSE表示不開(kāi)啟;
audit_trail 的value值為DB表示開(kāi)啟;
audit_trail 的value值為TURE表示開(kāi)啟;
audit_trail 的value值為OS表示審計(jì)記錄寫入一個(gè)操作系統(tǒng)文件(不是特別理解);
②trace
+asm的trace 文件 也就是grid目錄下的ASM實(shí)例產(chǎn)生的trace文件
/u01/app/grid/diag/asm/+asm/+ASM1/trace
ORACLE_SID的trace 也就是oracle目錄下實(shí)例產(chǎn)生的trace文件
[oracle@rac01 logs]$ cd /u01/app/oracle/diag/rdbms/racdb/racdb1/trace/
③監(jiān)聽(tīng)日志文件
[grid@rac01 trace]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 16-MAR-2019 22:48:23
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 16-MAR-2019 22:35:54
Uptime 0 days 0 hr. 12 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.21)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.12)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "racdb" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac01 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 16-MAR-2019 22:48:45
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 16-MAR-2019 22:35:54
Uptime 0 days 0 hr. 12 min. 51 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.21)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.12)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "racdb" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
不論是oracle還是grid用戶下
/u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
/u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
通過(guò)du查看該日志文件是否過(guò)大
[oracle@rac01 ~]$ du -h /u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
224K /u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
3、監(jiān)聽(tīng)狀態(tài)
當(dāng)監(jiān)聽(tīng)啟動(dòng)的時(shí)候 要注意是否已注冊(cè)
如果數(shù)據(jù)庫(kù)先啟動(dòng) 監(jiān)聽(tīng)后啟動(dòng), 對(duì)于動(dòng)態(tài)監(jiān)聽(tīng)來(lái)說(shuō) 會(huì)等個(gè)一分鐘PMON進(jìn)程進(jìn)行注冊(cè)
如果覺(jué)得時(shí)間太長(zhǎng)了 就通過(guò) alter system register來(lái)進(jìn)行手動(dòng)注冊(cè)
其他注意事項(xiàng)
在生成庫(kù)中 如果要進(jìn)行停庫(kù)停監(jiān)聽(tīng) 需要先查看是否有外部連接
關(guān)庫(kù) 確認(rèn)LOCAL_NO
改權(quán)限 之前要確認(rèn)
關(guān)庫(kù) 之前最好切換日志 然后手動(dòng)執(zhí)行檢查點(diǎn)
alter system checkpoint;
alter system switch logfile;
到此,相信大家對(duì)“數(shù)據(jù)庫(kù)中打補(bǔ)丁有哪些注意事項(xiàng)”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。