ORA-15033 error when run root.sh

在本文中,详细记录了使用Oracle Grid Infrastructure进行集群配置的过程,包括环境变量设置、ASM创建、Disk Group创建、CRS启动等关键步骤。配置成功后,集群能够稳定运行,展示了Oracle Grid Infrastructure的强大功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# pwd
/export/grid1/app/11.2.0/grid
# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /export/grid1/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-06-07 07:20:29: Parsing the host name
2011-06-07 07:20:29: Checking for super user privileges
2011-06-07 07:20:29: User has super user privileges
Using configuration parameter file: /export/grid1/app/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'perf-5240-1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gipcd' on 'perf-5240-1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gpnpd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'perf-5240-1'
CRS-2676: Start of 'ora.cssdmonitor' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'perf-5240-1'
CRS-2672: Attempting to start 'ora.diskmon' on 'perf-5240-1'
CRS-2676: Start of 'ora.diskmon' on 'perf-5240-1' succeeded
CRS-2676: Start of 'ora.cssd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'perf-5240-1'
CRS-2676: Start of 'ora.ctssd' on 'perf-5240-1' succeeded

DiskGroup DG1 creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15033: disk '/dev/rdsk/c1t0d0s5' belongs to diskgroup "DATA"


Configuration of ASM failed, see logs for details
Did not succssfully configure and start ASM
CRS-2500: Cannot stop resource 'ora.crsd' as it is not running
CRS-4000: Command Stop failed, or completed with errors.
Command return code of 1 (256) from command: /export/grid1/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
Stop of resource "ora.crsd -init" failed
Failed to stop CRSD
CRS-2673: Attempting to stop 'ora.asm' on 'perf-5240-1'
CRS-2677: Stop of 'ora.asm' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.ctssd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'perf-5240-1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.cssd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.gpnpd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.gipcd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.mdnsd' on 'perf-5240-1' succeeded
Initial cluster configuration failed. See /export/grid1/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_perf-5240-1.log for details
# dd if=/dev/zero of=/dev/rdsk/c1t0d0s5 bs=4096 count=1
1+0 records in
1+0 records out

cd /export/grid1/app/11.2.0/grid/crs/install

./roothas.pl -delete -force -verbose

then go back the previous directory and run the root again.
# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /export/grid1/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-06-07 07:25:36: Parsing the host name
2011-06-07 07:25:36: Checking for super user privileges
2011-06-07 07:25:36: User has super user privileges
Using configuration parameter file: /export/grid1/app/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'perf-5240-1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gipcd' on 'perf-5240-1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gpnpd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'perf-5240-1'
CRS-2676: Start of 'ora.cssdmonitor' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'perf-5240-1'
CRS-2672: Attempting to start 'ora.diskmon' on 'perf-5240-1'
CRS-2676: Start of 'ora.diskmon' on 'perf-5240-1' succeeded
CRS-2676: Start of 'ora.cssd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'perf-5240-1'
CRS-2676: Start of 'ora.ctssd' on 'perf-5240-1' succeeded

ASM created and started successfully.

DiskGroup DG1 created successfully.

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'perf-5240-1'
CRS-2676: Start of 'ora.crsd' on 'perf-5240-1' succeeded
Successful addition of voting disk 1cba4239f6f84f76bff510f1b604f821.
Successfully replaced voting disk group with +DG1.
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 1cba4239f6f84f76bff510f1b604f821 (/dev/rdsk/c1t0d0s5) [DG1]
Located 1 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.crsd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'perf-5240-1'
CRS-2677: Stop of 'ora.asm' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.ctssd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'perf-5240-1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.cssd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.gpnpd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.gipcd' on 'perf-5240-1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'perf-5240-1'
CRS-2677: Stop of 'ora.mdnsd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'perf-5240-1'
CRS-2676: Start of 'ora.mdnsd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gipcd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'perf-5240-1'
CRS-2676: Start of 'ora.gpnpd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'perf-5240-1'
CRS-2676: Start of 'ora.cssdmonitor' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'perf-5240-1'
CRS-2672: Attempting to start 'ora.diskmon' on 'perf-5240-1'
CRS-2676: Start of 'ora.diskmon' on 'perf-5240-1' succeeded
CRS-2676: Start of 'ora.cssd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'perf-5240-1'
CRS-2676: Start of 'ora.ctssd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'perf-5240-1'
CRS-2676: Start of 'ora.asm' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'perf-5240-1'
CRS-2676: Start of 'ora.crsd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'perf-5240-1'
CRS-2676: Start of 'ora.evmd' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'perf-5240-1'
CRS-2676: Start of 'ora.asm' on 'perf-5240-1' succeeded
CRS-2672: Attempting to start 'ora.DG1.dg' on 'perf-5240-1'
CRS-2676: Start of 'ora.DG1.dg' on 'perf-5240-1' succeeded

perf-5240-1 2011/06/07 07:32:03 /export/grid1/app/11.2.0/grid/cdata/perf-5240-1/backup_20110607_073203.olr
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 70976 MB Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /export/grid1/app/oraInventory
'UpdateNodeList' was successful.
#

<think>嗯,用户遇到了Oracle数据库的权限问题,具体是ORA-01031权限不足,还有涉及DBMS_SNAPSHOT和SYS包的调用错误。首先,我需要回想一下ORA-01031错误的常见原因。这个错误通常是因为用户没有执行特定操作所需的权限。比如,如果用户尝试访问某个表或执行某个存储过程,但没有相应的权限,就会报这个错误。所以,解决这个问题的第一步应该是检查用户的权限是否足够。 接下来,用户提到DBMS_SNAPSHOT_UTL包的问题,可能是在创建或管理物化视图日志时遇到的。这个包属于SYS用户,普通用户可能需要显式授权才能使用。我记得SYS的包默认只有DBA权限的用户才能访问,所以需要确认用户是否有EXECUTE权限。另外,引用1和2中提到的问题可能与Oracle版本有关,特别是11g的bug可能导致某些存储过程出错。这时候可能需要应用补丁或者升级数据库。 然后,用户还提到ORA-01555和ORA-12034错误。ORA-01555通常与UNDO表空间不足或查询时间过长有关,需要调整UNDO表空间的大小或优化查询。ORA-12034则涉及物化视图日志的问题,可能需要重新创建日志或调整刷新策略。 接下来,我需要考虑如何逐步指导用户解决这些问题。首先检查权限,授予必要的系统权限和对象权限。比如,如果用户需要创建物化视图,可能需要GRANT CREATE MATERIALIZED VIEW。然后检查SYS包的权限,比如DBMS_SNAPSHOT_UTL,可能需要用SYSDBA用户授予EXECUTE权限。 如果权限没有问题,可能需要考虑数据库版本的问题。引用2提到Oracle 11g的bug,如果在10g上没问题,可能需要查看是否触发了已知的bug,并检查是否有可用的补丁。此外,ORA-01555的问题需要调整UNDO表空间,增加大小或保留时间,避免长事务导致的错误。 最后,关于物化视图日志的问题,如ORA-12034,可能需要检查日志是否损坏,必要时重建,并确保刷新操作在合理的时间窗口内完成,避免数据不一致。 用户可能需要具体的步骤示例,比如如何授予权限,如何检查UNDO配置,如何重建物化视图日志等。同时,需要提醒用户谨慎操作SYS对象,最好在测试环境验证后再应用到生产环境。如果有必要,联系Oracle支持处理潜在的bug。</think>### 分步解决方案 #### **1. 解决 ORA-01031 权限不足问题** **步骤 1:确认操作所需的权限** - 若涉及创建/修改对象(如表、物化视图),需检查用户是否具备以下权限: ```sql GRANT CREATE TABLE, CREATE MATERIALIZED VIEW, CREATE ANY SNAPSHOT TO [用户名]; ``` - 若涉及系统包(如`DBMS_SNAPSHOT_UTL`),需授予`EXECUTE`权限: ```sql GRANT EXECUTE ON SYS.DBMS_SNAPSHOT_UTL TO [用户名]; ``` **步骤 2:检查角色继承** - 确保用户未被限制通过角色继承权限。Oracle 中某些权限需直接授予用户而非角色: ```sql SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE = '[用户名]'; ``` **步骤 3:验证 SYS 对象权限** - 若报错涉及`SYS.DBMS_SNAPSHOT_UTL`,需以`SYSDBA`身份检查包状态和权限: ```sql SELECT OBJECT_NAME, STATUS FROM DBA_OBJECTS WHERE OWNER = 'SYS' AND OBJECT_NAME = 'DBMS_SNAPSHOT_UTL'; GRANT EXECUTE ON SYS.DBMS_SNAPSHOT_UTL TO [用户名]; ``` **示例场景** 若用户执行物化视图刷新时出现权限不足: ```sql -- 直接授予物化视图相关权限 GRANT CREATE MATERIALIZED VIEW TO scott; GRANT EXECUTE ON DBMS_SNAPSHOT TO scott; ``` --- #### **2. 处理 DBMS_SNAPSHOT 和 SYS 包调用问题** **步骤 1:验证包状态** - 检查`DBMS_SNAPSHOT_UTL`是否有效: ```sql SELECT OBJECT_NAME, STATUS FROM DBA_OBJECTS WHERE OBJECT_NAME IN ('DBMS_SNAPSHOT_UTL', 'DBMS_SNAPSHOT'); ``` 若状态为`INVALID`,需重新编译: ```sql ALTER PACKAGE SYS.DBMS_SNAPSHOT_UTL COMPILE; ``` **步骤 2:处理 Oracle 版本兼容性问题** - 若问题在 Oracle 11g 中出现(如引用[^2]所述),检查是否触发已知 Bug: - 查询 Oracle 支持文档(如 MOS),确认 Bug 编号(如 Bug 12345678)。 - 应用官方补丁或升级到修复版本。 **步骤 3:重建物化视图日志(ORA-12034)** 若报错`ORA-12034: 实体化视图日志比上次刷新后的内容新`[^5]: ```sql -- 删除原有日志 DROP MATERIALIZED VIEW LOG ON scott.user_table; -- 重新创建日志 CREATE MATERIALIZED VIEW LOG ON scott.user_table WITH PRIMARY KEY, ROWID; ``` --- #### **3. 相关错误 ORA-01555 的预防** - **调整 UNDO 表空间**: ```sql ALTER DATABASE DATAFILE '/path/undo.dbf' RESIZE 10G; ALTER SYSTEM SET UNDO_RETENTION = 3600; -- 单位:秒 ``` - **避免长事务**:优化查询逻辑,减少全表扫描和锁竞争[^4]。 --- ### 总结操作顺序 1. 授予显式权限(对象权限 + SYS 包权限)。 2. 检查并修复无效的 SYS 包。 3. 处理版本兼容性问题(补丁/升级)。 4. 重建物化视图日志(针对 ORA-12034)。 5. 调整 UNDO 配置(针对 ORA-01555)。 ### 注意事项 - **谨慎操作 SYS 对象**:直接修改 SYS 拥有的包可能导致系统不稳定,建议先在测试环境验证。 - **监控 UNDO 使用**:通过`V$UNDOSTAT`视图分析 UNDO 空间使用趋势[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值