Lokeshaggarwal's DBA

Live the life you love. Love the life you live

ORA-15033 disk belongs to diskgroup


Recently, we have faced one issue while adding disk into the diskgroup.

We have one diskgroup viz. CRS created with “NORMAL” redundancy. Someone in the UNIX team replaced the disk without running “ALTER DISKGROUP” Command.

So, while adding diskgroup, we got the below error:

alter diskgroup CRS add
FAILGROUP CRS01_0000 disk ‘/dev/rhdiskpower98’ rebalance power 11;SQL>   2
alter diskgroup CRS add
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk ‘/dev/rhdiskpower98’ belongs to diskgroup “CRS”

As the “Alter DiskGroup DATA DROP DISK” command has not been run so, we need to add disk with Force option.

SQL> alter diskgroup CRS add
FAILGROUP CRS01_0000 disk ‘/dev/rhdiskpower98’ force rebalance power 11;

Diskgroup altered.

SQL> SELECT
NVL(a.name, ‘[CANDIDATE]’)      disk_group_name
, b.path                          disk_file_path
, b.name                          disk_file_name
, b.failgroup                     disk_file_fail_group
FROM
v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number) where b.path=’/dev/rhdiskpower98′
ORDER BY
a.name;

DISK_GROUP_NAME                          DISK_FILE_PATH                           DISK_FILE_NAME                 DISK_FILE_FAIL_GROUP
—————————————- —————————————- —————————— ——————————
CRS                                    /dev/rhdiskpower98                       CRS01_0000                     CRS01_0000

So, problem can be resolved by using the FORCE clause while adding disk.

February 26, 2016 Posted by | ASM, Uncategorized | Leave a comment

amdu – ASM Metadata Dump Utility


  • Allows to dump ASM contents without opening diskgroups, allows to check ASM file mirroring when using normal redundancy
  • powerful tool for troubleshooting, introduced in 11g, usable in 10g too.

In the below demonstration, we will try to extract the controlfile, although. the diskgorups are in mounted state.

[grid@rac2 bin]$ . oraenv
ORACLE_SID = [grid] ? +ASM2
The Oracle base for ORACLE_HOME=/raczone/grid_home is /raczone/11.2.0
[grid@rac2 bin]$ ./asmcmd find –type controlfile + “*”asmcmd find –type controlfile + “*”

[grid@rac2 bin]$ ./asmcmd find –type controlfile + “*”
+DATA/DEV/CONTROLFILE/Current.260.802353245
+FRA/DEV/CONTROLFILE/Current.256.802353245

[grid@rac2 bin]$ ./asmcmd lsdsk -G DATA
Path
ORCL:DATA1

Let’s extract that controlfile out of the disk group DATA onto the file system:

[grid@rac2 tmp]$ amdu -diskstring=”ORCL:*” -extract DATA.260 -output control.260 -noreport -nodir
AMDU-00204: Disk N0001 is in currently mounted diskgroup DATA
AMDU-00201: Disk N0001: ‘ORCL:DATA1’
[grid@rac2 tmp]$ ll
total 18088
-rw-r–r– 1 grid oinstall 18497536 Dec 19 15:53 control.260

[grid@rac2 tmp]$ ls -lrt
total 18088
-rw-r–r– 1 grid oinstall 18497536 Dec 19 15:53 control.260
[grid@rac2 tmp]$ /raczone/grid_home/bin/./amdu -dump DATA -noimage
amdu_2012_12_19_15_55_41/
AMDU-00204: Disk N0001 is in currently mounted diskgroup DATA
AMDU-00201: Disk N0001: ‘ORCL:DATA1’
[grid@rac2 tmp]$ ls
amdu_2012_12_19_15_55_41 control.260
[grid@rac2 tmp]$ cd amdu_2012_12_19_15_55_41/
[grid@rac2 amdu_2012_12_19_15_55_41]$ ll
total 20
-rw-r–r– 1 grid oinstall 8320 Dec 19 15:55 DATA.map
-rw-r–r– 1 grid oinstall 4791 Dec 19 15:55 report.txt
[grid@rac2 amdu_2012_12_19_15_55_41]$ more report.txt
-*-amdu-*-

******************************* AMDU Settings ********************************
ORACLE_HOME = /raczone/grid_home
System name: Linux
Node name: rac2.raczone.com
Release: 2.6.18-128.el5
Version: #1 SMP Wed Dec 17 11:42:39 EST 2008
Machine: i686
amdu run: 19-DEC-12 15:55:41
Endianess: 1

——————————— Operations ———————————
-dump DATA

——————————- Disk Selection ——————————-
-diskstring ”

—————————— Reading Control ——————————-

——————————- Output Control ——————————-
-noimage

********************************* DISCOVERY **********************************

—————————– DISK REPORT N0001 ——————————
Disk Path: ORCL:DATA1
Unique Disk ID:
Disk Label: DATA1
Physical Sector Size: 512 bytes
Disk Size: 14306 megabytes
Group Name: DATA
Disk Name: DATA1
Failure Group Name: DATA1
Disk Number: 0
Header Status: 3
Disk Creation Time: 2012/12/18 11:38:24.527000
Last Mount Time: 2012/12/19 11:50:59.308000
Compatibility Version: 0x0b200000(11020000)
Disk Sector Size: 512 bytes
Disk size in AUs: 14306 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2012/12/18 11:38:24.388000
File 1 Block 1 location: AU 2
OCR Present: NO

—————————– DISK REPORT N0002 ——————————
Disk Path: ORCL:FRA
Unique Disk ID:
Disk Label: FRA
Physical Sector Size: 512 bytes
Disk Size: 7814 megabytes
Group Name: FRA
Disk Name: FRA
Failure Group Name: FRA
Disk Number: 0
Header Status: 3
Disk Creation Time: 2012/12/18 11:42:08.078000
Last Mount Time: 2012/12/19 11:50:59.843000
Compatibility Version: 0x0b200000(11020000)
Disk Sector Size: 512 bytes
Disk size in AUs: 7814 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2012/12/18 11:42:07.927000
File 1 Block 1 location: AU 2
OCR Present: NO

—————————– DISK REPORT N0003 ——————————
Disk Path: ORCL:VOTE1
Unique Disk ID:
Disk Label: VOTE1
Physical Sector Size: 512 bytes
Disk Size: 1953 megabytes
Group Name: CRS
Disk Name: VOTE1
Failure Group Name: VOTE1
Disk Number: 0
Header Status: 3
Disk Creation Time: 2012/12/17 16:39:42.078000
Last Mount Time: 2012/12/19 11:50:58.746000
Compatibility Version: 0x0b200000(11020000)
Disk Sector Size: 512 bytes
Disk size in AUs: 1953 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2012/12/17 16:39:41.936000
File 1 Block 1 location: AU 2
OCR Present: YES

***************** Slept for 6 seconds waiting for heartbeats *****************

************************** SCANNING DISKGROUP DATA ***************************
Creation Time: 2012/12/18 11:38:24.388000
Disks Discovered: 1
Redundancy: 1
AU Size: 1048576 bytes
Metadata Block Size: 4096 bytes
Physical Sector Size: 512 bytes
Metadata Stride: 113792 AU
Duplicate Disk Numbers: 0
—————————- SCANNING DISK N0001 —————————–
Disk N0001: ‘ORCL:DATA1’
AMDU-00204: Disk N0001 is in currently mounted diskgroup DATA
AMDU-00201: Disk N0001: ‘ORCL:DATA1’
** HEARTBEAT DETECTED **
Allocated AU’s: 1559
Free AU’s: 12747
AU’s read for dump: 104
Block images saved: 23563
Map lines written: 104
Heartbeats seen: 1
Corrupt metadata blocks: 0
Corrupt AT blocks: 0
————————- SUMMARY FOR DISKGROUP DATA ————————-
Allocated AU’s: 1559
Free AU’s: 12747
AU’s read for dump: 104
Block images saved: 23563
Map lines written: 104
Heartbeats seen: 1
Corrupt metadata blocks: 0
Corrupt AT blocks: 0
******************************* END OF REPORT ********************************

December 19, 2012 Posted by | ASM | Leave a comment

Backup and Restore of ASM Metadata in Oracle 11gR2 (md_backup and md_restore)


In this article I will give you a demo how to backup a disk group using md_backup command and  md_restore to obtain the SQL statements to recreate the disk groups and all the dependencies such as directories,templates, aliases and disk group attributes.

 

[grid@rac2 bin]$ ./asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/
ASMCMD> md_backup -h
Unknown option: h
usage: md_backup <backup_file>
[-G ‘<diskgroup_name>,<diskgroup_name>,…’]
help: help md_backup
ASMCMD> md_backup /raczone/asmbackup.bcp -G CRS,DATA,FRA
Disk group metadata to be backed up: CRS
Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: FRA
Current alias directory path: scan-cluster
Current alias directory path: scan-cluster/ASMPARAMETERFILE
Current alias directory path: scan-cluster/OCRFILE
Current alias directory path: DEV/TEMPFILE
Current alias directory path: DEV
Current alias directory path: DEV/PARAMETERFILE
Current alias directory path: DEV/DATAFILE
Current alias directory path: DEV/CONTROLFILE
Current alias directory path: DEV/ONLINELOG
Current alias directory path: DEV/CONTROLFILE
Current alias directory path: DEV
Current alias directory path: DEV/ONLINELOG
ASMCMD-09345: could not open intermediate file ‘/raczone/asmbackup.bcp’
Permission denied
ASMCMD> md_backup /tmp/asmbackup.bcp -G CRS,DATA,FRA
Disk group metadata to be backed up: CRS
Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: FRA
Current alias directory path: scan-cluster
Current alias directory path: scan-cluster/ASMPARAMETERFILE
Current alias directory path: scan-cluster/OCRFILE
Current alias directory path: DEV/TEMPFILE
Current alias directory path: DEV
Current alias directory path: DEV/PARAMETERFILE
Current alias directory path: DEV/DATAFILE
Current alias directory path: DEV/CONTROLFILE
Current alias directory path: DEV/ONLINELOG
Current alias directory path: DEV/CONTROLFILE
Current alias directory path: DEV
Current alias directory path: DEV/ONLINELOG
ASMCMD> md_restore /tmp/asmbackup.bcp –full -S /tmp/ASM_diskgroup.sql
Current Diskgroup metadata being restored: CRS
Current Diskgroup metadata being restored: DATA
Current Diskgroup metadata being restored: FRA
ASMCMD>

 

[root@rac2 tmp]# cat ASM_diskgroup.sql
create diskgroup CRS EXTERNAL redundancy disk ‘ORCL:VOTE1’ name VOTE1 size 1953M attribute ‘compatible.asm’ = ‘11.2.0.0.0’ , ‘compatible.rdbms’ = ‘10.1.0.0.0’ , ‘au_size’ = ‘1048576’, ‘sector_size’ = ‘512’, ‘cell.smart_scan_capable’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.TEMPFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.PARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.TEMPFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.PARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAGUARDCONFIG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘ACCESS_CONTROL.UMASK’ = ‘066’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASM_STALE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ARCHIVELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CONTROLFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CHANGETRACKING.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.BACKUPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ARCHIVELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CHANGETRACKING.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ONLINELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CHANGETRACKING.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.BACKUPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘DISK_REPAIR_TIME’ = ‘3.6h’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.AUTOBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DUMPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHBACK.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DUMPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DUMPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASM_STALE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHBACK.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.XTRANSPORT.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CONTROLFILE.STRIPE’ = ‘1’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.AUTOBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CONTROLFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASM_STALE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHBACK.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAGUARDCONFIG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE_VERSION’ = ‘186646528’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.PARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.PARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.BACKUPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ONLINELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘ACCESS_CONTROL.ENABLED’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.TEMPFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ONLINELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.AUTOBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASM_STALE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.XTRANSPORT.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.DUMPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.TEMPFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ONLINELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ARCHIVELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.OCRFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ARCHIVELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.FLASHBACK.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.XTRANSPORT.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CONTROLFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.BACKUPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.XTRANSPORT.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.CHANGETRACKING.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS set attribute ‘TEMPLATE.AUTOBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/CRS alter template AUTOBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template ASMPARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template OCRBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template ARCHIVELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template ASM_STALE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template ONLINELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template DATAFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template OCRFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template CHANGETRACKING attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template ASMPARAMETERBAKFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template FLASHFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template TEMPFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template XTRANSPORT attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template DATAGUARDCONFIG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template FLASHBACK attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template PARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template CONTROLFILE attributes (UNPROTECTED FINE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template BACKUPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/CRS alter template DUMPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR */ CRS add directory ‘+CRS/scan-cluster’;
alter diskgroup /*ASMCMD AMBR */ CRS add directory ‘+CRS/scan-cluster/ASMPARAMETERFILE’;
alter diskgroup /*ASMCMD AMBR */ CRS add directory ‘+CRS/scan-cluster/OCRFILE’;
create diskgroup DATA EXTERNAL redundancy disk ‘ORCL:DATA1’ name DATA1 size 14306M attribute ‘compatible.asm’ = ‘11.2.0.0.0’ , ‘compatible.rdbms’ = ‘10.1.0.0.0’ , ‘au_size’ = ‘1048576’, ‘sector_size’ = ‘512’, ‘cell.smart_scan_capable’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.TEMPFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.PARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.TEMPFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.PARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAGUARDCONFIG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘ACCESS_CONTROL.UMASK’ = ‘066’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASM_STALE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ARCHIVELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CONTROLFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CHANGETRACKING.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.BACKUPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ARCHIVELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CHANGETRACKING.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ONLINELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CHANGETRACKING.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.BACKUPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘DISK_REPAIR_TIME’ = ‘3.6h’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHBACK.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.AUTOBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DUMPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASM_STALE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DUMPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DUMPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHBACK.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.XTRANSPORT.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CONTROLFILE.STRIPE’ = ‘1’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.AUTOBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CONTROLFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASM_STALE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHBACK.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAGUARDCONFIG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE_VERSION’ = ‘186646528’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.PARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.PARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.BACKUPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ONLINELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘ACCESS_CONTROL.ENABLED’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.TEMPFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ONLINELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASM_STALE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.AUTOBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.XTRANSPORT.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.DUMPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.TEMPFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.OCRFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ONLINELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ARCHIVELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ARCHIVELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.FLASHBACK.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.XTRANSPORT.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CONTROLFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.BACKUPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.XTRANSPORT.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.CHANGETRACKING.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA set attribute ‘TEMPLATE.AUTOBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/DATA alter template OCRBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template ASMPARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template AUTOBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template ARCHIVELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template ONLINELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template BACKUPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template DATAFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template XTRANSPORT attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template DATAGUARDCONFIG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template ASMPARAMETERBAKFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template FLASHFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template TEMPFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template OCRFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template CHANGETRACKING attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template FLASHBACK attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template PARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template CONTROLFILE attributes (UNPROTECTED FINE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template ASM_STALE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/DATA alter template DUMPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV’;
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV/DATAFILE’;
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV/CONTROLFILE’;
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV/PARAMETERFILE’;
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV/TEMPFILE’;
alter diskgroup /*ASMCMD AMBR */ DATA add directory ‘+DATA/DEV/ONLINELOG’;
create diskgroup FRA EXTERNAL redundancy disk ‘ORCL:FRA’ name FRA size 7814M attribute ‘compatible.asm’ = ‘11.2.0.0.0’ , ‘compatible.rdbms’ = ‘10.1.0.0.0’ , ‘au_size’ = ‘1048576’, ‘sector_size’ = ‘512’, ‘cell.smart_scan_capable’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.TEMPFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.PARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.TEMPFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.PARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAGUARDCONFIG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘ACCESS_CONTROL.UMASK’ = ‘066’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASM_STALE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ARCHIVELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CONTROLFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CHANGETRACKING.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.BACKUPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ARCHIVELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CHANGETRACKING.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ONLINELOG.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CHANGETRACKING.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.BACKUPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘DISK_REPAIR_TIME’ = ‘3.6h’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.AUTOBACKUP.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DUMPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHBACK.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DUMPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DUMPSET.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASM_STALE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHBACK.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.XTRANSPORT.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CONTROLFILE.STRIPE’ = ‘1’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.AUTOBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CONTROLFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASM_STALE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHBACK.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAGUARDCONFIG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE_VERSION’ = ‘186646528’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.PARAMETERFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.PARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.BACKUPSET.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ONLINELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘ACCESS_CONTROL.ENABLED’ = ‘FALSE’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.TEMPFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ONLINELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRBACKUP.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.AUTOBACKUP.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASM_STALE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.XTRANSPORT.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.DUMPSET.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.TEMPFILE.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ONLINELOG.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ARCHIVELOG.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.OCRFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ARCHIVELOG.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.FLASHBACK.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.XTRANSPORT.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CONTROLFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.BACKUPSET.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.XTRANSPORT.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY’ = ’17’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.CHANGETRACKING.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA set attribute ‘TEMPLATE.AUTOBACKUP.STRIPE’ = ‘0’;
alter diskgroup /*ASMCMD AMBR*/FRA alter template DATAGUARDCONFIG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template ONLINELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template TEMPFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template ASMPARAMETERBAKFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template ASM_STALE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template ASMPARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template PARAMETERFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template BACKUPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template CHANGETRACKING attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template ARCHIVELOG attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template DUMPSET attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template OCRBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template FLASHBACK attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template AUTOBACKUP attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template XTRANSPORT attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template DATAFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template CONTROLFILE attributes (UNPROTECTED FINE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template OCRFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR*/FRA alter template FLASHFILE attributes (UNPROTECTED COARSE);
alter diskgroup /*ASMCMD AMBR */ FRA add directory ‘+FRA/DEV’;
alter diskgroup /*ASMCMD AMBR */ FRA add directory ‘+FRA/DEV/CONTROLFILE’;
alter diskgroup /*ASMCMD AMBR */ FRA add directory ‘+FRA/DEV/ONLINELOG’;
[root@rac2 tmp]#

 

December 19, 2012 Posted by | ASM | Leave a comment

Deleting an OCR in 11gR2


[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +DATA
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]# ./ocrconfig -delete +DATA
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]#

December 13, 2012 Posted by | ASM | Leave a comment

Adding an OCR on a separate Diskgroup 11gR2


[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]# /usr/sbin/oracleasm listdisks
DATA1
FRA
VOTE1

[root@rac2 bin]# ./ocrconfig -add +Data

PROT-30: The Oracle Cluster Registry location to be added is not accessible

What does this error mean?

By default when you create a diskgroup in 11gR2 RAC from the command prompt using SQL plus, the default compatibility attribute of the diskgroup is set to 10.1. This issue does not occur if you create it through ASMCA.

[oracle@rac2 bin]$ . oraenv

ORACLE_SID = [+ASM1] ?
The Oracle base for ORACLE_HOME=/raczone/grid_home1 is /raczone/11.2.0.1
[oracle@rac2 bin]$ ./sqlplus “/as sysdba”

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 13 15:27:42 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Real Application Clusters and Automatic Storage Management options

SQL> desc v$asm_diskgroup
Name Null? Type
—————————————– ——– —————————-
GROUP_NUMBER NUMBER
NAME VARCHAR2(30)
SECTOR_SIZE NUMBER
BLOCK_SIZE NUMBER
ALLOCATION_UNIT_SIZE NUMBER
STATE VARCHAR2(11)
TYPE VARCHAR2(6)
TOTAL_MB NUMBER
FREE_MB NUMBER
HOT_USED_MB NUMBER
COLD_USED_MB NUMBER
REQUIRED_MIRROR_FREE_MB NUMBER
USABLE_FILE_MB NUMBER
OFFLINE_DISKS NUMBER
COMPATIBILITY VARCHAR2(60)
DATABASE_COMPATIBILITY VARCHAR2(60)
VOTING_FILES VARCHAR2(1)

SQL> select TOTAL_MB,FREE_MB,VOTING_FILES,ALLOCATION_UNIT_SIZE,BLOCK_SIZE from v$asm_diskgroup;

TOTAL_MB FREE_MB V ALLOCATION_UNIT_SIZE BLOCK_SIZE
———- ———- – ——————– ———-
1953 1557 N 1048576 4096
11445 8947 N 1048576 4096
7814 7484 N 1048576 4096

SQL> COL NAME FORMAT A12
SQL> COL COMPATIBILITY FORMAT A20
SQL> COL DATABASE_COMPATIBILITY FORMAT A20
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 10.1.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

[grid@rac2 bin]$ ./sqlplus “/as sysasm”

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 13 15:38:42 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBILITY.ASM’=’11.2’;
alter diskgroup data set ATTRIBUTE ‘COMPATIBILITY.ASM’=’11.2’
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15242: could not set attribute COMPATIBILITY.ASM
ORA-15240: attribute name COMPATIBILITY.ASM is invalid
SQL> COL NAME FORMAT A12
SQL> COL COMPATIBILITY FORMAT A20
SQL> COL DATABASE_COMPATIBILITY FORMAT A20
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 10.1.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBLE.RDBMS’=’11.2’;

Diskgroup altered.

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBLE.ASM’=’11.2’;

Diskgroup altered.

SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 11.2.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

SQL> host
[grid@rac2 bin]$

[root@rac2 bin]# cd /raczone/grid_home1/bin/
[root@rac2 bin]# ./ocrconfig -add +DATA
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +DATA
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]#

December 13, 2012 Posted by | ASM | Leave a comment

Controlfile Multiplexing using ASM


SQL> show parameter control

NAME                                 TYPE        VALUE
———————————— ———– ——————————
control_file_record_keep_time        integer     7
control_files                        string      +DATA/dbtest/controlfile/curre
nt.261.720140771
SQL> alter system checkpoint;

System altered.

SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771

SQL> alter system set control_files=’+DATA/dbtest/controlfile/current.261.720140771′,’+DATA’ scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              88080424 bytes
Database Buffers           71303168 bytes
Redo Buffers                6369280 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=+ASM
-bash-3.2$ asmcmd
ASMCMD> cd data
ASMCMD> cd dbtest
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
FLASHBACK/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfiledbtest.ora
ASMCMD> cd controlfile
ASMCMD> ls
Current.260.720140773
Current.261.720140771
backup.311.723005013
backup.324.722927111
ASMCMD> ls -l
Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  HIGH    FINE     JUN 29 05:00:00  Y    Current.260.720140773
CONTROLFILE  HIGH    FINE     JUN 30 02:00:00  Y    Current.261.720140771
CONTROLFILE  HIGH    FINE     JUN 30 02:00:00  Y    backup.311.723005013
CONTROLFILE  HIGH    FINE     JUN 29 05:00:00  Y    backup.324.722927111
ASMCMD> exit
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jun 30 02:45:48 2010

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

alte
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=dbtest
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jun 30 02:46:12 2010

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> alter database open;

Database altered.

SQL> alter system set control_files=’+DATA/dbtest/controlfile/current.261.720140771′,’+data/dbtest/controlfile/backup.311.723005013′ scope=spfile;

System altered.

SQL> select name from v$cnotrolfile;
select name from v$cnotrolfile
*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771
+DATA/dbtest/controlfile/backup.311.723005013

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              92274728 bytes
Database Buffers           67108864 bytes
Redo Buffers                6369280 bytes
Database mounted.
Database opened.
SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771
+DATA/dbtest/controlfile/backup.311.723005013

SQL>

June 30, 2010 Posted by | ASM | Leave a comment

Adding datafile in ASM


SQL> select name from v$tablespace;

NAME
——————————
SYSTEM
UNDOTBS1
SYSAUX
USERS
TEMP

SQL> select name from v$datafile;

NAME
——————————————————————————–
+DATA1/nonasmtoasm/datafile/system.259.721108803
+DATA1/nonasmtoasm/datafile/undotbs1.261.721108865
+DATA1/nonasmtoasm/datafile/sysaux.260.721108841
+DATA1/nonasmtoasm/datafile/users.262.721108873

You have to define diskgroup name while adding datafile

SQL> select name from v$asm_diskgroup;

NAME
——————————
DATA1
DATA

Above we are having two asm diskgorup

SQL> alter tablespace users add datafile ‘+data1’ size 5M;

Tablespace altered.

SQL> select name from v$datafile;

NAME
——————————————————————————–
+DATA1/nonasmtoasm/datafile/system.259.721108803
+DATA1/nonasmtoasm/datafile/undotbs1.261.721108865
+DATA1/nonasmtoasm/datafile/sysaux.260.721108841
+DATA1/nonasmtoasm/datafile/users.262.721108873
+DATA1/nonasmtoasm/datafile/users.269.721187971

SQL>

June 9, 2010 Posted by | ASM | 2 Comments

ORA-16038: log 3 sequence# 13 cannot be archived ORA-19504: failed to create file “”


When you try to open the database you may get the error ORA-16038,ORA-19809, ORA-00312.

[root@localhost ~]# su – oracle
-bash-3.2$ export ORACLE_SID=+asm
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 02:51:44 2010

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

Connected to an idle instance.

SQL> startup mount
ASM instance started

Total System Global Area  130023424 bytes
Fixed Size                  2019032 bytes
Variable Size             102838568 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=dbtest
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 02:52:26 2010

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              96469032 bytes
Database Buffers           62914560 bytes
Redo Buffers                6369280 bytes
Database mounted.
ORA-16038: log 3 sequence# 13 cannot be archived
ORA-19504: failed to create file “”
ORA-00312: online log 3 thread 1:
‘+DATA/dbtest/onlinelog/group_3.266.720140799’
ORA-00312: online log 3 thread 1:
‘+DATA/dbtest/onlinelog/group_3.267.720140805’

Cause of The Problem:
—————————————-
There was an attempt to archived the online log 3 but it could not archive the online log in the available archived log destination. The most common of happening the error is the archive log destination if full. You have flash recovery area configured and rman retention policy is failed to delete any archived or incremental backups and so can’t archived new online log.

Solution – Increase dynamically (without shutdown/startup database) the parameter db_recovery_file_dest_size and delete unwanted archivel log files to free up the space.
SQL> select * from v$asm_client;

GROUP_NUMBER INSTANCE_NAME
———— —————————————————————-
DB_NAME  STATUS
——– ————
SOFTWARE_VERSION
————————————————————
COMPATIBLE_VERSION
————————————————————
1 +asm
dbtest   CONNECTED
10.2.0.1.0
10.2.0.0.0

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ asmcmd
asmcmd: command disallowed by current instance type
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 02:57:53 2010

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from v$logfile;

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

3         ONLINE
+DATA/dbtest/onlinelog/group_3.266.720140799
NO

3         ONLINE
+DATA/dbtest/onlinelog/group_3.267.720140805
YES

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

2 STALE   ONLINE
+DATA/dbtest/onlinelog/group_2.264.720140789
NO

2 STALE   ONLINE
+DATA/dbtest/onlinelog/group_2.265.720140793

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

YES

1         ONLINE
+DATA/dbtest/onlinelog/group_1.262.720140777
NO

1         ONLINE

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

+DATA/dbtest/onlinelog/group_1.263.720140783
YES

6 rows selected.

SQL> SELECT * FROM V$RECOVERY_FILE_DEST;

NAME
——————————————————————————–
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
———– ———- —————– —————
+DATA
5368709120  684480000                 0              24

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     13
Next log sequence to archive   13
Current log sequence           15
SQL> show parameter db_rec

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recovery_file_dest                string      +DATA
db_recovery_file_dest_size           big integer 5G
db_recycle_cache_size                big integer 0
SQL> SELECT * FROM V$RECOVERY_FILE_DEST;

NAME
——————————————————————————–
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
———– ———- —————– —————
+DATA
5368709120  684480000                 0              24

SQL> alter system set db_recovery_file_dest =”” scope=both;
alter system set db_recovery_file_dest =”” scope=both
*
ERROR at line 1:
ORA-01741: illegal zero-length identifier

SQL> alter system set db_recovery_file_dest =” ” scope=both;
alter system set db_recovery_file_dest =” ” scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-38775: cannot disable flash recovery area – flashback database is enabled

SQL> select name,total_mb,free_mb from v$asm_diskgroup;

NAME                             TOTAL_MB    FREE_MB
—————————— ———- ———-
DATA                                 6589       2667

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-16014: log 3 sequence# 13 not archived, no available destinations
ORA-00312: online log 3 thread 1:
‘+DATA/dbtest/onlinelog/group_3.266.720140799’
ORA-00312: online log 3 thread 1:
‘+DATA/dbtest/onlinelog/group_3.267.720140805’

SQL> show parameter db_rec

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recovery_file_dest                string      +DATA
db_recovery_file_dest_size           big integer 5G
db_recycle_cache_size                big integer 0
SQL> alter system set db_recovery_file_dest_size=10G scope=both;

System altered.

SQL>  alter system set db_recovery_file_dest_size=15G scope=both;

System altered.
-bash-3.2$ export ORACLE_SID=dbtest
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 03:06:26 2010

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ rman target /

Recovery Manager: Release 10.2.0.1.0 – Production on Mon Jun 7 03:06:38 2010

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

connected to target database: DBTEST (DBID=1113003619, not open)

RMAN> delete archivelog all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 devtype=DISK

List of Archived Log Copies
Key     Thrd Seq     S Low Time  Name
——- —- ——- – ——— —-
1       1    1       A 27-MAY-10 +DATA/dbtest/archivelog/2010_05_31/thread_1_seq_1.272.720416503
2       1    2       A 31-MAY-10 +DATA/dbtest/archivelog/2010_06_01/thread_1_seq_2.278.720499021
3       1    3       A 01-JUN-10 +DATA/dbtest/archivelog/2010_06_02/thread_1_seq_3.281.720579491
4       1    4       A 02-JUN-10 +DATA/dbtest/archivelog/2010_06_03/thread_1_seq_4.282.720747463
5       1    5       A 03-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_5.283.720755633
6       1    6       A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_6.284.720755869
7       1    7       A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_7.285.720756011
8       1    8       A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_8.286.720756141
9       1    9       A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_9.287.720756203
10      1    10      A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_10.288.720756277
11      1    11      A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_11.289.720756341
12      1    12      A 04-JUN-10 +DATA/dbtest/archivelog/2010_06_04/thread_1_seq_12.290.720756447

Do you really want to delete the above objects (enter YES or NO)? yes
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_05_31/thread_1_seq_1.272.720416503 recid=1 stamp=720416516
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_01/thread_1_seq_2.278.720499021 recid=2 stamp=720499030
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_02/thread_1_seq_3.281.720579491 recid=3 stamp=720579496
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_03/thread_1_seq_4.282.720747463 recid=4 stamp=720747471
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_5.283.720755633 recid=5 stamp=720755682
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_6.284.720755869 recid=6 stamp=720755886
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_7.285.720756011 recid=7 stamp=720756036
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_8.286.720756141 recid=8 stamp=720756155
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_9.287.720756203 recid=9 stamp=720756218
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_10.288.720756277 recid=10 stamp=720756287
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_11.289.720756341 recid=11 stamp=720756356
deleted archive log
archive log filename=+DATA/dbtest/archivelog/2010_06_04/thread_1_seq_12.290.720756447 recid=12 stamp=720756502
Deleted 12 objects

RMAN> exit

SQL> show parameter db_rec

NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recovery_file_dest                string      +DATA
db_recovery_file_dest_size           big integer 15G
db_recycle_cache_size                big integer 0

SQL> alter database open;

Database altered.

SQL>

NOw you can try to run asmcmd also:

-bash-3.2$ asmcmd
ASMCMD> ls
DATA/

June 7, 2010 Posted by | ASM | 2 Comments

Non ASM to ASM Migration


First we create appropirate partition:

[root@localhost arch]# fdisk /dev/sda

The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       10212    81923467+  83  Linux
/dev/sda3           10213       10849     5116702+  8e  Linux LVM
/dev/sda4           10850       19457    69143760    5  Extended
/dev/sda5           10850       11486     5116671   82  Linux swap / Solaris
/dev/sda6           11487       11996     4096543+  83  Linux
/dev/sda7           11997       12060      514048+  83  Linux
/dev/sda8           12061       12650     4739143+  83  Linux
/dev/sda9           12651       12900     2008093+  83  Linux

Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): n
First cylinder (12901-19457, default 12901):
Using default value 12901
Last cylinder or +size or +sizeM or +sizeK (12901-19457, default 19457): 13600

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       10212    81923467+  83  Linux
/dev/sda3           10213       10849     5116702+  8e  Linux LVM
/dev/sda4           10850       19457    69143760    5  Extended
/dev/sda5           10850       11486     5116671   82  Linux swap / Solaris
/dev/sda6           11487       11996     4096543+  83  Linux
/dev/sda7           11997       12060      514048+  83  Linux
/dev/sda8           12061       12650     4739143+  83  Linux
/dev/sda9           12651       12900     2008093+  83  Linux
/dev/sda10          12901       13600     5622718+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost arch]# partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.

Now lets try to create asm disk:

[root@localhost arch]# /etc/init.d/oracleasm createdisk
Action “createdisk” requires two arguments
[root@localhost arch]# /etc/init.d/oracleasm createdisk VOL3
Action “createdisk” requires two arguments
[root@localhost arch]# /etc/init.d/oracleasm createdisk
Action “createdisk” requires two arguments
[root@localhost arch]# /etc/init.d/oracleasm createdisk
Action “createdisk” requires two arguments
[root@localhost arch]# /etc/init.d/oracleasm createdisk VOL3 /dev/sda10
Marking disk “VOL3” as an ASM disk:                        [  OK  ]
[root@localhost arch]# /etc/init.d/oracleasm listdisk
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@localhost arch]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
[root@localhost arch]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@localhost arch]# su – oracle
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 23:41:26 2010

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

Connected to an idle instance.

SQL> exit
Disconnected
-bash-3.2$ export ORACLE_SID=nonasmtoasm
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jun 7 23:41:32 2010

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select name from v$datafile;

NAME
——————————————————————————–
/u01/app/oracle/oradata/nonasmtoasm/system01.dbf
/u01/app/oracle/oradata/nonasmtoasm/undotbs01.dbf
/u01/app/oracle/oradata/nonasmtoasm/sysaux01.dbf
/u01/app/oracle/oradata/nonasmtoasm/users01.dbf

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host
[oracle@localhost ~]$ pwd
/home/oracle
[oracle@localhost ~]$ cd /u01/app/oracle/admin/
+ASM/        dbtest/      nonasmtoasm/ test/        testdb/
[oracle@localhost ~]$ cd /u01/app/oracle/admin/nonasmtoasm/
adump/  bdump/  cdump/  dpdump/ pfile/  udump/
[oracle@localhost ~]$ cd /u01/app/oracle/admin/nonasmtoasm/pfile/
[oracle@localhost pfile]$ vi init.ora.572010231451
[oracle@localhost pfile]$ vi init.ora.572010231451
[oracle@localhost pfile]$ ls
init.ora.572010231451  nonasm.ora
[oracle@localhost pfile]$ pwd
/u01/app/oracle/admin/nonasmtoasm/pfile

We will have to change some of the parameters like:

from:

control_files=(“/u01/app/oracle/oradata/nonasmtoasm/control01.ctl”, “/u01/app/oracle/oradata/nonasmtoasm/control02.ctl”, “/u01/app/oracle/oradata/nonasmtoasm/control03.ctl”)

to:

control_files=(“+DATA1/control01.ctl”, “+DATA1/control02.ctl”, “+DATA1/control03.ctl”)

[oracle@localhost pfile]$ vi nonasm.ora

-bash-3.2$ export ORACLE_SID=nonasmtoasm
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jun 8 03:30:47 2010

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

Connected to an idle instance.

Put database in nomount state and try to recover the controlfile from rman:

SQL> startup nomount pfile=’/u01/app/oracle/admin/nonasmtoasm/pfile/nonasm.ora’;
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              75497512 bytes
Database Buffers           83886080 bytes
Redo Buffers                6369280 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ pwd
/u01/app/oracle/admin/nonasmtoasm/pfile
-bash-3.2$ cd ../
-bash-3.2$ ls
adump  bdump  cdump  dpdump  pfile  udump
-bash-3.2$ cd ../
-bash-3.2$ ls
+ASM  dbtest  nonasmtoasm  test  testdb
-bash-3.2$ no
nohup        notify-send
-bash-3.2$ no
nohup        notify-send
-bash-3.2$ nonasmtoasm/
adump/  bdump/  cdump/  dpdump/ pfile/  udump/
-bash-3.2$ ls
+ASM  dbtest  nonasmtoasm  test  testdb
-bash-3.2$ cd ../
-bash-3.2$ ls
admin           flash_recovery_area  oradata        par_exp02.dmp  scott.dmp
expdpscott.log  impdptest.log        oraInventory   par_exp03.dmp  soe.dmp
expdpsoe.log    noasmtoasm           par_exp01.dmp  product
-bash-3.2$ cd ora
oradata/      oraInventory/
-bash-3.2$ cd oradata/
nonasmtoasm/ test/        testdb/
-bash-3.2$ cd oradata/nonasmtoasm/
control01.ctl  redo01.log     sysaux01.dbf   undotbs01.dbf
control02.ctl  redo02.log     system01.dbf   users01.dbf
control03.ctl  redo03.log     temp01.dbf
-bash-3.2$ cd oradata/nonasmtoasm/
-bash-3.2$ pwd
/u01/app/oracle/oradata/nonasmtoasm
-bash-3.2$ export ORACLE_SID=nonasmtoasm

-bash-3.2$ pwd
/u01/app/oracle/oradata/nonasmtoasm
-bash-3.2$ ls
control01.ctl  redo01.log  sysaux01.dbf  undotbs01.dbf
control02.ctl  redo02.log  system01.dbf  users01.dbf
control03.ctl  redo03.log  temp01.dbf
-bash-3.2$ rman target /

Recovery Manager: Release 10.2.0.1.0 – Production on Tue Jun 8 03:52:56 2010

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

connected to target database: nonasmto (not mounted)

RMAN> restore controlfile from ‘/u01/app/oracle/oradata/nonasmtoasm/control01.ctl’;

Starting restore at 08-JUN-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

channel ORA_DISK_1: copied control file copy
output filename=+DATA1/control01.ctl
output filename=+DATA1/control02.ctl
output filename=+DATA1/control03.ctl
Finished restore at 08-JUN-10

RMAN>  alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> backup as copy database format ‘+DATA1’;

Starting backup at 08-JUN-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=152 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=/u01/app/oracle/oradata/nonasmtoasm/system01.dbf
output filename=+DATA1/nonasmtoasm/datafile/system.259.721108803 tag=TAG20100608T040001 recid=1 stamp=721108834
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:36
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=/u01/app/oracle/oradata/nonasmtoasm/sysaux01.dbf
output filename=+DATA1/nonasmtoasm/datafile/sysaux.260.721108841 tag=TAG20100608T040001 recid=2 stamp=721108854
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=/u01/app/oracle/oradata/nonasmtoasm/undotbs01.dbf
output filename=+DATA1/nonasmtoasm/datafile/undotbs1.261.721108865 tag=TAG20100608T040001 recid=3 stamp=721108867
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=/u01/app/oracle/oradata/nonasmtoasm/users01.dbf
output filename=+DATA1/nonasmtoasm/datafile/users.262.721108873 tag=TAG20100608T040001 recid=4 stamp=721108872
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
copying current control file
output filename=+DATA1/nonasmtoasm/controlfile/backup.263.721108875 tag=TAG20100608T040001 recid=5 stamp=721108875
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 08-JUN-10

RMAN> switch database to copy;

datafile 1 switched to datafile copy “+DATA1/nonasmtoasm/datafile/system.259.721108803”
datafile 2 switched to datafile copy “+DATA1/nonasmtoasm/datafile/undotbs1.261.721108865”
datafile 3 switched to datafile copy “+DATA1/nonasmtoasm/datafile/sysaux.260.721108841”
datafile 4 switched to datafile copy “+DATA1/nonasmtoasm/datafile/users.262.721108873”

RMAN> report schema;

Report of database schema

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
—- ——– ——————– ——- ————————
1    470      SYSTEM               ***     +DATA1/nonasmtoasm/datafile/system.259.721108803
2    25       UNDOTBS1             ***     +DATA1/nonasmtoasm/datafile/undotbs1.261.721108865
3    230      SYSAUX               ***     +DATA1/nonasmtoasm/datafile/sysaux.260.721108841
4    5        USERS                ***     +DATA1/nonasmtoasm/datafile/users.262.721108873

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
1    20       TEMP                 32767       /u01/app/oracle/oradata/nonasmtoasm/temp01.dbf

RMAN> run
2> {
3> set newname for tempfile 1 to
4> ‘+DATA1/nonasmtoasm/datafile/tempfile’;
5> switch tempfile all;
6> }

executing command: SET NEWNAME

renamed temporary file 1 to +DATA1/nonasmtoasm/datafile/tempfile in control file

RMAN> alter database open;

database opened

RMAN>

RMAN> exit

Recovery Manager complete.
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jun 8 04:08:25 2010

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select name from v$database;

NAME
———
NONASMTO

SQL> select * from v$logfile;

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

3         ONLINE
/u01/app/oracle/oradata/nonasmtoasm/redo03.log
NO

2         ONLINE
/u01/app/oracle/oradata/nonasmtoasm/redo02.log
NO

GROUP# STATUS  TYPE
———- ——- ——-
MEMBER
——————————————————————————–
IS_

1         ONLINE
/u01/app/oracle/oradata/nonasmtoasm/redo01.log
NO

SQL> alter database add logfile group 4(‘+DATA’);

Database altered.

SQL> alter database add logfile group 5(‘+DATA’);

Database altered.

SQL> alter database add logfile group 6(‘+DATA’);
alter database add logfile group 6(‘+DATA’)
*
ERROR at line 1:
ORA-00301: error in adding log file ‘+DATA’ – file cannot be created
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15041: diskgroup space exhausted

SQL> alter database add logfile group 6(‘+DATA1’);

Database altered.

SQL> alter database add logfile group 7(‘+DATA1’);

Database altered.

SQL> alter database add logfile group 8(‘+DATA1’);

Database altered.

SQL> select group#,member from v$logfile;

GROUP#
———-
MEMBER
——————————————————————————–
3
/u01/app/oracle/oradata/nonasmtoasm/redo03.log

2
/u01/app/oracle/oradata/nonasmtoasm/redo02.log

1
/u01/app/oracle/oradata/nonasmtoasm/redo01.log

GROUP#
———-
MEMBER
——————————————————————————–
4
+DATA/nonasmtoasm/onlinelog/group_4.293.721109357

5
+DATA/nonasmtoasm/onlinelog/group_5.294.721109377

6
+DATA1/nonasmtoasm/onlinelog/group_6.265.721109433

GROUP#
———-
MEMBER
——————————————————————————–
7
+DATA1/nonasmtoasm/onlinelog/group_7.266.721109449

8
+DATA1/nonasmtoasm/onlinelog/group_8.267.721109465

8 rows selected.

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance nonasmtoasm (thread 1) – cannot
drop
ORA-00312: online log 3 thread 1:
‘/u01/app/oracle/oradata/nonasmtoasm/redo03.log’

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance nonasmtoasm (thread 1)
ORA-00312: online log 3 thread 1:
‘/u01/app/oracle/oradata/nonasmtoasm/redo03.log’

SQL> alter system checkpoint;

System altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-00350: log 3 of instance nonasmtoasm (thread 1) needs to be archived
ORA-00312: online log 3 thread 1:
‘/u01/app/oracle/oradata/nonasmtoasm/redo03.log’

SQL> alter database clear unarchived logfile group 3;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> select group#,member from v$logfile;

GROUP#
———-
MEMBER
——————————————————————————–
4
+DATA/nonasmtoasm/onlinelog/group_4.293.721109357

6
+DATA1/nonasmtoasm/onlinelog/group_6.265.721109433

7
+DATA1/nonasmtoasm/onlinelog/group_7.266.721109449

GROUP#
———-
MEMBER
——————————————————————————–
8
+DATA1/nonasmtoasm/onlinelog/group_8.267.721109465

SQL> alter database drop logfile group 4;
alter database drop logfile group 4
*
ERROR at line 1:
ORA-01623: log 4 is current log for instance nonasmtoasm (thread 1) – cannot
drop
ORA-00312: online log 4 thread 1:
‘+DATA/nonasmtoasm/onlinelog/group_4.293.721109357’

SQL> alter database clear unarchived logfile group 4;
alter database clear unarchived logfile group 4
*
ERROR at line 1:
ORA-01624: log 4 needed for crash recovery of instance nonasmtoasm (thread 1)
ORA-00312: online log 4 thread 1:
‘+DATA/nonasmtoasm/onlinelog/group_4.293.721109357’

SQL> alter system checkpoint;

System altered.

SQL> alter database clear unarchived logfile group
2  ;

*
ERROR at line 2:
ORA-02177: Missing required group number

SQL> alter database clear unarchived logfile group 4;
alter database clear unarchived logfile group 4
*
ERROR at line 1:
ORA-01624: log 4 needed for crash recovery of instance nonasmtoasm (thread 1)
ORA-00312: online log 4 thread 1:
‘+DATA/nonasmtoasm/onlinelog/group_4.293.721109357’

SQL>

SQL>  alter system switch logfile;

System altered.

SQL> alter database clear unarchived logfile group 4;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.

SQL> SQL> select group#,member from v$logfile;

GROUP#
———-
MEMBER
——————————————————————————–
6
+DATA1/nonasmtoasm/onlinelog/group_6.265.721109433

7
+DATA1/nonasmtoasm/onlinelog/group_7.266.721109449

8
+DATA1/nonasmtoasm/onlinelog/group_8.267.721109465

SQL>
SQL>

June 2, 2010 Posted by | ASM | Leave a comment