ORACLE uses the ASM storage. When creating a database, the redundant attribute of the disk group uses EXTERN. To change the disk group to NORMAL, perform the following steps:
ORACLE uses the ASM storage. When creating a database, the redundant attribute of the disk group uses EXTERN. To change the disk group to NORMAL, perform the following steps:
1. Create a new disk group with the expected attributes
[Root @ Oracle-LAB ~] # Su-grid
[Grid @ Oracle-LAB ~] $ Asmca
Or run the following command:
[Grid @ Oracle-LAB ~] $ Sqlplus/as sysasm
SQL> CREATE DISKGROUP DATA NORMAL REDUNDANCY DISK '/dev/raw/raw1 'size 5120 mdisk'/dev/raw/raw2 'size 5120 mdisk'/dev/raw/raw3' SIZE 5120 M;
2. Check the disk group
[Grid @ Oracle-LAB ~] $ Sqlplus/as sysasm
SQL> select state, name, type from v $ asm_diskgroup;
STATE NAME TYPE
-----------------------------------------------
MOUNTED DATA EXTERN
MOUNTED FRA EXTERN
MOUNTED DATA01 NORMAL
3. Back up existing databases
[Oracle @ Oracle-LAB ~] $ Sqlplus/nolog
SQL> conn/as sysdba
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------------
Db_name string ORCL
SQL> show parameter control
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 7
Control_files string + DATA/orcl/controlfile/current
. 260.833734379
Control_management_pack_access string DIAGNOSTIC + TUNING
There are two ways to generate a new control file in a new disk group (recommended method 2 ):
Method 1: generate a backup of an existing control file:
Back up control files to new disk groups
SQL> alter database backup controlfile to '+ DATA01 ';
Database altered.
View the backup control file:
[Root @ Oracle-LABsoftware] # su-grid
[Grid @ Oracle-LAB ~] $ Asmcmd
ASMCMD> ls + DATA01/ORCL/CONTROLFILE/
Backup.256.833381229
Set initialization parameters:
SQL> alter system setcontrol_files = '+ DATA01/ORCL/CONTROLFILE/Backup.256.833381229' scope = spfile;
System altered.
[Oracle @ Oracle-LAB ~] $ Rman target/
Using targetdatabase control file instead of recovery catalog
Database closed
Databasedismounted
Oracle instance shut down
RMAN> startup nomount
Connected totarget database (not started)
Oracle instancestarted
Total SystemGlobal Area 1653518336 bytes
Fixed Size 2228904 bytes
VariableSize 973081944 bytes
DatabaseBuffers 671088640 bytes
Redo Buffers 7118848 bytes
Generate an existing control file from the original control file:
RMAN> restore controlfile from '+ DATA/orcl/controlfile/current.259.833372337 ';
Starting restoreat 05-DEC-13
Allocatedchannel: ORA_DISK_1
ChannelORA_DISK_1: SID = 13 device type = DISK
ChannelORA_DISK_1: copied control file copy
Output file name = + DATA01/orcl/controlfile/backup.256.833381229
Finished restore at 05-DEC-13
Method 2: Use the following method to add a control file:
SQL> alter system set control_files = '+ DATA/orcl/controlfile/current.260.833734379', '+ DATA01' scope = spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instanceshut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2228904 bytes
Variable Size 973081944 bytes
Database Buffers 671088640 bytes
Redo Buffers 7118848 bytes
SQL> quit
[Oracle @ Oracle-LAB ~] $ Rman target/
RMAN> restore controlfile from '+ DATA/orcl/controlfile/current.260.833734379 ';
Starting restore at 09-DEC-13
Using target database control file instead of recoverycatalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 135 device type = DISK
Channel ORA_DISK_1: copied control file copy
Output file name = + DATA/orcl/controlfile/current.260.833734379
Output filename = + DATA01/orcl/controlfile/current.256.833744103
Finished restore at 09-DEC-13
RMAN> quit
Recovery Manager complete.
[Oracle @ Oracle-LAB ~] $ Sqlplus/nolog
SQL> conn/as sysdba
Connected.
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL> show parameter control;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 7
Control_files string + DATA/orcl/controlfile/current
. 260.833734379, + DATA01/orcl/c
Ontrolfile/current.256.833744103
Control_management_pack_access string DIAGNOSTIC + TUNING
SQL> alter system setcontrol_files = '+ DATA01/orcl/controlfile/current.256.833744103' scope = spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2228904 bytes
Variable Size 973081944 bytes
Database Buffers 671088640 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL> show parameter control;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 7
Control_files string + DATA01/orcl/controlfile/curre
Nt.256.833744103
Control_management_pack_access string DIAGNOSTIC + TUNING
RMAN> shutdown immediate
RMAN> startup nomount
RMAN> alter database mount;
Database mounted
Released channel: ORA_DISK_1
RMAN> backup as copy database format '+ DATA01 ';
Starting backupat 05-DEC-13
Allocatedchannel: ORA_DISK_1
ChannelORA_DISK_1: SID = 13 device type = DISK
ChannelORA_DISK_1: starting datafile copy
Input datafilefile number = 00001 name = + DATA/orcl/datafile/system.264.833372265
Output filename = + DATA01/orcl/datafile/system.257.833384045 tag = TAG20131205T153405 RECID = 3 STAMP = 833384056
ChannelORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
ChannelORA_DISK_1: starting datafile copy
Input datafilefile number = 00002 name = + DATA/orcl/datafile/sysaux.263.833372265
Output filename = + DATA01/orcl/datafile/sysaux.258.833384061 tag = TAG20131205T153405 RECID = 4 STAMP = 833384069
ChannelORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
ChannelORA_DISK_1: starting datafile copy
Input datafilefile number = 00005 name = + DATA/orcl/datafile/example.268.833372347
Output filename = + DATA01/orcl/datafile/example.259.833384075 tag = TAG20131205T153405 RECID = 5 STAMP = 833384080
ChannelORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
ChannelORA_DISK_1: starting datafile copy
Input datafilefile number = 00003 name = + DATA/orcl/datafile/undotbs1.267.833372265
Output filename = + DATA01/orcl/datafile/undotbs1.260.833384083 tag = TAG20131205T153405RECID = 6 STAMP = 833384084
ChannelORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
ChannelORA_DISK_1: starting datafile copy
Copying currentcontrol file
Output filename = + DATA01/orcl/controlfile/backup.261.833384087 tag = TAG20131205T153405RECID = 7 STAMP = 833384086
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
ChannelORA_DISK_1: starting datafile copy
Input datafilefile number = 00004 name = + DATA/orcl/datafile/users.269.833372265
Output filename = + DATA01/orcl/datafile/users.262.833384087 tag = TAG20131205T153405 RECID = 8 STAMP = 833384087
ChannelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
ChannelORA_DISK_1: starting full datafile backup set
ChannelORA_DISK_1: specifying datafile (s) in backup set
Including currentSPFILE in backup set
Channel ORA_DISK_1: starting piece 1 at 05-DEC-13
ChannelORA_DISK_1: finished piece 1 at 05-DEC-13
Piecehandle = + DATA01/orcl/backupset/2013_12_05/nnsnf0_tag20131205t153405_0.263.833384089tag = TAG20131205T153405 comment = NONE
ChannelORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-DEC-13
Check the backup database image
RMAN> list copy of database;
,