Oracle RMAN-06023 and ORA-19693 errors

Source: Internet
Author: User

Oracle RMAN-06023 and ORA-19693 errors

When restoring a 0-level backup database to another machine, first encountered a RMAN-06023 and then encountered a ORA-19693 error, the error occurred in the environment and content is roughly as follows:
Database Version:

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 on 15:09:01
Use the target database control file to replace the recovery directory
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 device type = DISK

Channel ORA_DISK_1: restoring the control file
Channel ORA_DISK_1: restore complete, time: 00:00:08
Output file name = I: \ NSOADP \ CONTROL01.CTL
Restore completed on 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 command: SET NEWNAME

Executing command: SET NEWNAME
.........
Start restore on 15:30:19
Channel dev: restoring the data file backup set
Channel dev: Specifies the data file to be restored from the backup set
RMAN-06026: some targets are not found-Stop restore
RMAN-06023: no copy of data file 4 found to restore
RMAN-06023: no copy of data file 2 found to restore
RMAN-06023: no copy of Data File 1 found to restore

 

However, the actual 0-level backup contains the data files:

 

RMAN> list backup of datafile 4, 2, 1;
Backup set list
==============================
BS keyword Type LV Size Device type time completed
-----------------------------------------------------------------
10071 Incr 0 30.29g disk 02:46:53 13:29:12
BP Keyword: 10071 status: AVAILABLE compressed: YES Mark: NSOA_BACKUP_INCR0
Segment name: I: \ BACKUP \ B _NSOA_10193_UHQ39J0B_20150401
Data File List in backup set 10071
File LV type Ckp SCN Ckp time name
-------------------------------------------
4 0 Incr 13625590769939 10:42:20G: \ U09 \ ORADATA \ NSOA \ USERS01.DBF

BS keyword Type LV Size Device type time completed
-----------------------------------------------------------------
10072 Incr 0 29.04g disk 02:47:11 13:29:30
BP Keyword: 10072 status: AVAILABLE compressed: YES Mark: NSOA_BACKUP_INCR0
Segment name: I: \ BACKUP \ B _NSOA_10192_UGQ39J0B_20150401
Data File List in backup set 10072
File LV type Ckp SCN Ckp time name
-------------------------------------------
1 0 Incr 13625590769907 10:42:19G: \ U07 \ ORADATA \ NSOA \ SYSTEM01.DBF
2 0 Incr 13625590769907 10:42:19G: \ U08 \ ORADATA \ NSOA \ SYSAUX01.DBF

 

Therefore, it can be determined that the backup file itself is correct, and the problem lies in

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 instructions in the document, I have set the db_recovery_file_dest and db_recovery_file_dest_size parameters, restored the control file, and then pointed the catalog to the directory of my backup file during restoration:

 

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 15:09:40
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 device type = DISK
29 objects that have been cross-checked
Implicit crosscheck backup completed on 15:10:37

Start implicit crosscheck copy on 15:10:37
Use channel ORA_DISK_1
Implicit crosscheck copy completed on 15:10:37

Search all files in the recovery area
Compiling file directory...
No directory for the file

Search for all files matching style I: \ backup

List of unknown database files
============================================
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
Compiling file directory...
Directory compilation completed

 

After the directory is compiled, I verified the restore, The RMAN-06023 error is not reported, but another implicit error occurs:

 

RMAN> restore database preview;

Start restore on 15:45:41
Use channel ORA_DISK_1
Backup set list
==============================
BS keyword Type LV size
-----------------------
10072 Incr 0 29.04G
Data File List in backup set 10072
File LV type Ckp SCN Ckp time name
-------------------------------------------
1 0 Incr 13625590769907 10:42:19G: \ U07 \ ORADATA \ NSOA \ SYSTEM01.DBF
2 0 Incr 13625590769907 10:42:19G: \ U08 \ ORADATA \ NSOA \ SYSAUX01.DBF
11 0 Incr 13625590769907 10:42:19G: \ U13 \ ORADATA \ NSOA \ FRDC_TABLESPACE.DBF
15 0 Incr 13625590769907 10:42:19G: \ U10 \ ORADATA \ NSOA \ TBS_ZG.DBF
.........
Media recovery startup SCN is 13625590769793
The restoration range must be greater than SCN 13625591441474 to clear data file ambiguity.
Restore completed on 15:46:27

 

I was not aware of any errors at the time, so I started to restore, but unfortunately the 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 command: SET NEWNAME

Executing command: SET NEWNAME
.........
Channel dev: Restore 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: restore command (on 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 authentication in the restore conversation. A restore conversation may process only a single instance of a backup piece. action: Remove the specified duplicate backup piece in restore steps and restart the conversation. I am confused. How can I have duplicate backup after a good-end backup of level 0? so I used list to view the backup:


RMAN> list backup;
BS keyword Type LV size
-----------------------
10071 Incr 0 30.29G
Data File List in backup set 10071
File LV type Ckp SCN Ckp time name
-------------------------------------------
4 0 Incr 13625590769939 10:42:20G: \ U09 \ ORADATA \ NSOA \ USERS01.DBF

Backup set copy number 1 belongs to backup set 10071
Device type Compression mark after time completion time
-------------------------------------------------------
DISK 02:46:53 2015-04-01 13:29:12 YES NSOA_BACKUP_INCR0

Backup part list of backup set 10071 Copy 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 Compression mark after time completion time
-------------------------------------------------------
DISK 02:46:53 2015-04-10 18:00:58 YES NSOA_BACKUP_INCR0

Backup part list of backup set 10071 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 Compression mark after time completion time
-------------------------------------------------------
DISK 02:46:53 2015-04-10 18:17:41 YES NSOA_BACKUP_INCR0

Backup part list of backup set 10071 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 run 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: uncatalog command (on 15:52:48) failed
RMAN-20261: obscure backup clip handle
RMAN-06092: An error occurred while searching for backup clips

RMAN> change backuppiece 10123 uncatalog;
Backup segments are not included in the directory
BACKUP clip handle = I: \ BACKUP \ B _NSOA_10193_UHQ39J0B_20150401 RECID = 10123 STAMP = 876669065
Unclassified 1 Object

RMAN> change backuppiece 10152 uncatalog;
Backup segments are not included in the directory
BACKUP clip handle = I: \ BACKUP \ B _NSOA_10193_UHQ39J0B_20150401 RECID = 10152 STAMP = 876670068
Unclassified 1 Object

Uncatalog is restored to normal, but I am confused. I think of the backup channel problem, and I guess that in the face of large databases, does it significantly improve the backup efficiency by allocating multiple channels for parallel backup? Why does my backup generate duplicate pieces? Is it related to multiple channels? 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;
}

Thank you for your guidance!

-- The end

Related Article

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.