欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

oracle基于增量備份如何解決dataguardgap問題

本篇內(nèi)容介紹了“oracle基于增量備份如何解決dataguard gap問題”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠?qū)W有所成!

創(chuàng)新互聯(lián)主要從事成都做網(wǎng)站、網(wǎng)站設計、網(wǎng)頁設計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務。立足成都服務烏海,十載網(wǎng)站建設經(jīng)驗,價格優(yōu)惠、服務專業(yè),歡迎來電咨詢建站服務:13518219792

Dataguard alert日志中報錯:

2018-07-31T18:10:11.540837+08:00

Primary database   is in MAXIMUM PERFORMANCE mode

RFS[6]: Assigned   to RFS process (PID:18880)

RFS[6]: No   standby redo logfiles available for T-1

RFS[6]: Opened   log for T-1.S-102 dbid 2547745710 branch 981132078

2018-07-31T18:10:20.970874+08:00

Fetching gap   sequence in thread 1, gap sequence 95-95

2018-07-31T18:12:12.543715+08:00

FAL[client]:   Failed to request gap sequence

 GAP - thread 1 sequence 95-95

 DBID 2547745710 branch 981132078

FAL[client]: All   defined FAL servers have been attempted.

-------------------------------------------------------------------------

Check that the   CONTROL_FILE_RECORD_KEEP_TIME initialization

parameter is   defined to a value that's sufficiently large

enough to   maintain adequate log switch information to resolve

archivelog gaps.

-------------------------------------------------------------------------

發(fā)現(xiàn)數(shù)據(jù)庫出現(xiàn)了gap。

決定用基于rman增量備份的方式來解決gap:

先備份備庫的spfile:

SQL> create   pfile='/tmp/pfile180731.ora' from spfile;

 

File created.

當前的gap

SQL> select *   from v$archive_gap;

 

   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#     CON_ID

----------   ------------- -------------- ----------

         1            95             98          1

備庫當前的scn

SQL> select   to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

----------------------------------------

5694880

主庫上根據(jù)備庫查詢的scn增量備份,注意備份控制文件

rman target /

 

Recovery   Manager: Release 12.2.0.1.0 - Production on Tue Jul 31 18:43:05 2018

 

Copyright (c)   1982, 2017, Oracle and/or its affiliates.    All rights reserved.

 

connected to   target database: MINGDB (DBID=2547745710)

 

RMAN> run

2> {

3>  allocate channel d1 type disk;

4>  allocate channel d2 type disk;

5>  allocate channel d3 type disk;

6>  backup as   compressed backupset incremental from SCN 5694880 database format   '/opt/mingdbdata/archive/incre_db_%d_%T_%s.bak' include current controlfile   for standby;

7>  release channel d1;

8>  release channel d2;

9>  release channel d3;

10> }

 

using target   database control file instead of recovery catalog

allocated   channel: d1

channel d1:   SID=37 device type=DISK

 

allocated   channel: d2

channel d2:   SID=14 device type=DISK

 

allocated   channel: d3

channel d3:   SID=40 device type=DISK

 

Starting backup   at 31-JUL-18

RMAN-06755:   warning: datafile 2: incremental-start SCN is too recent; using checkpoint   SCN 1119999 instead

RMAN-06755:   warning: datafile 4: incremental-start SCN is too recent; using checkpoint   SCN 1119999 instead

RMAN-06755:   warning: datafile 6: incremental-start SCN is too recent; using checkpoint   SCN 1119999 instead

channel d1:   starting compressed full datafile backup set

channel d1:   specifying datafile(s) in backup set

input datafile   file number=00014 name=/opt/mingdbdata/data/MINGPDB1/soe01.dbf

input datafile   file number=00015 name=/opt/mingdbdata/data/MINGPDB1/tbs_ming01.dbf

channel d1:   starting piece 1 at 31-JUL-18

channel d2:   starting compressed full datafile backup set

channel d2:   specifying datafile(s) in backup set

input datafile   file number=00008 name=/opt/mingdbdata/data/MINGPDB1/system01.dbf

input datafile   file number=00010 name=/opt/mingdbdata/data/MINGPDB1/undotbs01.dbf

channel d2:   starting piece 1 at 31-JUL-18

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

input datafile   file number=00001   name=/opt/mingdbdata/data/MINGDB/datafile/o1_mf_system_fn8w9k88_.dbf

input datafile   file number=00007   name=/opt/mingdbdata/data/MINGDB/datafile/o1_mf_users_fn8wbl6h_.dbf

channel d3:   starting piece 1 at 31-JUL-18

channel d3:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_67.bak   tag=TAG20180731T184314 comment=NONE

channel d3:   backup set complete, elapsed time: 00:00:07

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

input datafile   file number=00009 name=/opt/mingdbdata/data/MINGPDB1/sysaux01.dbf

input datafile   file number=00011 name=/opt/mingdbdata/data/MINGPDB1/tbs_pdbadmin01.dbf

channel d3:   starting piece 1 at 31-JUL-18

channel d2:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_66.bak   tag=TAG20180731T184314 comment=NONE

channel d2:   backup set complete, elapsed time: 00:00:08

channel d2:   starting compressed full datafile backup set

channel d2:   specifying datafile(s) in backup set

input datafile   file number=00003   name=/opt/mingdbdata/data/MINGDB/datafile/o1_mf_sysaux_fn8w9tvc_.dbf

input datafile   file number=00005   name=/opt/mingdbdata/data/MINGDB/datafile/o1_mf_undotbs1_fn8wb0wo_.dbf

channel d2:   starting piece 1 at 31-JUL-18

channel d3:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_68.bak   tag=TAG20180731T184314 comment=NONE

channel d3:   backup set complete, elapsed time: 00:00:02

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

input datafile   file number=00002   name=/opt/mingdbdata/data/MINGDB/70A2182C94E1412DE053B7D91FAC647A/datafile/o1_mf_system_fn8w9pls_.dbf

skipping   datafile 00002 because it has not changed

channel d3:   backup cancelled because all files were skipped

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

input datafile   file number=00004 name=/opt/mingdbdata/data/MINGDB/70A2182C94E1412DE053B7D91FAC647A/datafile/o1_mf_sysaux_fn8w9yob_.dbf

skipping   datafile 00004 because it has not changed

channel d3:   backup cancelled because all files were skipped

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

input datafile   file number=00006   name=/opt/mingdbdata/data/MINGDB/70A2182C94E1412DE053B7D91FAC647A/datafile/o1_mf_undotbs1_fn8wb2lm_.dbf

skipping   datafile 00006 because it has not changed

channel d3:   backup cancelled because all files were skipped

channel d3:   starting compressed full datafile backup set

channel d3:   specifying datafile(s) in backup set

including   standby control file in backup set

channel d3:   starting piece 1 at 31-JUL-18

channel d3:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_73.bak   tag=TAG20180731T184314 comment=NONE

channel d3:   backup set complete, elapsed time: 00:00:01

channel d2:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_69.bak tag=TAG20180731T184314   comment=NONE

channel d2:   backup set complete, elapsed time: 00:00:11

channel d1:   finished piece 1 at 31-JUL-18

piece   handle=/opt/mingdbdata/archive/incre_db_MINGDB_20180731_65.bak   tag=TAG20180731T184314 comment=NONE

channel d1:   backup set complete, elapsed time: 00:00:27

Finished backup   at 31-JUL-18

 

released   channel: d1

 

released   channel: d2

 

released   channel: d3

將增量文件傳到備庫

oracle@bd-dev-mingshuo-183:/opt/mingdbdata/archive$scp   *.bak oracle@172.31.217.182:/tmp/dbbackup

備庫控制文件路徑

SQL> select   name from v$controlfile;

 

NAME

--------------------------------------------------------------------------------

/opt/mingdbdata/data/MINGDB/controlfile/o1_mf_fn8w9go7_.ctl

備庫rman catalog注冊備份文件

RMAN> catalog   start with '/tmp/*.bak';

 

searching for   all files that match the pattern /tmp/*.bak

no files found   to be unknown to the database

 

RMAN> catalog   start with '/tmp/dbbackup/';

 

searching for   all files that match the pattern /tmp/dbbackup/

 

List of Files   Unknown to the Database

=====================================

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_67.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_65.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_69.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_73.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_68.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_66.bak

 

Do you really   want to catalog the above files (enter YES or NO)? YES

cataloging   files...

cataloging done

 

List of   Cataloged Files

=======================

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_67.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_65.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_69.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_73.bak

File Name: /tmp/dbbackup/incre_db_MINGDB_20180731_68.bak

File Name:   /tmp/dbbackup/incre_db_MINGDB_20180731_66.bak

備庫rman恢復

RMAN>  run

2>  {

3>  allocate channel d1 type disk;

4>  allocate channel d2 type disk;

5>  allocate channel d3 type disk;

6>  restore standby controlfile to   '/home/oracle/control01.ctl';

7>  recover database noredo;

8>  release channel d1;

9>  release channel d2;

10>  release channel d3;

11>  }

 

allocated   channel: d1

channel d1:   SID=30 device type=DISK

 

allocated   channel: d2

channel d2:   SID=792 device type=DISK

 

allocated   channel: d3

channel d3:   SID=32 device type=DISK

 

Starting restore   at 31-JUL-18

 

channel d1:   starting datafile backup set restore

channel d1:   restoring control file

output file   name=/home/oracle/control01.ctl

channel d1:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_73.bak

channel d1:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_73.bak   tag=TAG20180731T184314

channel d1:   restored backup piece 1

channel d1:   restore complete, elapsed time: 00:00:01

Finished restore   at 31-JUL-18

 

Starting recover   at 31-JUL-18

channel d1:   starting incremental datafile backup set restore

channel d1:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00001: /opt/mingdbdata/data/MINGDB/datafile/o1_mf_system_fn8w9k88_.dbf

destination for   restore of datafile 00007:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_users_fn8wbl6h_.dbf

channel d1:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_67.bak

channel d2:   starting incremental datafile backup set restore

channel d2:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00003:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_sysaux_fn8w9tvc_.dbf

destination for   restore of datafile 00005: /opt/mingdbdata/data/MINGDB/datafile/o1_mf_undotbs1_fn8wb0wo_.dbf

channel d2:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_69.bak

channel d3:   starting incremental datafile backup set restore

channel d3:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00008: /opt/mingdbdata/data/MINGPDB1/system01.dbf

destination for   restore of datafile 00010: /opt/mingdbdata/data/MINGPDB1/undotbs01.dbf

channel d3:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_66.bak

released   channel: d1

released   channel: d2

released   channel: d3

RMAN-00571:   ===========================================================

RMAN-00569:   =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571:   ===========================================================

RMAN-03002:   failure of recover command at 07/31/2018 19:00:07

ORA-19870: error   while restoring backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_67.bak

ORA-19573:   cannot obtain exclusive enqueue for datafile 1

ORA-45909:   restore, recover or block media recovery may be in progress

報錯是因為忘記將日志應用取消了,而且數(shù)據(jù)庫還是open狀態(tài)

取消日志應用,mount數(shù)據(jù)庫

SQL> alter   database recover managed standby database cancel;

 

Database   altered.

SQL> shutdown   immediate

 

Database closed.

Database   dismounted.

ORACLE instance   shut down.

startup mount

SQL> SQL>   ORACLE instance started.

 

Total System   Global Area 3254779904 bytes

Fixed Size                  8797928 bytes

Variable   Size            1124073752 bytes

Database   Buffers         2097152000 bytes

Redo   Buffers               24756224 bytes

Database   mounted.

再次登入rman,嘗試恢復:

oracle@bd-dev-mingshuo-182:/tmp$rman   target /

 

Recovery   Manager: Release 12.2.0.1.0 - Production on Tue Jul 31 19:04:16 2018

 

Copyright (c)   1982, 2017, Oracle and/or its affiliates.    All rights reserved.

 

connected to   target database: MINGDB (DBID=2547745710, not open)

 

RMAN>  run

2>  {

3>  allocate channel d1 type disk;

4>  allocate channel d2 type disk;

5>  allocate channel d3 type disk;

6>  restore standby controlfile to '/home/oracle/control01.ctl';

7>  recover database noredo;

8>  release channel d1;

9>  release channel d2;

10>  release channel d3;

11>  }

 

using target   database control file instead of recovery catalog

allocated   channel: d1

channel d1:   SID=24 device type=DISK

 

allocated   channel: d2

channel d2:   SID=785 device type=DISK

 

allocated   channel: d3

channel d3:   SID=25 device type=DISK

 

Starting restore   at 31-JUL-18

 

control file is   already restored to file /home/oracle/control01.ctl

restore not   done; all files read only, offline, excluded, or already restored

Finished restore   at 31-JUL-18

 

Starting recover   at 31-JUL-18

channel d1:   starting incremental datafile backup set restore

channel d1:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00001:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_system_fn8w9k88_.dbf

destination for   restore of datafile 00007:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_users_fn8wbl6h_.dbf

channel d1:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_67.bak

channel d2:   starting incremental datafile backup set restore

channel d2:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00003:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_sysaux_fn8w9tvc_.dbf

destination for   restore of datafile 00005:   /opt/mingdbdata/data/MINGDB/datafile/o1_mf_undotbs1_fn8wb0wo_.dbf

channel d2:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_69.bak

channel d3:   starting incremental datafile backup set restore

channel d3: specifying   datafile(s) to restore from backup set

destination for   restore of datafile 00008: /opt/mingdbdata/data/MINGPDB1/system01.dbf

destination for   restore of datafile 00010: /opt/mingdbdata/data/MINGPDB1/undotbs01.dbf

channel d3:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_66.bak

channel d1:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_67.bak   tag=TAG20180731T184314

channel d1:   restored backup piece 1

channel d1:   restore complete, elapsed time: 00:00:01

channel d1:   starting incremental datafile backup set restore

channel d1:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00009: /opt/mingdbdata/data/MINGPDB1/sysaux01.dbf

destination for   restore of datafile 00011: /opt/mingdbdata/data/MINGPDB1/tbs_pdbadmin01.dbf

channel d1:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_68.bak

channel d2:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_69.bak   tag=TAG20180731T184314

channel d2:   restored backup piece 1

channel d2:   restore complete, elapsed time: 00:00:01

channel d2:   starting incremental datafile backup set restore

channel d2:   specifying datafile(s) to restore from backup set

destination for   restore of datafile 00014: /opt/mingdbdata/data/MINGPDB1/soe01.dbf

destination for   restore of datafile 00015: /opt/mingdbdata/data/MINGPDB1/tbs_ming01.dbf

channel d2:   reading from backup piece /tmp/dbbackup/incre_db_MINGDB_20180731_65.bak

channel d3:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_66.bak   tag=TAG20180731T184314

channel d3:   restored backup piece 1

channel d3:   restore complete, elapsed time: 00:00:01

channel d1:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_68.bak   tag=TAG20180731T184314

channel d1:   restored backup piece 1

channel d1:   restore complete, elapsed time: 00:00:00

channel d2:   piece handle=/tmp/dbbackup/incre_db_MINGDB_20180731_65.bak   tag=TAG20180731T184314

channel d2:   restored backup piece 1

channel d2:   restore complete, elapsed time: 00:00:02

 

Finished recover   at 31-JUL-18

 

released   channel: d1

 

released channel:   d2

 

released   channel: d3

關閉數(shù)據(jù)庫:

RMAN>   shutdown immediate;

 

database   dismounted

Oracle instance   shut down

拷貝restore出來的控制文件到原路徑

oracle@bd-dev-mingshuo-182:~$   cp control01.ctl /opt/mingdbdata/data/MINGDB/controlfile/o1_mf_fn8w9go7_.ctl

打開數(shù)據(jù)庫,開啟日志應用:

oracle@bd-dev-mingshuo-182:~$sqlplus   / as sysdba

 

SQL*Plus:   Release 12.2.0.1.0 Production on Tue Jul 31 19:08:40 2018

 

Copyright (c)   1982, 2016, Oracle.  All rights   reserved.

 

Connected to an   idle instance.

 

SQL> startup

ORACLE instance started.

 

Total System   Global Area 3254779904 bytes

Fixed Size                  8797928 bytes

Variable   Size            1124073752 bytes

Database   Buffers         2097152000 bytes

Redo   Buffers               24756224 bytes

Database   mounted.

Database opened.

SQL> alter   database recover managed standby database disconnect from session;

 

Database   altered.

驗證:

SQL> select   process,status,sequence# from v$managed_standby;

 

PROCESS   STATUS        SEQUENCE#

---------   ------------ ----------

DGRD      ALLOCATED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

DGRD      ALLOCATED             0

RFS       IDLE                  0

RFS       IDLE                105

RFS       IDLE                  0

MRP0      WAIT_FOR_LOG        105

 

10 rows   selected.

MRP0進程已經(jīng)在等待105好歸檔了。

主庫切一下日志:

SQL> alter   system switch logfile;

 

System altered.

備庫此時應用到的最大日志,已經(jīng)追上了。

SQL> select   thread#,max(SEQUENCE#) from v$archived_log where applied='YES' group by   thread# ; 

 

   THREAD# MAX(SEQUENCE#)

----------   --------------

         1            105

“oracle基于增量備份如何解決dataguard gap問題”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關的知識可以關注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實用文章!

當前標題:oracle基于增量備份如何解決dataguardgap問題
分享路徑:http://aaarwkj.com/article6/gdsdig.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供關鍵詞優(yōu)化、網(wǎng)站營銷、做網(wǎng)站、網(wǎng)站排名、建站公司、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
欧美日韩黄色人人小视频| 久久综合婷婷亚洲色图| 91九色在线视频观看| 国产一级黄色录像大片| 成人午夜三级在线观看| 亚洲av男人电影天堂| 精品人妻一区二区三区蜜桃电| 亚洲国产日韩欧美在线播放| 91精品人妻互换一区二区| 天天干夜夜泡天天操| 欧美精品欧美激情免费区| 欧美一级纯黄电影视频| 婷婷久久香蕉五综合加勒比| 美女高潮啪啪啪91| 无套内射精品一区二区| 五月天丁香婷婷狠狠狠| 黄色成人av免费看| 亚洲一区成人免费电影| 偷拍偷窥女厕一区二区视频| 欧美日在线观看加勒比| 精品国产品国语在线不卡| 亚洲综合一区二区三区四区在线| 毛片成人18毛片免费看| 国产av一区二区三区| 色噜噜男人的天堂av| 正在播放老肥熟妇露脸| 国产在线精品91国自产拍| avav男人天堂亚洲天堂| 青青草免费在线视频视频| 深夜av免费在线观看| 日韩中文字幕久久中文字幕| 亚洲国产精品中文字幕久久| 91精品日日躁夜夜躁欧美| 久久精品久久精品欧美大片| 天堂av在线一区二区三区| 婷婷中文字幕在线视频| 中文字幕乱码一区二区欧美| 国产福利三级在线观看| 人妻一区二区三区中文字幕| 国产三级av高清一区二区| 国产女技师口爆在线观看|