SQL> ALTER DATABASE ADD LOGFILE THREAD 2
2 GROUP 3 (
3 '+DATA/racdb/onlinelog/group_3.269.804115405',
4 '+RECO/racdb/onlinelog/group_3.261.804115405'
5 ) SIZE 50M BLOCKSIZE 512 REUSE,
6 GROUP 4 (
7 '+DATA/racdb/onlinelog/group_4.270.804115405',
8 '+RECO/racdb/onlinelog/group_4.263.804115407'
9 ) SIZE 50M BLOCKSIZE 512 REUSE;
ALTER DATABASE ADD LOGFILE THREAD 2
*
ERROR at line 1:
ORA-01276: Cannot add file +DATA/racdb/onlinelog/group_3.269.804115405. File
has an Oracle Managed Files file name.
对于ASM,使用了OMF命名规则时不能指定具体的文件名,只需要指定diskgroup名即可:
SQL> ALTER DATABASE ADD LOGFILE THREAD 2
2 GROUP 3 (
3 '+DATA',
4 '+RECO'
5 ) SIZE 50M BLOCKSIZE 512 REUSE,
6 GROUP 4 (
7 '+DATA',
8 '+RECO'
9 ) SIZE 50M BLOCKSIZE 512 REUSE;
Database altered.
SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/racdb/tempfile/temp.263.783272821'
2 SIZE 39845888 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
Tablespace altered.
6. 设置cluster_database=true :
SQL> alter system set cluster_database=true scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
7. 启动所有实例:
[oracle@rac1 trace]$ srvctl start database -d RACDB
[oracle@rac1 trace]$ srvctl status database -d RACDB
Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2