In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
RAC database RMAN backup machine how to restore to a single-node database, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
1. First back up the database with rman in the rac environment.
[oracle@rac1 admin] $rman target /
Run
{
Allocate channel C1 device type disk connect 'sys/welcome123@IRAC1'
Allocate channel c2 device type disk connect 'sys/welcome123@IRAC2'
Backup AS COMPRESSED BACKUPSET incremental level= 0 Database format='/u01/app/oracle/backup/full_%U_%T' tag='fullbackup'
Sql 'alter system archive log current'
Backup archivelog all tag='arc_bak' format='/u01/app/oracle/backup/arch_%U_%T' delete input
Backup current controlfile tag='bak_ctlfile' format='/u01/app/oracle/backup/ctl_file_%U_%T'
Backup spfile tag='spfile' format='/u01/app/oracle/backup/spfile_%U_%T'
Release channel c2
Release channel c1
}
The following error occurred during backup
Released channel: c1
Released channel: c2
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03009: failure of backup command on c1 channel at 08/25/2017 17:19:41
ORA-00245: control file backup failed; target is likely on a local file system
To handle this, run the following command in the RAC environment:
RMAN > show snapshot controlfile name
RMAN > CONFIGURE SNAPSHOT CONTROLFILE NAME TO'+ DATA/IRAC/CONTROLFILE/snapcf_IRAC.f'
Backup succeeded after processing.
2. Copy the rman backup of the rac environment to a stand-alone machine (note that you need to copy part of it from node 2 of the rac). And according to the rac environment pfile copy to the stand-alone machine, modify the cluster parameters, instance name, file path, sga and pga and other parameters according to the stand-alone host resources. The modifications are as follows:
* .audit_file_dest='/u01/oracle/admin/IRAC/adump'
* .audit_trail='db'
* .compatible='11.2.0.0.0'
* .control_files='/u01/oracle/oradata/IRAC/control01.dbf','/u01/oracle/oradata/IRAC/control02.dbf'
* .db_block_size=8192
* .db_create_file_dest='/u01/oracle/oradata/IRAC/'
* .db_name='IRAC'
* .db_recovery_file_dest='/u01/oracle/'
* .db_recovery_file_dest_size=4558159872
* .diagnostic_dest='/u01/oracle'
* .dispatchers=' (PROTOCOL=TCP) (SERVICE=IRACXDB)'
* .log_archive_dest_1='location=/u01/oracle/archive'
* .open_cursors=300
* .pga_aggregate_target=100m
* .processes=150
* .remote_login_passwordfile='exclusive'
* .sga_target=400m
IRAC.undo_tablespace='UNDOTBS1'
3. Start the database to nomount with pfile
Export ORACLE_SID=IRAC
[orapre@ouc backup] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Aug 27 19:06:40 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL > startup nomount pfile='/u01/backup/1.ora'
ORACLE instance started.
Total System Global Area 417546240 bytes
Fixed Size 2228944 bytes
Variable Size 134221104 bytes
Database Buffers 272629760 bytes
Redo Buffers 8466432 bytes
SQL >
4. Restore control file.
Restore controlfile from'/ u01According to backupPlacement ctlsand fileholders 18sd1hv3 / 1mm / 20170828'
[orapre@ouc backup] $rman target /
Recovery Manager: Release 11.2.0.3.0-Production on Sun Aug 27 20:48:13 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: IRAC (not mounted)
RMAN > restore controlfile from'/ u01Accord backupPlacement ctlands fileholders 18sd1hv3 cycles 1cycles 20170828'
Starting restore at 27-AUG-17
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=134 device type=DISK
Channel ORA_DISK_1: restoring control file
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Output file name=/u01/oracle/oradata/IRAC/control01.dbf
Output file name=/u01/oracle/oradata/IRAC/control02.dbf
Finished restore at 27-AUG-17
RMAN >
5. Restore data files and archives.
Alter database mount
Catalog start with'/ u01swap backup'
Run {
Allocate channel c1 device type disk
Allocate channel c2 device type disk
Set newname for datafile 1 to'/ u01qqoracle.oradataUniqIRACSystem.dbf'
Set newname for datafile 2 to'/ u01qqoracle.oradataUniqIRACA. DBF'
Set newname for datafile 3 to'/ u01qqoracle.oradataUniplicationIRACTBs1.dbf'
Set newname for datafile 4 to'/ u01qqoracleUnixoradataUniverse IRAC Universe users.dbf'
Set newname for datafile 5 to'/ u01qqoracle.oradataUniplicationIRACTBs2.dbf'
Set newname for datafile 6 to'/ u01qqoracle.dbf' oradata
Restore database
Switch datafile all
Release channel c1
Release channel c2
}
RMAN > list backup of archivelog all
List of Backup Sets
=
BS Key Size
--
35 4.81M
List of Archived Logs in backup set 35
Thrd Seq Low SCN Low Time Next SCN Next Time
-
1 41 3183645 28-AUG-17 3209549 28-AUG-17
2 30 3183649 28-AUG-17 3209517 28-AUG-17
Backup Set Copy # 1 of backup set 35
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 28-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 35 Copy # 1
BP Key Pc# Status Piece Name
-
35 1 EXPIRED / u01/app/oracle/backup/arch_14sd1hv1_1_1_20170828
Backup Set Copy # 2 of backup set 35
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 27-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 35 Copy # 2
BP Key Pc# Status Piece Name
-
44 1 AVAILABLE / u01/backup/arch_14sd1hv1_1_1_20170828
BS Key Size
--
36 1.68M
List of Archived Logs in backup set 36
Thrd Seq Low SCN Low Time Next SCN Next Time
-
1 42 3209549 28-AUG-17 3216276 28-AUG-17
2 31 3209517 28-AUG-17 3209519 28-AUG-17
Backup Set Copy # 1 of backup set 36
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 28-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 36 Copy # 1
BP Key Pc# Status Piece Name
-
36 1 EXPIRED / u01/app/oracle/backup/arch_15sd1hv2_1_1_20170828
Backup Set Copy # 2 of backup set 36
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 27-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 36 Copy # 2
BP Key Pc# Status Piece Name
-
43 1 AVAILABLE / u01/backup/arch_15sd1hv2_1_1_20170828
BS Key Size
--
37 1.85M
List of Archived Logs in backup set 37
Thrd Seq Low SCN Low Time Next SCN Next Time
-
2 32 3209656 28-AUG-17 3216272 28-AUG-17
2 33 3216272 28-AUG-17 3216288 28-AUG-17
Backup Set Copy # 1 of backup set 37
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 28-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 37 Copy # 1
BP Key Pc# Status Piece Name
-
37 1 EXPIRED / u01/app/oracle/backup/arch_16sd1hut_1_1_20170828
Backup Set Copy # 2 of backup set 37
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 27-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 37 Copy # 2
BP Key Pc# Status Piece Name
-
47 1 AVAILABLE / u01/backup/arch_16sd1hut_1_1_20170828
BS Key Size
--
38 2.00K
List of Archived Logs in backup set 38
Thrd Seq Low SCN Low Time Next SCN Next Time
-
1 43 3216276 28-AUG-17 3216284 28-AUG-17
Backup Set Copy # 1 of backup set 38
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 28-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 38 Copy # 1
BP Key Pc# Status Piece Name
-
38 1 EXPIRED / u01/app/oracle/backup/arch_17sd1hv2_1_1_20170828
Backup Set Copy # 2 of backup set 38
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:00:00 27-AUG-17 NO ARC_BAK
List of Backup Pieces for backup set 38 Copy # 2
BP Key Pc# Status Piece Name
-
42 1 AVAILABLE / u01/backup/arch_17sd1hv2_1_1_20170828
RMAN > restore archivelog sequence between 30 and 33 thread 2
RMAN > restore archivelog sequence between 41 and 43 thread 1
6. Open the database
SQL > recover database using backup controlfile until cancel
ORA-00279: change 3216190 generated at 08/28/2017 11:38:07 needed for thread 1
ORA-00289: suggestion: / u01/oracle/archive/1_42_951416315.dbf
ORA-00280: change 3216190 for thread 1 is in sequence # 42
Specify log: {= suggested | filename | AUTO | CANCEL}
AUTO
> when an error occurs in recover, the common sense open resetlogs directly
Before open resetlog, you need to rename redolog.
Alter database rename file'+ DATA/irac/onlinelog/group_2.264.951416317' to'/ u01Universe oradataRed01.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_2.265.951416317' to'/ u01Universe oradataRed02.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_1.262.951416315' to'/ u01Universe oradataRed03.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_1.263.951416317' to'/ u01Universe oradataRed04.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_3.268.951416437' to'/ u01Universe oradataRed05.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_3.269.951416439' to'/ u01Universe oradataRed06.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_4.270.951416439' to'/ u01Universe oradataRed07.dbf'
Alter database rename file'+ DATA/irac/onlinelog/group_4.271.951416439' to'/ u01Universe oradataRed08.dbf'
Alter database open resetlogs
Create temporary tablespace temp1 tempfile'/ u01/oracle/oradata/IRAC/temp1.dbf'size 20m
Alter database default temporary tablespace temp1
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.