Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle 11g through SCN do incremental backup repair standby library detailed process     - CentOS7 method to upgrade the kernel to 3.18 (Linux)

- Install and configure GO 1.2.1 under CentOS 6.5 (Linux)

- Easy to install Ubuntu 15.04 and Ubuntu 15.04 GNOME on Wayland trial (Linux)

- Weld a problem in JDK 8u60 environment (Programming)

- Denyhosts prevent hackers using SSH scanning (Linux)

- Simple to install Tor browser to Ubuntu 14.04 and Linux Mint 17 (Linux)

- Linux security concerns again (Linux)

- How to install Virtualbox 4.3.20 in Ubuntu 14.04 (Linux)

- Good wireless network security information spread in the air (Linux)

- MySQL full-index scan bug (Database)

- ElasticSearch - Basic Concepts (Server)

- How to install Go1.5 source development environment on Mac (Server)

- Vi editor Introduction (Linux)

- The Linux role of each directory contents (Linux)

- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)

- Linux password file security issues detailed usage (Linux)

- Oracle Automatic Diagnostic Repository (Automatic Diagnostic Repository, ADR) (Database)

- PHP 5.3 New Features Detail (Linux)

- Ubuntu / Fedora / CentOS system how to install Plex Media Server 0.9.9 (Linux)

- Linux, see picture not resolve the problem (Linux)

 
         
  Oracle 11g through SCN do incremental backup repair standby library detailed process
     
  Add Date : 2017-08-31      
         
       
         
  Background description: Oracle's standby background alert alert, as follows:

ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 10240change 11125950022 time 05/08/2015 22:00:41
ORA-00334: archived log: '/ data / oracle / oradgdata / standby_archive / 1_32350_821708334.dbf'
Recovery interrupted!
Wed May 13 13:26:08 2015
Trace dumping is performedid = [cdmp_20150513132608]
Wed May 13 13:26:08 2015
Sweep [inc] [273026]: completed
Recovered data files to a consistent stateat change 11125946527
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_pr00_21813.trc:
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 10240change 11125950022 time 05/08/2015 22:00:41
ORA-00334: archived log: '/ data / oracle / oradgdata / standby_archive / 1_32350_821708334.dbf'
MRP0: Background Media Recovery processshutdown (powerdes)
Wed May 13 13:39:58 2015
Standby controlfile consistent with primary
RFS [3]: Selected log 5 for thread 1sequence 32488 dbid -903205653 branch 821708334
Wed May 13 13:39:58 2015
Archived Log entry 24243 added for thread 1sequence 32487 ID 0xca2ab4eb dest 3:

analysis:

This indicates that the standby has been unable to apply archiving, and in 32,350 the archive log error, but the archive log file /data/oracle/oradgdata/standby_archive/1_32350_821708334.dbf exist, but can not be applied.

Previously using the Duplicate target database command to restore online Oracle datagard database, but this is the entire library recovery, consuming a long time; think of oracle there is a way to restore the scn based standby library, so there are scn-based incremental Backup to restore the standby library.

1, to the database for the record under the unrecorded record of the initial value

SQL> select min (sequence #) fromv $ archived_log where applied = 'NO'

 2 ;

MIN (SEQUENCE #)

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

          32350

SQL> select max (sequence #) fromv $ archived_log where applied = 'NO';

MAX (SEQUENCE #)

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

          32508

SQL>

See from 32350 to 32508, there is no application of the archive log records.

2, to the main library for incremental backup needs SCN number

To the main library under the query transmission 32530 archived logs corresponding to the scn number, query sql as follows:

SELECT SEQUENCE #, to_char (FIRST_CHANGE #) fc, to_char (NEXT_CHANGE #) nc FROM v $ archived_log WHERE SEQUENCE #> 32349 ORDERBY 1;

SELECT SEQUENCE #, to_char (FIRST_CHANGE #) fc, to_char (NEXT_CHANGE #) nc FROM v $ archived_log WHERE SEQUENCE # = 32350 ORDER BY1;

SQL> SELECT SEQUENCE #, to_char (FIRST_CHANGE #) fc, to_char (NEXT_CHANGE #) nc FROM v $ archived_log WHERE SEQUENCE # = 32350 ORDER BY1;

 SEQUENCE # FC NC

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

    32350 11125946510 11125975101

    32350 11125946510 11125975101

 

SQL>

We see the main library 32350 archived logs in the main library corresponding to the FIRST_CHANGE # scn is 11125946510

To check the main equipment under the scn, we can see each other scn inconsistent:

Select to_char (current_scn) scn fromv $ database;

Main library:

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

 

SCN

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

11134239189

 

SQL>

Database preparation:

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

 

SCN

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

11125946526

 

SQL>

Can also be prepared in accordance with the last scn number to the main reservoir on the incremental backup, but in order to be safe, we are the main library of the scn date, then the need to 11125946510 scn number on the main database to do incremental Backup.

3, in the main library set log_archive_dest_state_2 value, the main library of the log can not be archived to the standby.

First of all, check their archive directory select * from V $ ARCHIVE_DEST;

PS: select * from V $ ARCHIVE_DEST; Query to STATUS for the VALID, and then DESTINATION for PD_DG (here is the identity of the database) dest number is transferred to the standby archive archived log; another directory / oracle / app / oracle / Flash_recovery_area / archivelog is the main library itself, the archive log dest, this directory is stored in the main library itself, the archive log

ALTER system SET log_archive_dest_state_2 = 'defer';

SQL> ALTER system SETlog_archive_dest_state_2 = 'defer';

System altered.

SQL>

4, to prepare the database to stop the standby database application

ALTER DATABASE RECOVER MANAGED STANDBYDATABASE CANCEL;

SQL> ALTER DATABASE RECOVER MANAGEDSTANDBY DATABASE CANCEL;

ALTER DATABASE RECOVER MANAGED STANDBYDATABASE CANCEL

*

ERROR at line 1:

ORA-16136: Managed Standby Recovery not active

SQL>

See the standby is not active, so do not need to implement.

5, in the main library to perform backups

Incremental backup based on SCN:

Backup device type disk incremental fromscn 11125946510 database format '/home/oracle/db_incre%U.bbk';

RMAN> backup device type diskincremental from scn 11125946510 database format '/ home / oracle / db_incre% U.bbk';

Starting backup at 13-MAY-15

Using target database control file instead of recovery catalog

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID = 212 devicetype = DISK

Backup will be obsolete on date20-MAY-15

Archived logs will not be kept or backed up

Channel ORA_DISK_1: starting full datafilebackup set

Channel ORA_DISK_1: specifies datafile (s) inbackup set

Input datafile file number = 00005name = / home / oradata / powerdes / powerdesk01.dbf

Input datafile file number = 00003name = / home / oradata / powerdes / undotbs01.dbf

Input datafile file number = 00006name = / home / oradata / powerdes / plas01.dbf

Input datafile file number = 00001name = / home / oradata / powerdes / system01.dbf

Input datafile file number = 00002name = / home / oradata / powerdes / sysaux01.dbf

Input datafile file number = 00007name = / home / oradata / powerdes / pl01.dbf

Input datafile file number = 00011 name = / home / oradata / powerdes / plcrm01.dbf

Input datafile file number = 00004name = / home / oradata / powerdes / users01.dbf

Input datafile file number = 00008name = / home / oradata / powerdes / help01.dbf

Input datafile file number = 00009name = / home / oradata / powerdes / adobelc01.dbf

Input datafile file number = 00010name = / home / oradata / powerdes / sms01.dbf

Channel ORA_DISK_1: starting piece 1 at13-MAY-15

Channel ORA_DISK_1: finished piece 1 at13-MAY-15

Piecehandle = / home / oracle / db_increi3q6s13g_1_1.bbk tag = TAG20150513T202207comment = NONE

Channel ORA_DISK_1: backup set complete, elapsed time: 00:09:45

Using channel ORA_DISK_1

Backup will be obsolete on date 20-MAY-15

Archived logs will not be kept or backed up

Channel ORA_DISK_1: starting full datafilebackup set

Channel ORA_DISK_1: specifying datafile (s) in backup set

Including current control file in backupset

Channel ORA_DISK_1: starting piece 1 at13-MAY-15

Channel ORA_DISK_1: finished piece 1 at13-MAY-15

Piecehandle = / home / oracle / db_increi4q6s1lp_1_1.bbk tag = TAG20150513T202207comment = NONE

Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 13-MAY-15

RMAN>

See if the backup was successful

RMAN> list backup of database;

...

BS Key Type LV Size Device Type Elapsed Time Completion Time

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

3343 Incr 2.41G DISK 00:09:35 13-MAY-15

      BP Key: 3343 Status: AVAILABLE Compressed: NO Tag: TAG20150513T202207

      Piece Name: /home/oracle/db_increi3q6s13g_1_1.bbk

      Keep: NOLOGS Until: 20-MAY-15

 List of Datafiles in backup set 3343

 File LV Type Ckp SCN CkpTime Name

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

 1 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / system01.dbf

 2 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / sysaux01.dbf

 3 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / undotbs01.dbf

 4 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / users01.dbf

 5 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / powerdesk01.dbf

 6 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / plas01.dbf

 7 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / pl01.dbf

 8 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / help01.dbf

 9 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / adobelc01.dbf

 10 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / sms01.dbf

 11 Incr 11134253054 13-MAY-15 / home / oradata / powerdes / plcrm01.dbf

RMAN>

To view the backup file, see the 2 bbk, said the backup was successful, as follows:

[Oracle @ localhost ~] $ ll db *

-rw-r ----- 1 oracle oinstall 2591825920 May13 20:31 db_increi3q6s13g_1_1.bbk

-rw-r ----- 1 oracle oinstall 19234816 May 13 20: 31db_increi4q6s1lp_1_1.bbk

[Oracle @ localhost ~] $


6, in the main library to re-generate the control file

ALTER DATABASE CREATE standby controlfileAS '/home/oracle/standby.ctl';

SQL> ALTER DATABASE CREATE standbycontrolfile AS '/home/oracle/standby.ctl';

Database altered.

SQL>

7, copy the backup file to the standby

[Oracle @ localhost ~] $ scp db * / home / oracle / standby.ctl root@192.168.xx.xx: / data / oracle / backup / restore /

Root@192.168.xx.xx's password:

Db_increi3q6s13g_1_1.bbk 100% 2472MB 95.1MB / s 00:26

Db_increi4q6s1lp_1_1.bbk 100% 18MB 18.3MB / s 00:00

Standby.ctl 100% 18MB 18.3MB / s 00:00

[Oracle @ localhost ~] $

8, in the standby operation, ready to rman before the environment

Close the standby library

SQL> shutdown immediate

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL>


Then start to nomont state

SQL> startup nomount

ORACLE instance started.


Total System Global Area 5344731136 bytes

Fixed Size 2213136 bytes

Variable size 3489663728 bytes

Database Buffers 1811939328 bytes

Redo Buffers 40914944 bytes

SQL>

9, prepared by rman to restore the control file

 Restore controlfile from '/ data / oracle / backup / restore / standby.ctl';

RMAN> restore controlfile from '/ data / oracle / backup / restore / standby.ctl';

Starting restore at 13-MAY-15

Using channel ORA_DISK_1

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

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

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

RMAN-03002: failure of restore command at05 / 13/2015 20:44:02

RMAN-06172: no AUTOBACKUP found orspecified handle is not a valid copy or piece

RMAN>

 
Contents of the authority, the need to set up into Oracle users

[Root @ localhost restore] # ll

Total 2568604

-rw-r ----- 1 root root 2591825920 May 1320: 35 db_increi3q6s13g_1_1.bbk

-rw-r ----- 1 root root 19234816 May 13 20: 35db_increi4q6s1lp_1_1.bbk

-rw-r ----- 1 root root 19185664 May 13 20:35 standby.ctl

[Root @ localhost restore] # chown -Roracle.dba *

[Root @ localhost restore] #


RMAN> restore controlfile from '/ data / oracle / backup / restore / standby.ctl';

Starting restore at 13-MAY-15

Using target database control file instead of recovery catalog

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID = 386 devicetype = DISK

Channel ORA_DISK_1: copied control filecopy

Output filename = / home / oradata / powerdes / control01.ctl

Output filename = / oracle / app / oracle / flash_recovery_area / powerdes / control02.ctl

Finished restore at 13-MAY-15


RMAN>

10, prepared on the implementation of catalog operation rman

First load the database to mount, and then perform catalog start with '/ data / oracle / backup / restore' recovery

RMAN> alter database mount

2>;

Using target database control file instead of recovery catalog

Database mounted

RMAN> catalog start with '/ data / oracle / backup / restore'

RMAN> catalog start with '/ data / oracle / backup / restore';

 
Starting implicit crosscheck backup at13-MAY-15

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID = 867 devicetype = DISK

Crosschecked 51 objects

Finished implicit crosscheck backup at13-MAY-15

Starting implicit crosscheck copy at13-MAY-15

Using channel ORA_DISK_1

Finished implicit crosscheck copy at13-MAY-15

Searching for all files in the recoveryarea

Cataloging files ...

No files cataloged


Searching for all files that match thepattern / data / oracle / backup / restore


List of Files Unknown to the Database

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

File name: /data/oracle/backup/restore/db_increi3q6s13g_1_1.bbk

File Name: /data/oracle/backup/restore/db_increi4q6s1lp_1_1.bbk

File Name: /data/oracle/backup/restore/standby.ctl

Do you really want to catalog the abovefiles (enter YES or NO)? Yes

Cataloging files ...

Cataloging done

 
List of Cataloged Files

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

File Name: /data/oracle/backup/restore/db_increi3q6s13g_1_1.bbk

File Name: /data/oracle/backup/restore/db_increi4q6s1lp_1_1.bbk

File Name: /data/oracle/backup/restore/standby.ctl

             
RMAN>

 

11, the backup library rman implementation restore operation

RECOVER DATABASE NOREDO; PS: plus NOREDO not online log

RMAN> RECOVER DATABASE NOREDO;

 
Starting recover at 13-MAY-15

Using channel ORA_DISK_1

Channel ORA_DISK_1: starting incremental datafile backup set restore

Channel ORA_DISK_1: specifying datafile (s) to restore from backup set

Destination for restore of datafile 00001: /home/oradata/powerdes/system01.dbf

Destination for restore of datafile 00002: /home/oradata/powerdes/sysaux01.dbf

Destination for restore of datafile 00003: /home/oradata/powerdes/undotbs01.dbf

Destination for restore of datafile 00004: /home/oradata/powerdes/users01.dbf

Destination for restore of datafile 00005: /home/oradata/powerdes/powerdesk01.dbf

Destination for restore of datafile 00006: /home/oradata/powerdes/plas01.dbf

Destination for restore of datafile 00007: /home/oradata/powerdes/pl01.dbf

Destination for restore of datafile 00008: /home/oradata/powerdes/help01.dbf

Destination for restore of datafile 00009: /home/oradata/powerdes/adobelc01.dbf

Destination for restore of datafile 00010: /home/oradata/powerdes/sms01.dbf

Destination for restore of datafile 00011: /home/oradata/powerdes/plcrm01.dbf

Channel ORA_DISK_1: reading from backuppiece /data/oracle/backup/restore/db_increi3q6s13g_1_1.bbk

Channel ORA_DISK_1: piecehandle = / data / oracle / backup / restore / db_increi3q6s13g_1_1.bbktag = TAG20150513T202207

Channel ORA_DISK_1: restored backup piece 1

Channel ORA_DISK_1: restore complete, elapsed time: 00:05:45
                                                                                                                                                                               

Finished recover at 13-MAY-15

RMAN>

The background alert log output is:

Using STANDBY_ARCHIVE_DEST parameterdefault value as / data / oracle / oradgdata / standby_archive
Wed May 13 20:54:42 2015
Incremental restore complete of datafile 4 / home / oradata / powerdes / users01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10905979642
Wed May 13 20:54:53 2015
Incremental restore complete of datafile 8 / home / oradata / powerdes / help01.dbf
Checkpoint is 11134253054
Last deallocation scn is 9881798870
Wed May 13 20:55:08 2015
Incremental restore complete of datafile 9 / home / oradata / powerdes / adobelc01.dbf
Checkpoint is 11134253054
Wed May 13 20:55:21 2015
Incremental restore complete of datafile 10 / home / oradata / powerdes / sms01.dbf
Checkpoint is 11134253054
Wed May 13 20:55:34 2015
Incremental restore complete of datafile 11 / home / oradata / powerdes / plcrm01.dbf
Checkpoint is 11134253054
Incremental restore complete of datafile 7 / home / oradata / powerdes / pl01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10905470965
Wed May 13 20:56:24 2015
Db_recovery_file_dest_size of 15360 MB is0.00% used. This is a
User-specified limit on the amount of spacethat will be used by this
Database for recovery-related files, anddoes not reflect the amount of
Space available in the underlyingfilesystem or ASM diskgroup.
Wed May 13 20:56:26 2015
Incremental restore complete of datafile 2 / home / oradata / powerdes / sysaux01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10906515871
Wed May 13 20:56:43 2015
Incremental restore complete of datafile 1 / home / oradata / powerdes / system01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10825889348
Incremental restore complete of datafile 6 / home / oradata / powerdes / plas01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10905977986
Incremental restore complete of datafile 3 / home / oradata / powerdes / undotbs01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10908635608
Wed May 13 20:59:58 2015
Incremental restore complete of datafile 5 / home / oradata / powerdes / powerdesk01.dbf
Checkpoint is 11134253054
Last deallocation scn is 10906663694

12, the standby database to restart the application log

 ALTER DATABASE recover managed standby DATABASE disconnect FROM SESSION;

        SQL> ALTER DATABASE recover managed standby DATABASE disconnect FROM SESSION;

Databasealtered.

        SQL>

  The background alert log output is:

 ALTER DATABASE recover managed standby DATABASE disconnect FROM SESSION
Attemptto start background Managed Standby Recovery process (powerdes)
WedMay 13 21:04:41 2015
MRP0started with pid = 19, OS id = 23729
MRP0: Background Managed Standby Recovery process started (powerdes)
Started logmerger process
WedMay 13 21:04:46 2015
ManagedStandby Recovery not using Real Time Apply
ParallelMedia Recovery started with 16 slaves
Waiting for all non-current ORLs to be archived ...
Allnon-current ORLs have been archived.
MediaRecovery Waiting for thread 1 sequence 32510
Completed: ALTER DATABASE recover managed standby DATABASE disconnect FROM SESSION

13, the main library operation to the archive transfer archive log

The commands are:

ALTER system SET log_archive_dest_state_2 = 'enable';

To prepare the database background alert log information:

Standby controlfile consistent with primary
SRL log 4 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 4 of thread 0, wrong thread # 1 in header
ORA-00312: online log 4 thread 0: '/ home / oradata / powerdes / redo_dg_01.log'
SRL log 5 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 5 of thread 0, wrong thread # 1 in header
ORA-00312: online log 5 thread 0: '/ home / oradata / powerdes / redo_dg_02.log'
SRL log 6 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/ home / oradata / powerdes / redo_dg_03.log'
SRL log 5 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 5 of thread 0, wrong thread # 1 in header
ORA-00312: online log 5 thread 0: '/ home / oradata / powerdes / redo_dg_02.log'
SRL log 6 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/home/oradata/powerdes/redo_dg_03.log'
SRL log 6 needs clearing because log hasnot been created
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/ home / oradata / powerdes / redo_dg_03.log'
RFS [1]: No standby redo logfiles of filesize 52428800 AND block size 512 exist
Clearing online log 6 of thread 0 sequencenumber 0
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_rfs_23767.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: Online log 6 thread 0: '/ home / oradata / powerdes / redo_dg_03.log'
Wed May 13 21:06:47 2015
Clearing online log 4 of thread 0 sequencenumber 0
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_arc4_23630.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 4 of thread 0, wrong thread # 1 in header
ORA-00312: online log 4 thread 0: '/ home / oradata / powerdes / redo_dg_01.log'
Clearing online log 5 of thread 0 sequencenumber 0
Errors in file / oracle / app / oracle / diag / rdbms / pddgunq / powerdes / trace / powerdes_arc4_23630.trc:
ORA-00367: checksum error in log fileheader
ORA-00315: log 5 of thread 0, wrong thread # 1 in header
ORA-00312: online log 5 thread 0: '/ home / oradata / powerdes / redo_dg_02.log'
RFS [1]: Selected log 4 for thread 1sequent 32511 dbid -903205653 branch 821708334
Wed May 13 21:06:51 2015
RFS [2]: Assigned to RFS process 23775
RFS [2]: Identified database type as'physical standby ': Client is ARCH pid 20139
RFS [2]: Selected log 5 for thread 1sequ 32510 dbid -903205653 branch 821708334
Wed May 13 21:06:52 2015
RFS [3]: Assigned to RFS process 23777
RFS [3]: Identified database type as'physical standby ': Client is ARCH pid 20131
Wed May 13 21:06:52 2015
Archived Log entry 1 added for thread 1sequ 32510 ID 0xca2ab4eb dest 3:
Wed May 13 21:06:52 2015
Media Recovery Log / data / oracle / oradgdata / standby_archive / 1_32510_821708334.dbf
Wed May 13 21:06:54 2015
Archived Log entry 2 added for thread 1sequent 32511 ID 0xca2ab4eb dest 3:
Changing standby controlfile to MAXIMUMAVAILABILITY level
RFS [1]: Selected log 4 for thread 1sequ 32512 dbid -903205653 branch 821708334
Wed May 13 21:07:07 2015
Media Recovery Log / data / oracle / oradgdata / standby_archive / 1_32511_821708334.dbf
Media Recovery Waiting for thread 1sequence 32512 (in transit)

14, to the main library to view the archive log archive, whether to maintain consistency

Main library:

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination / oracle / app / oracle / flash_recovery_area / archivelog

Oldest online log sequence 32510

Next log sequence to archive 32512

Current log sequence 32512

SQL>

Database preparation:

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination / data / oracle / oradgdata / standby_archive

Oldest online log sequence 32511

Next log sequence to archive 0

Current log sequence 32512

SQL>

15, cut in the main library archive log to see if applied to the standby

PS: This operation has a certain risk, not in the peak operation of the business, and finally in the early hours of the peak hours of operation, so as not to hurt countless, ^ _ ^

Alter system switch logfile;

SQL> alter system switch logfile;

System altered.


SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination / oracle / app / oracle / flash_recovery_area / archivelog

Oldest online log sequence 32511

Next log sequence to archive 32513

Current log sequence 32513

SQL>

 
16, after the main library cut the log, to prepare the library to see the log has not transmitted in the past and applied

Backup alert log

Wed May 13 21:11:23 2015

Media Recovery Log / data / oracle / oradgdata / standby_archive / 1_32512_821708334.dbf

Media Recovery Waiting for thread 1sequence 32513 (in transit)

Prepared database alert loglist;

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination / data / oracle / oradgdata / standby_archive

Oldest online log sequence 32512

Next log sequence to archive 0

Current log sequence 32513

SQL>

17, open read only mode to open the standby library, in the standby operation

First check the database status

SQL> select open_mode fromv $ database;

OPEN_MODE

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

MOUNTED

 
SQL>

 
Cancel applied

Alter database recover managed standbydatabase using current logfile disconnect from session;

SQL> alter database recover managedstandby database using current logfile disconnect from session;


*

ERROR at line 1:

ORA-01153: an incompatible media recoveryis active

SQL> SQL>

 
Has been given the following solution

SQL> alter database recover managedstandby database cancel;

Database altered.

SQL>

And then see whether there is no application of the NO, no NO, as follows:

SQL> select sequence #, applied fromv $ archived_log where applied = 'NO' order by sequence #;

No rows selected

SQL>

Open in open readonly mode

SQL> alter database open read only;

Database altered.

SQL>

SQL> select open_mode fromv $ database;

OPEN_MODE

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

READ ONLY

SQL>

 
Then launch the application

SQL> alter database recover managedstandby database disconnect from session;

Database altered.

 
SQL>

SQL> select open_mode fromv $ database;

OPEN_MODE

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

READ ONLY WITH APPLY

SQL>

18, and then check whether the main library is consistent

View through the following order:

Select sequence #, applied fromv $ archived_log order by sequence # asc;

Archive log list;

Query the maximum archived log serial number:

SELECTSEQUENCE #, to_char (FIRST_CHANGE #), to_char (NEXT_CHANGE #) FROM v $ archived_logWHERE SEQUENCE #> 32507 ORDER BY 1;
     
         
       
         
  More:      
 
- Ubuntu FAQ solutions (Linux)
- DB2 manually create a library (Database)
- Teach you how to protect the security of Linux desktop (Linux)
- JEdit 5.2 Pro Edition installation on Ubuntu 14.04 (Linux)
- Linux Powerful command Awk Introduction (Linux)
- HTML5 postMessage cross-domain data exchange (Programming)
- How UTorrent download the ISO image from the command line (Linux)
- Git large file storage will help handle large binary files (Linux)
- Notebook computer forget password solution (Linux)
- Log4Net (Linux)
- Ubuntu installed racing game Speed Dreams 2.1 (Linux)
- Ubuntu 14.04 can be used to create a WIFI hotspot for Android (Linux)
- Linux system ARP attack solution (Linux)
- Shell programming entry (Programming)
- Analysis of MySQL High Availability (Database)
- VMware6 achieve nat Internet (Linux)
- Linux operating system, the internal and external security overview (Linux)
- Ubuntu 15.04 installation MATE 1.10 (Linux)
- Use ISO document production OpenStack used CoreOS mirror (Linux)
- MySQL performance view and configure finishing Daquan (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.