Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Opening and closing of Oracle Archive

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

-- 1. Start archiving

[steps]

a. Database shutdown for consistency (shutdown [immediate | transactional | normal])

b. Start to the mount phase (startup mount)

c. Switch to archive mode (alter database archivelog [manual])

d. Switch to open phase (alter database open)

e. Make a full backup of the data (full backup)

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 archiving

[step] switch from archive mode to non-archive mode

A. [immediate | transactional | normal]) consistency shuts down the database (shutdown

b. Start to the mount phase (startup mount)

c. Switch to archive mode (alter database noarchivelog)

d. Switch to open phase (alter database open)

Turn off archive mode:

Shutdown immediate

Startup mount

Alter database noarchivelog

Alter database open

View the archive file:

Select * from v$log

Select * from v$logfile

Select * from v$flash_recovery_area_usage

Report obsolete

Delete obsolete

Back up the archive file:

Backup archivelog all

You can also:

Execute alter system switch logfile first

Then find the location of the archive log 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.

Delete the archive file:

Rman target / or rman target user/password@tns

List archivelog all

Crosscheck archivelog all

List expired archivelog all

Delete expired archivelog all

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report