--1, Open Archive
Steps
A. Conformance shutdown database (shutdown [immediate | transactional |normal])
B. Boot to mount stage (startup Mount)
C. Switch to archive mode (ALTER DATABASE archivelog[manual])
d. Switch to the open stage (ALTER DATABASE open)
E. Make a full backup of the data
Show Parameter SPFile
Alter system set log_archive_dest_1= ' Location=/ggs/arch_data ' scope=spfile;
Alter system set db_recovery_file_dest_size=100g scope=spfile sid= ' * ';
Alter system set db_recovery_file_dest= '/ggs/ora_recovery ' scope=spfile;
Alter system set log_archive_format= ' Arch_%t_%s_%r.arc ' scope=spfile;
Shutdown immediate;
startup Mount;
ALTER DATABASE Archivelog;
ALTER DATABASE open;
Archive log list;
--2, Close archive
"Step" archive mode switch to non-archive mode
A. [Immediate | transactional |normal]) consistency close database (shutdown
B. Boot to mount stage (startup Mount)
C. Switch to archive mode (ALTER DATABASE Noarchivelog)
d. Switch to the open stage (ALTER DATABASE open)
To turn off archive mode:
Shutdown immediate;
startup Mount;
ALTER DATABASE Noarchivelog;
ALTER DATABASE open;
View archived Files:
SELECT * from V$log;
SELECT * from V$logfile;
SELECT * from V$flash_recovery_area_usage;
Report obsolete;
Delete obsolete;
To back up an archive file:
Backup Archivelog all;
You can also:
Execute the ALTER system switch logfile first;
Then find the archive log location and copy it somewhere else.
Rman Target/
Delete Archivelog all completed before ' sysdate-7 ';
Backup first
Backup format '/tmp/arch-%t_%s_%u ' archivelog all delete input;
or backup database plus archivelog;
To delete an archive file:
Rman target/or Rman target User/[email protected]
List Archivelog all;
Crosscheck Archivelog All;
List expired Archivelog all;
Delete Expired Archivelog all;
Opening and closing of Oracle archive