ORA-09925: Unable to create audit trail file

今天开启测试数据库的时候报错了,

ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925

google 了一下找到了用下面的方法:

 

指令文件上加了强制位,可以让用户执行的指令,以指令文件的拥有者或是所属组的身份运行进程

 

chmod 6755 $ORACLE_HOME/bin/oracle命令给该文件的用户和组加上强制位

问题解决了,还是有些疑问,不知其所以然,有待以后好好研究oracle。

 

原文链接地址:http://space.itpub.net/16566331/viewspace-680248

 

今天在数据库服务器上添加了一个新的账号,想通过这个账号来使用系统认证登录到oracle。创建好账号后,在该账号的.bash_profile文件中添加oracle的环境变量,同时把它加入到dba组中。这样一般就可以使用该账号进行系统认证登录了。不过今天倒霉,就是登不进去,报错了:

$ sqlplus / as sysdba.

ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925

刚开始看到这个错误的时候以为是没有权限写audit trail 文件,结果到相应的目录下查看adump相应的权限是组只有读和执行的权限,没有写权限。于是使用chmod g+w adump命令给组加上写权限。结果是:

[xie@bogon ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 25 10:15:32 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-10997: another startup/shutdown operation of this instance inprogress
ORA-09967: unable to create or open lock file
Linux-x86_64 Error: 13: Permission denied

奇怪了,起了一个空实例。可是数据库明明是启动着的。到adump目录下查看

-rw-r-----  1 oracle dba 628 Nov 18 17:57 ora_2120.aud
-rw-r-----  1 oracle dba 630 Nov 19 17:36 ora_19418.aud
-rw-r-----  1 oracle dba 628 Nov 22 14:24 ora_6105.aud
-rw-r-----  1 oracle dba 628 Nov 22 15:31 ora_8334.aud
-rw-rw----  1 oracle dba 623 Nov 25 09:34 ora_776.aud
-rw-r-----  1 xie    dba 619 Nov 25 10:15 ora_1232.aud
-rw-r-----  1 xie    dba 619 Nov 25 10:15 ora_1233.aud

注意到刚生成的文件属主是‘xie‘这个用户,而不是oracle,查看一下不用用户下文件的内容:

查看:oracle的ora_776.aud文件

ORACLE_HOME = /u01/oracle/product/10.2.0/dbs
System name:    Linux
Node name:      bogon
Release:        2.6.9-78.ELsmp
Version:        #1 SMP Wed Jul 9 15:46:26 EDT 2008
Machine:        x86_64
Instance name: think
Redo thread mounted by this instance: 1
Oracle process number: 17
Unix process pid: 776, image:
oracle@bogon(TNS V1-V3)

Thu Nov 25 09:34:28 2010
ACTION : 'CONNECT'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: xie
CLIENT TERMINAL: pts/1
STATUS: 0
查看xie用户的ora_1232.aud
ORACLE_HOME = /u01/oracle/product/10.2.0/dbs
System name:    Linux
Node name:      bogon
Release:        2.6.9-78.ELsmp
Version:        #1 SMP Wed Jul 9 15:46:26 EDT 2008
Machine:        x86_64
Instance name: think
Redo thread mounted by this instance: 0 <none>
Oracle process number: 0
Unix process pid: 1232, image:
oracle@bogon

Thu Nov 25 10:15:32 2010
ACTION : 'CONNECT'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: xie
CLIENT TERMINAL: pts/1
STATUS: 0
注意看红颜色表示的部分内容。

看来不是这个adump文件权限的问题。那会是什么问题呢,后来到网上搜索,找到了真正的原因:

正常情况下$ORACLE_HOME/bin/oracle文件的权限是:

-rwsr-sr-x 

可此数据库的此文件的权限是:

-rwxr-xr-x    ---没了s位,即没了强制位。

默认情况下,用户执行一个指令,会以该用户的身份来运行进程。

指令文件上加了强制位,可以让用户执行的指令,以指令文件的拥有者或是所属组的身份运行进程

chmod 6755 $ORACLE_HOME/bin/oracle命令给该文件的用户和组加上强制位

转载于:https://www.cnblogs.com/Alex-Zeng/archive/2013/01/29/2881848.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值