用了oracle database vault security的话,不能使用dump数据库的内部结构.
例:
SQL> alter system dump logfile 'kfds';
alter system dump logfile 'kfds'
*
第 1 行出现错误:
ORA-01031: 权限不足
解决方法:
法1:禁止oracle database vault,
[oracle@rac1 ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@rac1 lib]$ make -f ins_rdbms.mk dv_off
/usr/bin/ar d /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a kzvidv.o
/usr/bin/ar cr /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kzvndv.o
[oracle@rac1 lib]$ cd $ORACLE_HOME/bin
[oracle@rac1 bin]$ relink oracle
chmod 755 /u01/app/oracle/product/10.2.0/db_1/bin
- Linking Oracle
rm -f /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle
gcc -o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle -
L/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/ -
L/u01/app/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc -Wl,-E `test -f
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o && echo
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o`
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/opimai.o
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ssoraed.o
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ttcsoi.o
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/defopt.o -Wl,--whole-archive -lperfsrv10 -Wl,--no-whole-
archive /u01/app/oracle/product/10.2.0/db_1/lib/nautab.o /u01/app/oracle/product/10.2.0/db_1/lib/naeet.o
/u01/app/oracle/product/10.2.0/db_1/lib/naect.o /u01/app/oracle/product/10.2.0/db_1/lib/naedhs.o
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/config.o -lserver10 -lodm10 -lnnet10 -lskgxp10 -lsnls10 -
lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -
lcore10 -lnls10 -lhasgen10 -lcore10 -lskgxn2 -locr10 -locrb10 -locrutl10 -lhasgen10 -lcore10 -lskgxn2
-lclient10 -lvsn10 -lcommon10 -lgeneric10 -lknlopt `if /usr/bin/ar tv
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo
"-loraolap10" ; fi` -lslax10 -lpls10 -lplp10 -lserver10 -lclient10 -lvsn10 -lcommon10 -lgeneric10 `if [
-f /u01/app/oracle/product/10.2.0/db_1/lib/libavserver10.a ] ; then echo "-lavserver10" ; else echo "-
lavstub10"; fi` `if [ -f /u01/app/oracle/product/10.2.0/db_1/lib/libavclient10.a ] ; then echo "-
lavclient10" ; fi` -lknlopt -lslax10 -lpls10 -lplp10 -ljox10 -lserver10 -lclsra10 -ldbcfg10 -
locijdbcst10 -lwwg `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -
lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -
lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lmm -lsnls10 -lnls10 -lcore10 -lsnls10 -
lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat
/u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10
-lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -
lnzjs10 -ln10 -lnnz10 -lnl10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -
lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `if /usr/bin/ar tv
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo
" " ; else echo "-lordsdo10"; fi` -lctxc10 -lctx10 -lzx10 -lgx10 -lctx10 -lzx10 -lgx10 -lordimt10 -
lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10
-lnls10 -lcore10 -lnls10 -lsnls10 -lunls10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10
-lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -laio `cat
/u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib -
lm `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm -
L/u01/app/oracle/product/10.2.0/db_1/lib
/u01/app/oracle/product/10.2.0/db_1/lib//libcore10.a(lcd.o)(.text+0x8e8): In function `lcdprm':
: warning: the `gets' function is dangerous and should not be used.
mv -f /u01/app/oracle/product/10.2.0/db_1/bin/oracle /u01/app/oracle/product/10.2.0/db_1/bin/oracleO
mv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle /u01/app/oracle/product/10.2.0/db_1/bin/oracle
chmod 6751 /u01/app/oracle/product/10.2.0/db_1/bin/oracle
[oracle@rac1 bin]$
[oracle@rac1 bin]$
[oracle@rac1 bin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on 星期二 10月 26 14:09:08 2010
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 419430400 bytes
Fixed Size 1274068 bytes
Variable Size 226496300 bytes
Database Buffers 188743680 bytes
Redo Buffers 2916352 bytes
数据库装载完毕。
数据库已经打开。
SQL> ALTER TRIGGER DVSYS.DV_BEFORE_DDL_TRG DISABLE;
触发器已更改
SQL> ALTER TRIGGER DVSYS.DV_AFTER_DDL_TRG DISABLE;
触发器已更改
方法二:运行下面的语句:
begin
dbms_macadm.create_rule('NO_SYSTEM_DUMP','(INSTR(UPPER(DVSYS.DV_SQL_TEXT),''DUMP'') = 0)');
end;
/
exec dbms_macadm.add_rule_to_rule_set('Check trigger init parameter','NO_SYSTEM_DUMP');