一. Oracle Binary Options 說明
關於OracleOptions,之前有整理過一系列文章,參考:
Oracle 組件 系列 小結
http://blog.csdn.net/tianlesoftware/article/details/7339998
我們可以通過v$option視圖來查看相關的資訊:
V$OPTION displaysOracle Database options and features. Typically, although not always, options mustbe separately licensed, whereas features come with the product and are enabledbased on the product that is running (Standard Edition, Enterprise Edition, andso on).
SQL> select * from v$option;
SQL> select comp_id,comp_name from dba_registry;
這些組件是Oracle 的組件,在Linux/UNIX 平台下,因為系統設計的問題,應用通常不是作為一個完整的可執行檔來部署的。而是分散部署單獨的對象檔案,對象檔案的library archives 和一些源檔案,然後在安裝過程中,在系統層級擷取這些對象的link,並用其建立可執行檔。
Applications forUNIX are generally not distributed as complete executables.
Oracle,like many application vendors who create products for UNIX, distributeindividual object files, library archives of object files, and some sourcefiles which then get "relinked" at the operating system level duringinstallation to create usable executables. This guarantees a reliable integration with functions provided by the OSsystem libraries.
所以我們在Linux/UNIX 上安裝軟體就會涉及link和Relink的問題。這個也是我寫這幾篇文章的原因。
二. 禁用啟用Binary Options說明
MOS 文章:
How to Check and Enable/Disable OracleBinary Options [ID 948061.1]
這裡只說明UNIX 環境下OracleBinary Options的禁用與啟用問題,關於單一實例和RAC 環境下RelinkingOptions 問題會單獨整理成2片Blog 來說明。
2.1 查看Option 狀態
這篇文章涉及到的Binary Options 如下:
RAC (Real Application Cluster)
RAT (Real Application Testing)
OLS (Oracle Label Security)
DV (Database Vault)
ASM (Automated Storage Management)
OLAP (Oracle OLAP)
PART (Oracle Partitioning)
CTX (Context Management Text)
進入目錄:
% cd $ORACLE_HOME/rdbms/lib
執行如下命令查看Options狀態:
% ar -t libknlopt.a | grep -c {file}
這裡的file 參數可以包含內容:
RAC - kcsm.o
RAT - kecwr.o
OLS - kzlilbac.o
DV - kzvidv.o
ASM - kfon.o
OLAP - xsyeolap.o
PART - kkpoban.o
CTX - kciwcx.o
樣本:
非AIX 環境:
% ar -t libknlopt.a | grep -c kcsm.o
AIX 環境:
% ar -X64 -t libknlopt.a | grep -c kcsm.o
如果傳回值是0, Option 就是disabled的,
如果傳回值是1,option就是enabled的。
[oracle@localhost ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kcsm.o
0
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kfon.o
0
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kzlilbac.o
0
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kciwcx.o
1
2.2 Options 的啟用與關閉
啟用和關閉使用如下命令:
% make -f ins_rdbms.mk {option}
這裡的Option 可以使用使用如下值:
RAC - rac_on / rac_off
RAT - rat_on / rat_off
OLS - lbac_on / lbac_off
DV - dv_on / dv_off
ASM - asm_on / asm_off
OLAP - olap_on / olap_off
PART - part_on / part_off
CTX - ctx_on / ctx_off
DM - dm_on / dm_off
樣本:
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kciwcx.o
1
關閉CTX:
[oracle@localhost lib]$ make -fins_rdbms.mk ctx_off
Warning: ctx is always turned on. ctx_offis disabled.
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kciwcx.o
1
啟用CTX:
[oracle@localhost lib]$ make -fins_rdbms.mk ctx_on
/usr/bin/ar cr/home/oracle_app/rdbms/lib/libknlopt.a /home/oracle_app/rdbms/lib/kciwcx.o
[oracle@localhost lib]$ ar -t libknlopt.a |grep -c kciwcx.o
1
注意事項:
The V$OPTION isunchanged and you will need to refer to other documentation to change it inorder to complete the changes to the options. This include but not limited torunning sql scripts which changes the DB Catalog.
最後,Oracle binary 需要進行relink:
% make -f rdbms/lib/ins_rdbms.mk ioracle
注意:
Any databasesrunning from the $ORACLE_HOME must be shutdown before running this command
--在relink 時,$ORACLE_HOME 下的所有DB 都需要shutdown。
三.補充說明
Starting withOracle11g Release 2 (11.2), a new "chopt" utility is available on allplatforms (including Windows).
--從Oracle 11.2 開始,Oracle 爭對所有平台提供了了一個chopt工具。
Besides workingon Windows platforms, another useful feature is the fact that on UNIX/Linuxplatforms, it neatly displays the commands that need to be executed and alsoexecutes them:
% chopt disable rat
Writing to <ORACLE_HOME>/install/disable_rat.log...
%s_unixOSDMakePath% -f/grdbms/64bit/patchdb/app/oracle/product/p11201b/rdbms/lib/ins_rdbms.mk rat_off
%s_unixOSDMakePath% -f/grdbms/64bit/patchdb/app/oracle/product/p11201b/rdbms/lib/ins_rdbms.mk ioracle
Where %s_unixOSDMakePath% = make
注意:
Switching on ASMshould only be done on Grid Infrastructure Homes in Oracle 11gR2. Doing it onstandard RDBMS will result in errors on startup.
-------------------------------------------------------------------------------------------------------
著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!
Skype: tianlesoftware
QQ: tianlesoftware@gmail.com
Email: tianlesoftware@gmail.com
Blog: http://www.tianlesoftware.com
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
Linkedin: http://cn.linkedin.com/in/tianlesoftware
-------加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請----
DBA1 群:62697716(滿); DBA2 群:62697977(滿) DBA3 群:62697850(滿)
DBA 超級群:63306533(滿); DBA4 群:83829929 DBA5群: 142216823
DBA6 群:158654907 DBA7 群:172855474 DBA總群:104207940