Opening and closing of Oracle archive

Source: Internet
Author: User

--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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.