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

Oracle 11g correct deletion of archive logs

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

Share

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

1. Log in to rman and connect to the database with oracle users

RMAN > connect target /

RMAN > rman target /

2. List and confirm the archive log path

RMAN > list archivelog all

3. Delete archived logs from 7 days ago

RMAN > DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7'

Description:

SYSDATA-7, indicating the current system time 7 days ago, and the before keyword represents the archived log 7 days ago.

By the same token, you can delete all logs from 7 days ago to the present, but this command should be carefully considered. After this deletion, it is best to make a full backup of the database immediately.

DELETE ARCHIVELOG from TIME 'SYSDATE-7'; deletes all logs from 7 days ago to the present. Use with caution.

4. Check the archive log

RMAN > crosscheck archivelog all

5. Delete invalid archive logs

RMAN > delete expired archivelog all

6. If the log explodes, the above command may not work. You can use the following command to forcibly delete all logs.

RMAN > delete noprompt force 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