In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to clear the expired information in the v$archived_log view". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to clear the expired information in the v$archived_log view".
After deleting the archive using the RMAN command, querying the v$archived_log view will find that the name column is empty, but the information of other columns is still retained. A lot of expired information will be left over a long time, which will affect the maintenance work. You need to delete the expired information. First of all, simulate the process of the problem:
-- check the v$archived_log view before deleting the archive log. The situation is normal.
SQL > select dest_id,sequence#,name,blocks from v$archived_log
DEST_ID SEQUENCE# NAME BLOCKS
--
1 101 / oradata/archive/orcl_1_101_851966182.arc 2730
1 102 / oradata/archive/orcl_1_102_851966182.arc 95711
1 103 / oradata/archive/orcl_1_103_851966182.arc 94813
1 104 / oradata/archive/orcl_1_104_851966182.arc 95048
1 105 / oradata/archive/orcl_1_105_851966182.arc 94677
1 106 / oradata/archive/orcl_1_106_851966182.arc 97494
1 107 / oradata/archive/orcl_1_107_851966182.arc 94300
1 108 / oradata/archive/orcl_1_108_851966182.arc 97494
-use the RAMN command to delete the archive
RMAN > delete archivelog all
-- query the v$archived_log view again. Name column is empty.
SQL > select dest_id,sequence#,name,blocks from v$archived_log
DEST_ID SEQUENCE# NAME BLOCKS
--
1 101 2730
1 102 95711
1 103 94813
1 104 95048
1 105 94677
1 106 97494
1 107 94300
1 108 97494
This occurs because the contents of the file are not clearly controlled when deleting the archive log using the RMAN command, resulting in out-of-date and incomplete information left by v$archived_log. The archived information will be cleared below:
-- clear the information about v$archived_log in the control file
SQL > execute sys.dbms_backup_restore.resetCfileSection (11)
PL/SQL procedure successfully completed.
-- query v$archived_log again and the information has been cleared
SQL > select dest_id,sequence#,name,blocks from v$archived_log
No rows selected
But in this way, all v$archive_log information will be cleared, including those that have not expired. The following is to register the unexpired archive file information.
The archived logs on my test environment are all in / oradata/archive/
RMAN > catalog start with'/ oradata/archive/'
-- query v$archived_log again, and the undeleted archive information can be queried.
SQL > select dest_id,sequence#,name,blocks from v$archived_log
DEST_ID SEQUENCE# NAME BLOCKS
--
1 110 / oradata/archive/orcl_1_110_851966182.arc 1
1 111 / oradata/archive/orcl_1_111_851966182.arc 2
1 109 / oradata/archive/orcl_1_109_851966182.arc 31079
Thank you for reading, the above is the content of "how to clear the expired information in the v$archived_log view". After the study of this article, I believe you have a deeper understanding of how to clear the expired information in the v$archived_log view, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.