Friday, June 22, 2007

ASM : Enabling Archival and FlashBack

Step 1: Create a Disk Group ARCH with sufficient space.

CREATE DISKGROUP ARCH
EXTERNAL REDUNDANCY
DISK 'ORCL:ASMD8','ORCL:ASMD9','ORCL:ASMD10','ORCL:ASMD11';

SQL> select
group_number,
name,
state,
type,
total_mb,
free_mb,
usable_file_mb,
unbalanced
from
v$asm_diskgroup;


G# NAME STATE TYPE TOTAL_MB FREE_MB USABLE_FILE_MB U
-- ------ ----------- ------ -------- ------- -------------- -
1 ARCH CONNECTED EXTERN 8000 7891 7891 N
2 DATA CONNECTED NORMAL 5000 2544 772 N
3 DG1 CONNECTED NORMAL 2000 1692 846 N

SQL>
SQL> select
group_number,
disk_number,
name,
state,
mode_status,
mount_status,
total_mb,
free_mb
from
v$asm_disk
where
group_number=1;


G# D# NAME STATE MODE_ST MOUNT_S TOTAL_MB FREE_MB
-- -- ------ -------- ------- ------- ---------- ----------
1 0 ASMD8 NORMAL ONLINE OPENED 2000 0
1 1 ASMD9 NORMAL ONLINE OPENED 2000 0
1 2 ASMD10 NORMAL ONLINE OPENED 2000 0
1 3 ASMD11 NORMAL ONLINE OPENED 2000 0

SQL>

Step 2: Enable Archival and FlashBack using the Enterprise Manager

asm_arch_enable:

Step 3: Restart the ASM Enabled Database

Step 4: Validate the Database
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 6
Next log sequence to archive 8
Current log sequence 8
SQL>
SQL> alter system switch logfile;

System altered.

SQL> select name from v$archived_log;

NAME
-----------------------------------------------------------------
+ARCH/odb/archivelog/2007_03_18/thread_1_seq_6.257.617554987
+ARCH/odb/archivelog/2007_03_20/thread_1_seq_7.258.617743015

SQL>

Popular Posts