ORA-09925 Unable to create audit trail file
數(shù)據(jù)庫:oracle11.2.0.4
系統(tǒng):anolisos7.9
環(huán)境:系統(tǒng)中安裝過11g數(shù)據(jù)庫實(shí)例,同時(shí)也安裝了19.3數(shù)據(jù)庫軟件.
問題描述:
在
/u01/app/oracle/product/19.3.0/db_1目錄下使用deinstall命令后,11g數(shù)據(jù)庫狀態(tài)顯示正常,但連接報(bào)錯(cuò)ORA-09925,如下所示:
[oracle@leo~]$ cat .bash_profile
……
exportORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
#exportORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
……
[oracle@leobin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/bin
[oracle@leobin]$ ./sqlplus / as sysdba
SQL*Plus:Release 11.2.0.4.0 Production on Sat Aug 20 10:46:30 2022
Copyright(c) 1982, 2013, Oracle. All rightsreserved.
ERROR:
ORA-09925:Unable to create audit trail file
Linux-x86_64Error: 2: No such file or directory
Additionalinformation: 9925
ORA-01075:you are currently logged on
Enteruser-name:
ERROR:
ORA-01017:invalid username/password; logon denied
Enteruser-name:
ERROR:
ORA-01017:invalid username/password; logon denied
SP2-0157:unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
異常原因:
無法創(chuàng)建審計(jì)文件,若以sysdba用戶登陸數(shù)據(jù)庫都會(huì)被強(qiáng)制審計(jì),如果審計(jì)文件無法寫入,肯定會(huì)有問題.
解決過程:
使用strings查看二進(jìn)制spfile文件.
[oracle@leodbs]$ strings spfileorcl.ora
……
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
……
[oracle@leodbs]$ ll /u01/app/oracle/admin/orcl/
ls:cannot access /u01/app/oracle/admin/orcl/: No such file or directory
發(fā)現(xiàn)該目錄不存在,判斷為deinstall19c時(shí)該目錄被刪除.
新建該目錄后,連接無異常.
[oracle@leodbs]$ mkdir -p /u01/app/oracle/admin/orcl/adump
[oracle@leobin]$ sqlplus / as sysdba
SQL*Plus:Release 11.2.0.4.0 Production on Sat Aug 20 10:56:26 2022
Copyright(c) 1982, 2013, Oracle. All rightsreserved.
Connectedto:
OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With thePartitioning, OLAP, Data Mining and Real Application Testing options
查看該目錄下生成新文件.
[oracle@leo~]$ ll /u01/app/oracle/admin/orcl/adump
total 4
-rw-r----- 1 oracleoinstall 798 Aug 20 10:56 orcl_ora_21760_20220820105626701318143795.aud
