Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Want to check my steps for enabling auto archive log
On Fri, 27 Jan 2006 18:27:59 +0000, L C wrote:
> Here are my planned steps
> Stop my database and make a cold backup.
> Perform the auto archive enable from the above doc. This includes the
> immediate shutdown I have read about.
> Reboot the Server.
>
> Seems rather simple, that concerns me - so another question is what can go
> wrong and how will I know it went bad.
>
> Thanks
>
> Larry C
Let me come up with a new plan:
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 27 23:15:30 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 335544320 bytes
Fixed Size 1219304 bytes Variable Size 130024728 bytes Database Buffers 201326592 bytes Redo Buffers 2973696 bytesDatabase mounted.
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_dest_1 string location=/oradata/arch/log log_archive_dest_10 stringSQL>
Database log mode No Archive Mode Automatic archival Disabled Archive destination /oradata/arch/log Oldest online log sequence 88 Current log sequence 90
Database altered.
SQL> archive log start;
Statement processed.
SQL> alter database open;
Database altered.
SQL>
SQL> archive log list
Database log mode Archive Mode Automatic archival Enabled Archive destination /oradata/arch/log Oldest online log sequence 88 Next log sequence to archive 90 Current log sequence 90
System altered.
SQL>
$ rman target=/ nocatalog
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jan 27 23:23:05 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: 10G (DBID=3272209792) using target database control file instead of recovery catalog
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/back/back_%U.bkp';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/back/back_%U.bkp';
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3; RMAN> backup as compressed backupset database;
Starting backup at 27-JAN-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=59 devtype=DISK channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_system_1j2cfzfv_.dbf input datafile fno=00002 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_undotbs1_1j2cfzm4_.dbf input datafile fno=00003 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_sysaux_1j2cfzgq_.dbf input datafile fno=00005 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_perfstat_1j2f56l5_.dbf input datafile fno=00004 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_users_1j2cfzmf_.dbfinput datafile fno=00006 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_indx_1j2ft1ov_.dbf input datafile fno=00007 name=/oradata/10g/oracle/datafile/10G/datafile/o1_mf_flow_1_1w3pt6b1_.dbf channel ORA_DISK_1: starting piece 1 at 27-JAN-06 channel ORA_DISK_1: finished piece 1 at 27-JAN-06 piece handle=/oradata/back/back_01h9uj59_1_1.bkp tag=TAG20060127T232632 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:46 channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupsetincluding current control file in backupset including current SPFILE in backupset
RMAN> backup as compressed backupset archivelog all not backed up 3 times;
Starting backup at 27-JAN-06
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=90 recid=1 stamp=580864811
input archive log thread=1 sequence=91 recid=2 stamp=580865443
channel ORA_DISK_1: starting piece 1 at 27-JAN-06
channel ORA_DISK_1: finished piece 1 at 27-JAN-06
piece handle=/oradata/back/back_03h9ujd5_1_1.bkp tag=TAG20060127T233044 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 27-JAN-06
RMAN>
RMAN>
Recovery Manager complete.
$ ls /oradata/back
back_01h9uj59_1_1.bkp back_02h9uj8k_1_1.bkp back_03h9ujd5_1_1.bkp
$ ls /oradata/back -l
total 162956
-rw-r----- 1 oracle dba 160096256 Jan 27 23:28 back_01h9uj59_1_1.bkp -rw-r----- 1 oracle dba 1097728 Jan 27 23:28 back_02h9uj8k_1_1.bkp -rw-r----- 1 oracle dba 5670400 Jan 27 23:30 back_03h9ujd5_1_1.bkp$ du -sk /oradata/10g
Database is now in the archive log mode and backed up. With Oracle 9i, you can not do "BACKUP AS COMPRESSED BACKUPSET", but you can do backup. Other then that, there is no difference in turning the database to archive log mode. That's the plan. Now you can check what did you do:
$ rman target=/ nocatalog
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jan 27 23:36:13 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: 10G (DBID=3272209792) using target database control file instead of recovery catalog
RMAN> list backup of database;
List of Backup Sets
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ---------------
1 Full 152.67M DISK 00:01:39 27-JAN-06 BP Key: 1 Status: AVAILABLE Compressed: YES Tag: TAG20060127T232632 Piece Name: /oradata/back/back_01h9uj59_1_1.bkpList of Datafiles in backup set 1
RMAN>
RMAN> list backup of archivelog all;
List of Backup Sets
BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ ---------------
3 5.41M DISK 00:00:03 27-JAN-06 BP Key: 3 Status: AVAILABLE Compressed: YES Tag: TAG20060127T233044 Piece Name: /oradata/back/back_03h9ujd5_1_1.bkp List of Archived Logs in backup set 3 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 90 3249771 22-JAN-06 3265484 27-JAN-06 1 91 3265484 27-JAN-06 3265782 27-JAN-06
RMAN>
That's it. It's that simple.
-- http://www.mgogala.comReceived on Fri Jan 27 2006 - 22:40:55 CST
![]() |
![]() |