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

DATAGUARD manually registers archive logs (reproduced)

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

Share

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

Since 9i, there is generally no need to manually process the actual logs, FAL will automatically help us deal with these problems.

However, it is not that we do not have to deal with it manually at all. For example, your disk space is full and the archive log is transferred to another place before it is transferred to the repository. In this case, FAL cannot solve the problem and needs to be handled manually.

Let's briefly talk about the steps of manually processing log GAP:

1. Check whether there are any missing logs in the database.

SQL > 0select * from V$ARCHIVE_GAP.

THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#

1 99 109

As can be seen from the above information, 99 to 109 logs are missing from the repository.

2. Query the path and name of the missing log in the main database

SQL > SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND SEQUENCE# BETWEEN 99 AND 109.

NAME

/ u01/archivelog/1_99_626106231.arc

/ u01/archivelog/1_100_626106231.arc

/ u01/archivelog/1_101_626106231.arc

/ u01/archivelog/1_102_626106231.arc

/ u01/archivelog/1_103_626106231.arc

/ u01/archivelog/1_104_626106231.arc

/ u01/archivelog/1_105_626106231.arc

/ u01/archivelog/1_106_626106231.arc

/ u01/archivelog/1_107_626106231.arc

/ u01/archivelog/1_108_626106231.arc

/ u01/archivelog/1_109_626106231.arc

If you move the log to another path, change the path where the log is located to the current actual path.

3. Copy the log to the repository

Sftp > get 1_99_626106231.arc

Fetching / u01/archivelog/archive/1_99_626106231.arc to 1_99_626106231.arc

/ u01/archivelog/archive/1_99_626106231.arc 100% 17KB 17.0KB/s 00:00

Sftp > mget 1x 10*

Fetching / u01/archivelog/archive/1_100_626106231.arc to 1_100_626106231.arc

/ u01/archivelog/archive/1_100_626106231.arc 100% 4962KB 2.4MB/s 00:02

.

Fetching / u01/archivelog/archive/1_10_626106231.dbf to 1_10_626106231.dbf

/ u01/archivelog/archive/1_10_626106231.dbf 100% 40KB 40.0KB/s 00:00

4. Manually register the logs copied from the main database in the previous step on the standby database.

SQL > ALTER DATABASE REGISTER LOGFILE / u01/archivelog/1_99_626106231.arc.

Database altered.

.

SQL > ALTER DATABASE REGISTER LOGFILE / u01/archivelog/1_109_626106231.arc.

Database altered.

5. Wait a moment and observe the alert log information of the database.

Sun Aug 12 20:38:47 2007

Media Recovery Log / u01/archivelog/1_99_626106231.arc

Media Recovery Log / u01/archivelog/1_100_626106231.arc

Media Recovery Log / u01/archivelog/1_101_626106231.arc

Media Recovery Log / u01/archivelog/1_102_626106231.arc

.

From the above information, we can see that the previously registered log has been applied normally.

6. Check whether there is a log gap in the backup database.

SQL > 0select * from V$ARCHIVE_GAP.

No rows 0selected

If any rows are returned, repeat steps 2-5 until the query result is "no rows 0selected".

If the log is only temporarily moved to another place, and then it will be moved back to the original path, then you don't have to deal with it manually. After copying the log back to the original place, FAL will automatically process GAP.

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

Servers

Wechat

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

12
Report