Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle RMAN-06023 and ORA-19693 errors     - Build RPM package uses Docker mirror (Linux)

- Binder began to talk about inter-process communication mechanism from Android AIDL (Programming)

- Spacewalk remove packages install the update (Linux)

- Linux kernel programming parameter passing between modules and function calls (Programming)

- Vi syntax highlighting settings (Linux)

- Ubuntu Series Installation Docker (Linux)

- Use regular expressions to check whether the input box to enter a URL (Programming)

- How to use the process on the desktop xkill end Linux (Linux)

- Java multi-threaded communications pipeline flow (Programming)

- Usage sed some of the parameters (Linux)

- Spring Integration ehcache annotation implement the query cache and cache update or delete instant (Programming)

- Hadoop new and old version of the difference in the size of the InputSplit (Server)

- OpenSSL for secure transmission and use of skills of files between Windows and Linux (Linux)

- Oracle ORA-01089 failure analysis (Database)

- Linux shell string interception and stitching (Linux)

- Linux system performance tuning of Analysis (Linux)

- GCC and gfortran write MEX program (Matlab2012a) under Ubuntu 14.04 (Programming)

- Cool Android realization SVG animation (Programming)

- Hadoop configuration ssh automation of automation (Server)

- CentOS directory structure Explanation (Linux)

 
         
  Oracle RMAN-06023 and ORA-19693 errors
     
  Add Date : 2018-11-21      
         
       
         
  In a 0 backup database to restore to other machines, the first encounter RMAN-06023 then encounter ORA-19693 error, the error occurred in the environment and the content is as follows:
Database version:

To start restoring the database:

SQL> select * from v $ version;
BANNER
-------------------------------------------------- ------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL / SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

Startup nomount;
RMAN> restore controlfile from 'I: \ backup \ C-2711934557-20150401-02_NSOA_CONTROLFILE_20150401';
Start restore at 2015-04-10 15:09:01
Replace the recovery catalog with the target database control file
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 Device Type = DISK

Channel ORA_DISK_1: Restoring control file
Channel ORA_DISK_1: Restore completed, with time: 00:00:08
Output file name = I: \ NSOADP \ CONTROL01.CTL
Complete restore at 2015-04-10 15:09:10

RMAN> alter database mount;
RMAN> run
{
Allocate channel dev type disk;
Allocate channel dev1 type disk;
Set newname for datafile 1 to 'd: \ nsoadp \ SYSTEM01.DBF';
Set newname for datafile 2 to 'd: \ nsoadp \ SYSAUX01.DBF';
Set newname for datafile 4 to 'd: \ nsoadp \ USERS01.DBF';
...............
Restore database
Switch datafile all;
Recover database;
Release channel dev;
Release channel dev1;
}}
Executing the command: SET NEWNAME

Executing the command: SET NEWNAME
.........
Start restore at 2015-04-10 15:30:19
Channel dev: Starting restore of datafile backup set
Channel dev: Specifying the data file that was restored from the backup set
RMAN-06026: Some targets were not found - Terminate the restore
RMAN-06023: A copy of datafile 4 was not found to restore
RMAN-06023: A copy of datafile 2 was not found to restore
RMAN-06023: A copy of datafile 1 was not found to restore

 

 But the actual level 0 backup is to include these data files:

 

RMAN> list backup of datafile 4,2,1;
A list of backup sets
===================
BS Keyword Type LV Size Device Type Elapsed Time Completion Time
-------- ---- - ---------- ----------- ----- ---- ---------------
10071 Incr 0 30.29G DISK 02:46:53 2015-04-01 13:29:12
        BP Keyword: 10071 Status: AVAILABLE Compressed: YES Flag: NSOA_BACKUP_INCR0
Section Name: I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401
  The list of data files in backup set 10071
  File LV Type Ckp SCN Ckp Time name
  ---- - ---- ---------- ------------------- ----
  4 0 Incr 13625590769939 2015-04-01 10:42:20 G: \ U09 \ ORADATA \ NSOA \ USERS01.DBF

BS Keyword Type LV Size Device Type Elapsed Time Completion Time
-------- ---- - ---------- ----------- ----- ---- ---------------
10072 Incr 0 29.04G DISK 02:47:11 2015-04-01 13:29:30
        BP Keyword: 10072 Status: AVAILABLE Compressed: YES Flag: NSOA_BACKUP_INCR0
Section Name: I: \ BACKUP \ B_NSOA_10192_UGQ39J0B_20150401
  A list of data files in backup set 10072
  File LV Type Ckp SCN Ckp Time name
  ---- - ---- ---------- ------------------- ----
  1 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U07 \ ORADATA \ NSOA \ SYSTEM01.DBF
  2 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U08 \ ORADATA \ NSOA \ SYSAUX01.DBF

 

 So you can determine, the backup file itself is no problem, the problem lies

If we start a RESTORE database with a BACKUP controlfile and Flash Recovery Area is defined, RMAN execute and implicit crosscheck and catalog of all the objects in the Flash Recovery Area.
RMAN will catalog any objects in the Flash Recovery Area that will not be registered in the controlfile and if any of this files belongs to an incarnation different from CURRENT incarnation in the controlfile then changes controlfile CURRENT incarnation to the one found in the file that is being Cataloged.
This prevents database from restoring backups that belong to old CURRENT incarnation.
RMAN considers backup availble for being restored if the backup incarnation and CURRENT incarnation in controlfile are the same.

According to the documentation, I set the db_recovery_file_dest and db_recovery_file_dest_size parameters and re-restore the control file, and then restore the catalog to point to my backup file directory:

 

RMAN> restore controlfile from 'I: \ backup \ C-2711934557-20150401-02_NSOA_CONTROLFILE_20150401';
RMAN> alter database mount;
RMAN> catalog start with 'I: \ backup';

Start implicit crosscheck backup on 2015-04-10 15:09:40
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 Device Type = DISK
Twenty-nine objects have been cross-checked
Complete implicit crosscheck backup on 2015-04-10 15:10:37

Start implicit crosscheck copy at 2015-04-10 15:10:37
Use the channel ORA_DISK_1
Complete implicit crosscheck copy 2015-04-10 15:10:37

Search for all files in the recovery area
Preparing file directory ...
There is no directory for the files

Searches for all files that match the pattern I: \ backup

A list of unknown files in the database
=====================================
File name: I: \ backup \ ARC_NSOA_10197_ULQ3A10I_20150401
File name: I: \ backup \ ARC_NSOA_10198_UMQ3A10I_20150401
.........
Are you sure you want to include the above files in the directory (enter YES or NO)? Yes
Preparing file directory ...
Directory is completed

 

After the completion of the preparation of catalog I verified the restoration, RMAN-06023 error is not reported, but there is another implied error:

 

RMAN> restore database preview;

Start restore at 2015-04-10 15:45:41
Use the channel ORA_DISK_1
A list of backup sets
===================
BS Keyword Type LV Size
-------- ---- - ----------
10072 Incr 0 29.04G
  A list of data files in backup set 10072
  File LV Type Ckp SCN Ckp Time name
  ---- - ---- ---------- ------------------- ----
  1 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U07 \ ORADATA \ NSOA \ SYSTEM01.DBF
  2 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U08 \ ORADATA \ NSOA \ SYSAUX01.DBF
  11 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U13 \ ORADATA \ NSOA \ FRDC_TABLESPACE.DBF
  15 0 Incr 13625590769907 2015-04-01 10:42:19 G: \ U10 \ ORADATA \ NSOA \ TBS_ZG.DBF
.........
The media recovery boot SCN is 13625590769793
The recovery range must exceed SCN 13625591441474 to clear the data file ambiguity
Complete restore at 2015-04-10 15:46:27

 

 I did not realize what was wrong, so I began to restore, but unfortunately ORA-19693 came:

 

RMAN> run
{
Allocate channel dev type disk;
Allocate channel dev1 type disk;
Set newname for datafile 1 to 'd: \ nsoadp \ SYSTEM01.DBF';
Set newname for datafile 2 to 'd: \ nsoadp \ SYSAUX01.DBF';
Set newname for datafile 4 to 'd: \ nsoadp \ USERS01.DBF';
...............
Restore database;
Switch datafile all;
Recover database;
Release channel dev;
Release channel dev1;
}}
Executing the command: SET NEWNAME

Executing the command: SET NEWNAME
.........
Channel dev: Restore the data file 00004 to d: \ nsoadp \ USERS01.DBF
Released channel: dev
Released channel: dev1
RMAN-00571: ============================================== =============
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ============================================== =============
RMAN-03002: The restore command (on 04/10/2015 15:51:10) failed
ORA-19693: Included backup fragment I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401


ORA-19693: backup piece string already includedCause: This backup piece was already specified for inclusion in the restore conversation. A restore conversation may process a single instance of a backup piece.Action: Remove the specified duplicate backup piece in restore steps and restart The conversation. I suddenly confused, a good end of the 0 backup how there will be duplicate backup, so I used the list to view the backup:


RMAN> list backup;
  BS Keyword Type LV Size
  -------- ---- - ----------
  10071 Incr 0 30.29G
  The list of data files in backup set 10071
  File LV Type Ckp SCN Ckp Time name
  ---- - ---- ---------- ------------------- ----
  4 0 Incr 13625590769939 2015-04-01 10:42:20 G: \ U09 \ ORADATA \ NSOA \ USERS01.DBF

Backup set copy number 1 belongs to backup set 10071
  Device Type Elapsed Time Compression Flag
  ----------- ------------ ------------------- -------- -
  DISK 02:46:53 2015-04-01 13:29:12 YES NSOA_BACKUP_INCR0

    Backup set 10071 A list of backup clips for copy number 1
    BP Keyword Pc # Status Segment name
    -------- --- ----------- ----------
    10071 1 AVAILABLE I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401

  Backup set copy number 2 belongs to backup set 10071
  Device Type Elapsed Time Compression Flag
  ----------- ------------ ------------------- -------- -
  DISK 02:46:53 2015-04-10 18:00:58 YES NSOA_BACKUP_INCR0

    Backup set 10071 A list of backup clips for copy number 2
    BP Keyword Pc # Status Segment name
    -------- --- ----------- ----------
    10123 1 AVAILABLE I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401

  Backup set copy number 3 belongs to backup set 10071
  Device Type Elapsed Time Compression Flag
  ----------- ------------ ------------------- -------- -
  DISCO 02:06:53 2015-04-10 18:17:41 YES NSOA_BACKUP_INCR0

    Backup set 10071 A list of backup clips for copy number 3
    BP Keyword Pc # Status Segment name
    -------- --- ----------- ----------
    10152 1 AVAILABLE I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401

 

What is backup piece?
 A backup set contains one or more binary files in an RMAN-specific format. This file is known as a backup piece. A backup set can contain multiple datafiles. For example, you can back up ten datafiles into a single backup set consisting of a Single backup piece. In this case, RMAN creates one backup piece as output. The backup set contains only this backup piece.

 Then use the change command uncatalog to repeat the piece:

 

RMAN> change backuppiece 'I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401' uncatalog;
RMAN-00571: ============================================== =============
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ============================================== =============
RMAN-03002: The uncatalog command (on 04/10/2015 15:52:48) failed
RMAN-20261: A vague backup clip handle
RMAN-06092: Error finding backup clip

RMAN> change backuppiece 10123 uncatalog;
Backup fragments are not listed in the directory
Backup Segment Handle = I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401 RECID = 10123 STAMP = 876669065
Uncategorized 1 object

RMAN> change backuppiece 10152 uncatalog;
Backup fragments are not listed in the directory
Backup Clip Handle = I: \ BACKUP \ B_NSOA_10193_UHQ39J0B_20150401 RECID = 10152 STAMP = 876670068
Uncategorized 1 object

Uncatalog restore normal, but I am a bit confused, they think of the backup channel, also has the following speculation, in the face of large libraries, backup allocation of multiple channels to perform parallel backup is not a significant increase in backup efficiency? Why my backup will produce duplicate pieces, and whether there are multi-channel relationship? The following is my backup script:

Run {
    Allocate channel dev type disk;
    Allocate channel dev1 type disk;
    Allocate channel dev2 type disk;
    Backup incremental level 0 database
    Format 'I: \ BackUp \ PRACTICE \ db_% d_% s_% p_% T'
    Tag 'WHOLE_INCL0';
    Release channel dev;
    Release channel dev1;
    Release channel dev2;
}}

 Welcome to the guidance, thank you!

- The end
     
         
       
         
  More:      
 
- Kernel compile under Debian (Linux)
- Upgrading to MySQL 5.7 partitioning problem solving (Database)
- Python MySQL database connection (Database)
- Linux commands to access the cheat sheet (Linux)
- How to download video youtube-dl in Linux (Linux)
- Implement binary search algorithm in C language (Programming)
- Element content of Java HashSet change issues (Programming)
- The method of CentOS-7.0. The installation and configuration of Tomcat-7 (Server)
- Linux / proc directory Comments (Linux)
- MySQL use benchmarking tool sysbench (Database)
- SQL Server automatic backup script (Database)
- Keepalived achieve high availability Nginx Reverse Proxy (Server)
- Linux, Chrome browser font settings beautification (Linux)
- Linux Task Scheduler (at, crontab) (Linux)
- Let the terminal under Mac OS X as like Linux has displayed a variety of colors (Linux)
- Github Getting Started Basic Course (Linux)
- Java-- get the reflection object information (Programming)
- Linux more efficient than select a model epoll (Linux)
- Ubuntu disable graphics card (Linux)
- Java precision four operations (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.