Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Copy Recovery using RMAN repository development environment     - Varnish achieve page jump (Server)

- Glibc support encryption by modifying the DNS (Programming)

- How to fix Ubuntu / Mint can not add PPA source of error (Linux)

- Jump table (skiplist) of code (Programming)

- Remove old kernel on Ubuntu (Linux)

- Installation and configuration under Linux SVN server - Backup - Recovery - Scheduled Tasks (Server)

- Comparison of Nginx and Nginx + (Server)

- Debian (Wheezy) were installed wxPython GUI development (Linux)

- Ubuntu way of decompressing files (Linux)

- How to migrate MySQL to MariaDB under linux (Database)

- Camouflage Nginx Web server version to prevent invasion (Linux)

- Archlinux installation tutorial (Linux)

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

- 15 things to do after installing Ubuntu 15.04 Desktop (Linux)

- CentOS 6.5 installation configuration DRBD (Server)

- Let CentOS perform PPPoE dial-up, ADSL can be used in a network environment! (Linux)

- Linux host dual LAN transceiver package ARP problem (Linux)

- How x2g0 install Remote Desktop on Linux VPS (Server)

- Let's Encrypt with semiautomatic into Nginx configuration https (Server)

- SELinux security permissions HTTP + PHP service changes (Server)

 
         
  Copy Recovery using RMAN repository development environment
     
  Add Date : 2018-11-21      
         
         
         
  Recent development in order not to affect the use of the library, intended to create a backup copy library, updated regularly, to prevent the development of the case can not use the library, you can temporarily use the standby database does not affect the progress.

Environment:
11.2.0.4 single-instance database.
Bank 1 is the source library (target), Library 2 is prepared by the library (auxiliary)

Operating procedure:

1. Library 1 performs a full database backup

[Oracle @ testvm002 duplicate] $ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Feb 1 16:57:06 2016

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

connected to target database: DEP (DBID = 1501218369)

RMAN> run {
2> allocate channel dup type disk;
3> backup format '/ home / oracle / duplicate / df_t% t_s% s_p% p' database;
4> sql 'alter system archive log current';
5> backup format '/ home / oracle / duplicate / al_t% t_s% s_p% p' archivelog all delete input;
6> release channel dup;
7>}

using target database control file instead of recovery catalog
allocated channel: dup
channel dup: SID = 24 device type = DISK

Starting backup at 01-FEB-16
channel dup: starting full datafile backup set
channel dup: specifying datafile (s) in backup set
input datafile file number = 00002 name = / u01 / app / oracle / 11.2.0.4 / oradata / dep / sysaux01.dbf
input datafile file number = 00005 name = / u01 / app / oracle / 11.2.0.4 / oradata / dep / dep_tbs01.dbf
input datafile file number = 00001 name = / u01 / app / oracle / 11.2.0.4 / oradata / dep / system01.dbf
input datafile file number = 00003 name = / u01 / app / oracle / 11.2.0.4 / oradata / dep / undotbs01.dbf
input datafile file number = 00004 name = / u01 / app / oracle / 11.2.0.4 / oradata / dep / users01.dbf
channel dup: starting piece 1 at 01-FEB-16
channel dup: finished piece 1 at 01-FEB-16
piece handle = / home / oracle / duplicate / df_t902681834_s10_p1 tag = TAG20160201T165714 comment = NONE
channel dup: backup set complete, elapsed time: 00:00:36
channel dup: starting full datafile backup set
channel dup: specifying datafile (s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel dup: starting piece 1 at 01-FEB-16
channel dup: finished piece 1 at 01-FEB-16
piece handle = / home / oracle / duplicate / df_t902681870_s11_p1 tag = TAG20160201T165714 comment = NONE
channel dup: backup set complete, elapsed time: 00:00:01
Finished backup at 01-FEB-16

sql statement: alter system archive log current

Starting backup at 01-FEB-16
current log archived
channel dup: starting archived log backup set
channel dup: specifying archived log (s) in backup set
input archived log thread = 1 sequence = 743 RECID = 13 STAMP = 902681873
input archived log thread = 1 sequence = 744 RECID = 14 STAMP = 902681874
channel dup: starting piece 1 at 01-FEB-16
channel dup: finished piece 1 at 01-FEB-16
piece handle = / home / oracle / duplicate / al_t902681874_s12_p1 tag = TAG20160201T165754 comment = NONE
channel dup: backup set complete, elapsed time: 00:00:01
channel dup: deleting archived log (s)
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_743_cby7jklq_.arc RECID = 13 STAMP = 902681873
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_744_cby7jl4s_.arc RECID = 14 STAMP = 902681874
Finished backup at 01-FEB-16

released channel: dup
2. Library 1 backup control file

SQL> alter database backup controlfile to '/home/oracle/duplicate/control.ctl';

Database altered.
3. The backup set (1) copy to the library the same path 2, ie, / home / oracle / duplicate, this time produced three documents:

al_t902681874_s12_p1
df_t902681834_s10_p1
df_t902681870_s11_p1
4. Copy the file vault inittest.ora parameter 1 to 2 library, and follow the path to the configuration of the control files, control files (2) can be directly copy the library 1 to 2 lower reservoir corresponding path, including the file name and the need to maintain profile consistent with the general definition:

* .control_files = '/ U01 / app / oracle / 11.2.0.4 / oradata / test / control01.ctl', '/ u01 / app / oracle / 11.2.0.4 / fast_recovery_area / test / control02.ctl'
Create a folder:

/u01/app/oracle/11.2.0.4/oradata/test
/u01/app/oracle/11.2.0.4/fast_recovery_area/test
/u01/app/oracle/11.2.0.4/admin/adump(/bdump/cdump/dpdump/udump)
5. 2 Start nomount state library

SQL> startup nomount pfile = '/ u01 / app / oracle / 11.2.0.4 / dbhome_1 / dbs / initdep.ora';
ORACLE instance started.

Total System Global Area 1620115456 bytes
Fixed Size 2253704 bytes
Variable Size 922750072 bytes
Database Buffers 687865856 bytes
Redo Buffers 7245824 bytes
6. Library 2 to perform a recovery

[Oracle @ testvm001 dbs] $ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Feb 1 17:10:21 2016

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

connected to target database: DEP (not mounted)

RMAN> restore database;

Starting restore at 01-FEB-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 10 device type = DISK
RMAN-00571: ============================================== ====
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ======
RMAN-00571: ============================================== ====
RMAN-03002: failure of restore command at 02/01/2016 17:10:28
ORA-01507: database not mounted
Error prompt database needs to be set to mount state.

7. Library 2 is set to mount state

SQL> alter database mount;

Database altered.
8. Library 2 to perform a recovery

RMAN> restore database;

Starting restore at 01-FEB-16
released channel: ORA_DISK_1
Starting implicit crosscheck backup at 01-FEB-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 10 device type = DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 01-FEB-16

Starting implicit crosscheck copy at 01-FEB-16
using channel ORA_DISK_1
Crosschecked 6 objects
Finished implicit crosscheck copy at 01-FEB-16

searching for all files in the recovery area
cataloging files ...
no files cataloged

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/11.2.0.4/oradata/dep/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/11.2.0.4/oradata/dep/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/11.2.0.4/oradata/dep/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/11.2.0.4/oradata/dep/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/11.2.0.4/oradata/dep/dep_tbs01.dbf
channel ORA_DISK_1: reading from backup piece / home / oracle / duplicate / df_t902681834_s10_p1
channel ORA_DISK_1: piece handle = / home / oracle / duplicate / df_t902681834_s10_p1 tag = TAG20160201T165714
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 01-FEB-16
9. 2 Run Open Library

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
Error prompt need to use RESETLOGS or NORESETLOGS.

10. The implementation of open library 2

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/11.2.0.4/oradata/dep/system01.dbf'
Still being given, suggesting:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/11.2.0.4/oradata/dep/system01.dbf'

View both the error:

[Oracle @ testvm001 dbs] $ oerr ora 1152 01152, 00000, "file% s was
not restored from a sufficiently old backup "
* Cause: An incomplete recovery session was started, but an
insufficient number of logs were applied to make the database
consistent. This file is still in the future of the last log applied.
The most likely cause of this error is forgetting to restore the file
from a backup before doing incomplete recovery.
* Action: Either apply more logs until the database is consistent or> restore the database file from an older backup and repeat
recovery.

[Oracle @ testvm001 dbs] $ oerr ora 1110 01110, 00000, "data file% s: '% s'"
* Cause: Reporting file name for details of another error.
The reported name can be of the old file if a data file
move operation is in progress.
* Action: See associated error message.

11. 2 Run recover Library

RMAN> recover database;

Starting recover at 01-FEB-16
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread = 1 sequence = 743
channel ORA_DISK_1: restoring archived log
archived log thread = 1 sequence = 744
channel ORA_DISK_1: reading from backup piece / home / oracle / duplicate / al_t902681874_s12_p1
channel ORA_DISK_1: piece handle = / home / oracle / duplicate / al_t902681874_s12_p1 tag = TAG20160201T165754
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_743_cby8pbbf_.arc thread = 1 sequence = 743
channel default: deleting archived log (s)
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_743_cby8pbbf_.arc RECID = 16 STAMP = 902683082
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_744_cby8pbc5_.arc thread = 1 sequence = 744
channel default: deleting archived log (s)
archived log file name = / u01 / app / oracle / 11.2.0.4 / fast_recovery_area / DEP / archivelog / 2016_02_01 / o1_mf_1_744_cby8pbc5_.arc RECID = 15 STAMP = 902683082
unable to find archived log
archived log thread = 1 sequence = 745
RMAN-00571: ============================================== =============
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ============================================== =============
RMAN-03002: failure of recover command at 02/01/2016 17:18:03
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 745 and starting SCN of 14019269
Tip number required sequence = 745 archivelog

12. Review the centralized backup archive al_t902681874_s12_p1 the sequence is 12.

13. The implementation of recovery again

RMAN> run {
2> allocate channel ch00 type disk;
3> set until sequence 13 thread 1;
4> recover database;
5> release channel ch00;
6>}

released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: SID = 10 device type = DISK

executing command: SET until clause

Starting recover at 01-FEB-16

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 01-FEB-16

released channel: ch00
Corresponding to the alert log:

ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Starting background process QMNC
Mon Feb 01 17:22:33 2016
QMNC started with pid = 27, OS id = 4154
LOGSTDBY: Validating controlfile with logical metadata
LOGSTDBY: Validation complete
14. Open Library 2

SQL> alter database open resetlogs;

Database altered.
Corresponding to the alert log:

Completed: alter database open resetlogs
Mon Feb 01 17:22:35 2016
db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon Feb 01 17:22:35 2016
Starting background process CJQ0
Mon Feb 01 17:22:35 2016
CJQ0 started with pid = 28, OS id = 4168
Exactly the same information and library 1 2 15. Log database, users, objects, and so on.

To sum up:
1.RMAN need to perform restore the database in mount state.
2. The first target of control can copy the control file to the same path auxiliary library, you need to pay attention to controlling the file path and other file parameters defined in the file folders are created in advance in the auxiliary library, if the advance control files are copied to auxiliary library under the corresponding path, you do not need to restore control, it is equivalent to not have done this operation.
3.resetlogs tips ORA1152 wrong, we need to restore the corresponding archived log, according to projections seq number copied archive log file name.
     
         
         
         
  More:      
 
- Linux platform to prevent hackers to share practical skills (Linux)
- C # Future: Method Contract (Programming)
- Redhat 5 prohibit IPv6 (Linux)
- Ubuntu 12.04 installation NVIDIA GTX750 graphics driver (Linux)
- Use Ganglia to monitor your cluster (Server)
- Grep how to find files based on file contents in UNIX (Linux)
- Mutt - an email client that sends messages through the terminal (Linux)
- Squid proxy server (Server)
- Linux FAQ - How to fix tar:Exitingwith failure status due to previous errors (Linux)
- Linux, security encryption to transfer files between machines (Linux)
- Ubuntu 14.04 / 14.10 how to install FFmpeg 2.5.1 (Linux)
- Git Getting Started tutorial (Linux)
- Java memory area and memory overflow exception (Programming)
- Use XtraBackup be physical standby database MySQL (Database)
- Oracle 12C RAC optimizer_adaptive_features cause of data into overtime (Database)
- Vim Common Command Summary (Linux)
- The Rabbitmq installation under CentOS 6.4 (Linux)
- CentOS 7 Add yum source (Linux)
- ntop monitoring software configuration and installation (Linux)
- Method under Linux GCC Compiler shared library function export control (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.