ADRCI (ADR Command Interpreter) 是伴隨Oracle 11g推出的新工具,由于各種log的位置紛繁復(fù)雜,因此在Oracle 11g中,Oracle將數(shù)據(jù)庫、監(jiān)聽、客戶端等的Log統(tǒng)一轉(zhuǎn)到了diagnostic_dest初始化參數(shù)所指向的目錄下的diag目錄中,并且提供了ADRCI實用程序來進行高
ADRCI (ADR Command Interpreter) 是伴隨Oracle 11g推出的新工具,由于各種log的位置紛繁復(fù)雜,因此在Oracle 11g中,Oracle將數(shù)據(jù)庫、監(jiān)聽、客戶端等的Log統(tǒng)一轉(zhuǎn)到了diagnostic_dest初始化參數(shù)所指向的目錄下的diag目錄中,并且提供了ADRCI實用程序來進行高效查詢及管理。在這之前我曾經(jīng)寫過兩篇跟ADRCI相關(guān)的文章。
ADRCI Purge is NOT What You Think It Should Be:ADRCI的Purge命令用于清除日志文件中的內(nèi)容,但是使用起來并非盡如人意。
Oracle11g for Windows ADRCI Issue:在Windows中使用ADRCI會產(chǎn)生的小問題,當(dāng)然很久沒有用過Windows,不知道這個問題是不是還依然存在。
ADRCI看上去是個很好的東西,但是除了show alert相對簡單之外,其它的各種命令和查詢條件的指定實際上比較繁瑣,因此ADRCI在我周邊的使用者寥寥可數(shù),我算是堅持使用的為數(shù)不多者。因為使用者不多,所以對于ADRCI中一些極為簡單的操作,了解者也比較少。
本文也是如此,如何刪除在ADRCI中顯示出來的多余的Homes?解決方法簡單到令人發(fā)指。
問題重現(xiàn),在命令中show homes顯示出6個Home,這通常是由于安裝過其它的數(shù)據(jù)庫實例,然后刪除的時候遺留下來的Log目錄仍然存在。對于完美主義者來說這難以容忍。
[oracle@emnotech rdbms]$ adrci ADRCI: Release 12.1.0.1.0 - Production on Mon Aug 18 01:34:31 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show home ADR Homes: diag/clients/user_oracle/host_266584670_80 diag/tnslsnr/emnotech/listener diag/rdbms/orcl/orcl diag/rdbms/slob/SLOB diag/rdbms/slob/orcl diag/rdbms/slob/slob
如上所示,ADR的基礎(chǔ)目錄在/u01/app/oracle,而各個Home都在其下的diag目錄中,因此我們直接ls看一下目錄結(jié)構(gòu)。
[oracle@emnotech rdbms]$ pwd /u01/app/oracle/diag/rdbms [oracle@emnotech rdbms]$ ls -l total 8 drwxr-x---. 3 oracle oinstall 4096 Jun 3 14:20 orcl drwxr-xr-x. 5 oracle oinstall 4096 Aug 1 00:36 slob [oracle@emnotech rdbms]$ ls -l slob total 12 -rw-r-----. 1 oracle oinstall 0 Jun 5 03:16 i_1.mif drwxr-xr-x. 16 oracle oinstall 4096 Jun 5 03:16 orcl drwxr-xr-x. 16 oracle oinstall 4096 Jun 5 03:35 slob drwxr-xr-x. 16 oracle oinstall 4096 Aug 1 00:36 SLOB
可以看到目錄結(jié)構(gòu)與ADRCI命令行中顯示的完全一樣,所以,解決方法就是直接rm掉不需要的目錄。
[oracle@emnotech rdbms]$ rm -rf slob [oracle@emnotech rdbms]$ ls -l total 4 drwxr-x---. 3 oracle oinstall 4096 Jun 3 14:20 orcl
友情提示:一定要屢次確認(rèn)才可以執(zhí)行rm -rf這樣危險的命令,每次對這個命令敲回車我都心驚膽戰(zhàn)、心存敬畏。
[oracle@emnotech rdbms]$ adrci ADRCI: Release 12.1.0.1.0 - Production on Mon Aug 18 01:35:23 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show home ADR Homes: diag/clients/user_oracle/host_266584670_80 diag/tnslsnr/emnotech/listener diag/rdbms/orcl/orcl adrci>
再次進入ADRCI中查看Homes,世界清靜了。
Share/Save
Related posts:
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com