Record an Oracle production database Restore Archive log experience

Source: Internet
Author: User
My colleague called to say he was eager to restore the archive logs in the production database. The system environment is 10.2.0.5 and RAC. the nfs sharing is established for archived logs on node1, but not for node2.

My colleague called to say he was eager to restore the archive logs in the production database. The system environment is 10.2.0.5 and RAC. the nfs sharing is established for archived logs on node1, but not for node2.

As soon as I went to dinner at noon, I received a call from my colleagues saying that I was eager to restore the archive logs in the production database. The system environment is 10.2.0.5, RAC, And the archived logs are nfs shared on node1, but not on node2. Another set of query libraries is used to synchronize data from the production database to the query database through the synchronization software of DSG. The principle of the software is to archive logs through Legend analysis and then apply the logs. The overall feeling is a bit like DG. Because Incremental backup is used on the production database, it is backed up every day. The archived logs are automatically deleted after the backup. The reason for restoring the archive logs of the production database is that the synchronization fails to be queried (when a large number of DML operations are encountered when the DSG backup software is used ), you must restore the archived logs because the archived logs have been deleted. The query database failed to synchronize data after yesterday. Therefore, you need to restore the archived logs from yesterday to the present. The specific implementation steps are as follows.
Perform operations on node1.

$ Pwd
/Arch_log/restore

$ Df-g
Filesystem GB blocks Free % Used Iused % Iused Mounted on
/Dev/hd4 10.00 9.56 5% 12767 1%/
/Dev/hd2 10.00 6.75 33% 62385 4%/usr
/Dev/hd9var 10.00 9.23 8% 13956 1%/var
/Dev/hd3 10.00 9.09 10% 3512 1%/tmp
/Dev/hd1 10.00 8.99 11% 8013 1%/home
/Dev/hd11admin 0.25 0.25 1% 5 1%/admin
/Proc---/proc
/Dev/hd10opt 10.00 9.73 3% 10356 1%/opt
/Dev/livedump 0.25 0.25 1% 8 1%/var/adm/ras/livedump
/Dev/lv_oracle10g 30.00 11.84 61% 215252 7%/oracle10g
/Dev/lv_zs_arch_01 997.00 989.75 1% 32 1%/arch_log
/Dev/lv_zs_db2bk_01 998.00 432.63 57% 167 1%/rman_db2_bk
/Dev/lv_zs_bck_01 2992.00 1836.57 39% 224/rman_data
/Dev/lv_cdump 200.00 199.97 1% 15 1%/oracle10g/app/oracle/admin/zgscdb/cdump
/Dev/lv_dsg1 49.75 43.97 12% 8831 1%/dsg1
Fjlt_zgsc_db02:/arch_log/zgsc_db02_arch 997.00 971.00 3% 34 1%/arch_log/zgsc_db02_arch

The free space in the/arch_log mount point is close to 1 Tb. The target restores the archived log to/arch_log/restore.

First, find the archive log serial number after through v $ archived_log.

Select sequence #, completion_time from v $ archived_log where completion_time> to_date ('2017-02-15 ', 'hh24: mi: ss ');

Query the archived logs starting from sequence #16147 and later

Run

$ Rman target/
Rediscovery Manager: Release 10.2.0.5.0-Production on Thu Feb 16 13:07:12 2012
Copyright (c) 1982,200 7, Oracle. All rights reserved.
Connected to target database: ZGSCDB (DBID = 3629726729)

RMAN> run {
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> allocate channel c3 type disk;
5> allocate channel c4 type disk;
6> set archivelog destination to '/arch_log/restore ';
7> restore archivelog from logseq 16147;
8> release channel c1; ype disk
9> release channel c2;
10> release channel c3;
11> release channel c4;
12>}

Using target database control file instead of recovery catalog
Allocated channel: c1
Channel c1: sid = 4834 instance = zgscdb1 devtype = DISK

Allocated channel: c2
Channel c2: sid = 5333 instance = zgscdb1 devtype = DISK

Allocated channel: c3
Channel c3: sid = 4879 instance = zgscdb1 devtype = DISK

Allocated channel: c4
Channel c4: sid = 5317 instance = zgscdb1 devtype = DISK

Executing command: SET ARCHIVELOG DESTINATION

Starting restore at 16-FEB-12
Released channel: c1
Released channel: c2
Released channel: c3
Released channel: c4
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of restore command at 02/16/2012 13:10:53
RMAN-20242: specification does not match any archive log in the recovery catalog

RMAN> list archivelog from logseq 16147;

Omitted partial output


List of Archived Logs in backups set 5193
Thrd Seq Low SCN Low Time Next SCN Next Time
-------------------------------------------------
2 16148 12670010177819 15-FEB-12 12670011207570 15-FEB-12
2 16149 12670011207570 15-FEB-12 12670012283915 15-FEB-12
2 16150 12670012283915 15-FEB-12 12670012754302 15-FEB-12
2 16151 12670012754302 15-FEB-12 12670012969887 15-FEB-12
2 16152 12670012969887 15-FEB-12 12670013212670 15-FEB-12
2 16153 12670013212670 15-FEB-12 12670013780868 15-FEB-12
2 16154 12670013780868 15-FEB-12 12670013976009 15-FEB-12
2 16155 12670013976009 15-FEB-12 12670015183858 15-FEB-12
2 16156 12670015183858 15-FEB-12 12670015441965 15-FEB-12
2 16157 12670015441965 15-FEB-12 12670015599451 15-FEB-12
2 16158 12670015599451 15-FEB-12 12670015722094 15-FEB-12
2 16159 12670015722094 15-FEB-12 12670015785593 15-FEB-12
2 16160 12670015785593 15-FEB-12 12670015847887 15-FEB-12
2 16161 12670015847887 15-FEB-12 12670016000750 15-FEB-12

Backup Set Copy #1 of backup set 5193
Device Type Elapsed Time Completion Time Compressed Tag
---------------------------------------------------
DISK 00:03:55 16-FEB-12 NO tag20120216t0000030

List of Backup Pieces for backup set 5193 Copy #1
BP Key Pc # Status Piece Name
-------------------------------
12560 1 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_39n3e111_s5225_p1_C1
12561 2 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_39n3e111_s5225_p2_C1
12562 3 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_39n3e111_s5225_p3_C1


List of Archived Logs in backups set 5198
Thrd Seq Low SCN Low Time Next SCN Next Time
-------------------------------------------------
2 16134 12668052207072 15-FEB-12 12668052339209 15-FEB-12
2 16135 12668052339209 15-FEB-12 12668052456743 15-FEB-12
2 16136 12668052456743 15-FEB-12 12668052579080 15-FEB-12
2 16137 12668052579080 15-FEB-12 12668052695760 15-FEB-12
2 16138 12668052695760 15-FEB-12 12668056672468 15-FEB-12
2 16139 12668056672468 15-FEB-12 12668060445745 15-FEB-12
2 16140 12668060445745 15-FEB-12 12668062444755 15-FEB-12
2 16141 12668062444755 15-FEB-12 12668660576479 15-FEB-12
2 16142 12668660576479 15-FEB-12 12668660718987 15-FEB-12
2 16143 12668660718987 15-FEB-12 12668660871830 15-FEB-12
2 16144 12668660871830 15-FEB-12 12668661303733 15-FEB-12
2 16145 12668661303733 15-FEB-12 12668661585953 15-FEB-12
2 16146 12668661585953 15-FEB-12 12668662079217 15-FEB-12
2 16147 12668662079217 15-FEB-12 12670010177819 15-FEB-12

Backup Set Copy #1 of backup set 5198
Device Type Elapsed Time Completion Time Compressed Tag
---------------------------------------------------
DISK 00:01:07 16-FEB-12 NO tag20120216t0000030

List of Backup Pieces for backup set 5198 Copy #1
BP Key Pc # Status Piece Name
-------------------------------
12573 1 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_3an3e18j_s5226_p1_C1
12574 2 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_3an3e18j_s5226_p2_C1
12575 3 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_3an3e18j_s5226_p3_C1

List of Archived Logs in backups set 5195
Thrd Seq Low SCN Low Time Next SCN Next Time
-------------------------------------------------
2 16162 12670016000750 15-FEB-12 12670016088204 15-FEB-12
2 16163 12670016088204 15-FEB-12 12670016308969 15-FEB-12
2 16164 12670016308969 15-FEB-12 12670016653192 15-FEB-12
2 16165 12670016653192 15-FEB-12 12670017027396 15-FEB-12
2 16166 12670017027396 15-FEB-12 12670017225549 15-FEB-12
2 16167 12670017225549 15-FEB-12 12670017317060 15-FEB-12
2 16168 12670017317060 15-FEB-12 12670017393441 15-FEB-12
2 16169 12670017393441 15-FEB-12 12670017462567 15-FEB-12
2 16170 12670017462567 15-FEB-12 12670017541021 15-FEB-12
2 16171 12670017541021 15-FEB-12 12670017654244 15-FEB-12
2 16172 12670017654244 15-FEB-12 12670017735163 15-FEB-12
2 16173 12670017735163 15-FEB-12 12670017811611 15-FEB-12
2 16174 12670017811611 15-FEB-12 12670017888323 15-FEB-12
2 16175 12670017888323 15-FEB-12 12670019198216 15-FEB-12

Backup Set Copy #1 of backup set 5195
Device Type Elapsed Time Completion Time Compressed Tag
---------------------------------------------------
DISK 00:03:56 16-FEB-12 NO tag20120216t0000030

List of Backup Pieces for backup set 5195 Copy #1
BP Key Pc # Status Piece Name
-------------------------------
12566 1 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_38n3e111_s5224_p1_C1
12567 2 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_38n3e111_s5224_p2_C1
12568 3 AVAILABLE/rman_data/zgscdb_rman/ZGSCDB_arch_20120216_38n3e111_s5224_p3_C1

You can see that all the archive log backups from log serial number 16147 to 16181 are saved. Why is no output when list backup of archivelog from logseq 16147 is executed?

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.