CRS-0245
抛出 CRS-0245 的可能性有很多,这只是我们尝试通过grid修改数据库的一种情况。
在这种情况下,我们可以通过grid启动/停止数据库。
[grid@primary01 ~]$ srvctl start database -d orclcdb
[grid@primary01 ~]$ srvctl stop database -d orclcdb但是我们不能通过grid来修改数据库。
[grid@primary01 ~]$ srvctl modify database -d orclcdb -s mount
PRCD-1163 : Failed to modify database ORCLCDB
PRCR-1071 : Failed to register or update resource ora.orclcdb.db
CRS-0245: User doesn't have enough privilege to perform the operationCRS-0245 表示您不能由该用户执行此类操作,您应该使用具有正确权限的正确用户(帐户)执行此操作。
检查资源的 ACL
让我们看看资源的访问控制列表 (ACL)。
[grid@primary01 ~]$ crsctl status resource ora.orclcdb.db -p -attr ACL
NAME=ora.orclcdb.db
ACL=owner:oracle:rwx,pgrp:oinstall:r--,other::r--,group:dba:r-x,group:oper:r-x,group:racdba:r-x,user:grid:r-x可以看到,用户grid有读取和执行的权限,但没有写入资源(即rx)的权限。
解决方案
有两种方法可以解决 CRS-0245。
1.使用Owner修改数据库
但是所有者oracle有写权限(即rwx),我们应该由用户oracle执行操作。
[oracle@primary01 ~]$ srvctl modify database -d orclcdb -s mount
[oracle@primary01 ~]$ echo $?
02.修改Resource的ACL
另一种解决方法是修改属性ACL,使grid具有写入能力(即rwx)。
不幸的是,我们不能再从版本 12c 修改它,除非我们使用一个非常特殊的标志来使其工作,就像我们在如何解决 CRS-4995中所做的那样。
[root@primary01 ~]# . /home/grid/.bash_profile
[root@primary01 ~]# crsctl modify resource ora.orclcdb.db -attr "ACL='owner:oracle:rwx,pgrp:oinstall:r--,other::r--,group:dba:r-x,group:oper:r-x,group:racdba:r-x,user:grid:rwx'" -unsupported我们可能会尝试通过grid来修改资源。
[grid@primary01 ~]$ srvctl modify database -d orclcdb -s mount
[grid@primary01 ~]$ echo $?
0我们成功了。
原文标题:How to Resolve CRS-0245: User doesn't have enough privilege to perform the operation
原文作者:Ed Chen
原文链接:https://logic.edchen.org/how-to-resolve-crs-0245-user-doesnt-have-enough-privilege-to-perform-the-operation/
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




