In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to restore RAC from a database to a single instance. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's follow the editor to have a look.
Backup software: HP-DP
Original library: production RAC 2 nodes, IP:192.168.160.2 and 192.168.160.3
Target library: single instance library, IP:192.168.160.129
0. Prepare the environment
Configure the listening of the target server so that the backup server can be linked to the target server.
1. Restore control file
For backup software recovery control files, they are restored directly to the os of the target server, usually in the var directory.
Log in to the backup server, click on the DP software, select RESTORE, and find the backup of the original library. Then select "CONTROL FILE FROM DP MANAGED BACKUP" in SOURCE, and configure in OPTIONS: the target server for Clinet= recovery, user name=oracle (the os user of the target server's oracle software), User group=oinstall,Restore mode=Normal,Restore unitl=selected time, which I chose here is 20131227 22: 00:00. Configure the sys password and service_name of the target server in Settings. Then click restore. Then go to the target server (160.129) under / var/opt/omni/tmp/ to find the newly generated control file.
Note: Client, you need to select the alias corresponding to 192.168.160.129 configured in the backup server. The alias here is usually the host name.
two。 Restore spfile
Now there is a control file, in fact, we can create a parameter file ourselves, but if we want to restore it, it is also possible. First, create your own parameter file, or directly startup nomount force is fine. Then restore the control file, boot to mount, and then restore spfile as follows:
SQL > startup nomount force
RMAN > restore controlfile from'/ var/opt/omni/tmp/ctrl_ORCLDB.dbf'
RMAN > alter database mount
RMAN > run {
Allocate channel 'dev_0' type' sbt_tape'
Parms' SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV= (OB2BARTYPE=Oracle8,OB2APPNAME=mubiao_dbname,OB2BARLIST=mubiao_dbname)'
Send device type 'sbt_tape'' OB2BARHOSTNAME=yuanku_hostname'
Restore spfile to'/ home/orazkf/spfileORCL1.ora' from autobackup
Release channel 'dev_0'
}
Released channel: ORA_DISK_1
Allocated channel: dev_0
Channel dev_0: SID=893 instance=ORCL1 device type=SBT_TAPE
Channel dev_0: Data Protector A.06.20/PHSS_42081/DPSOL_00448/DPLNX_00154
Sent command to channel: dev_0
Starting restore at 07-JAN-14
Channel dev_0: looking for AUTOBACKUP on day: 20140107
Channel dev_0: AUTOBACKUP found: C Murray 3400117082-20140107-00
Channel dev_0: restoring spfile from AUTOBACKUP cmur3400117082-20140107-00
Channel dev_0: SPFILE restore from AUTOBACKUP complete
Finished restore at 07-JAN-14
Released channel: dev_0
You can now start the database to the mount state with the recovered spfile and control files. However, it should be noted that you need to modify the archive directory, dump directory, and so on.
3. Restore data files
For the recovery from rac to single instance, it is necessary to do set newname, because the data files of rac exist in the disk group, but they are all in fs.
RMAN > run {
Allocate channel 'dev_0' type' sbt_tape'
Parms' SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV= (OB2BARTYPE=Oracle8,OB2APPNAME=mubiao_dbname,OB2BARLIST=mubiao_dbname)'
Send device type 'sbt_tape'' OB2BARHOSTNAME=yuanku_hostname'
Set newname for datafile 1 to'/ pmsdb/oradata/ORCL1/data1/system.345.760169914'
Set newname for datafile 2 to'/ pmsdb/oradata/ORCL1/data1/sysaux.564.760187953'
Set newname for datafile 3 to'/ pmsdb/oradata/ORCL1/data1/undotbs1.124.760889985'
Set newname for datafile 4 to'/ pmsdb/oradata/ORCL1/data1/undotbs2.456.760990001'
Set newname for datafile 5 to'/ pmsdb/oradata/ORCL1/data1/users.167.760190409'
Set newname for datafile 6 to'/ pmsdb/oradata/ORCL1/data1/undotbs1.281.760310569'
Set newname for datafile 7 to'/ pmsdb/oradata/ORCL1/data1/undotbs2.282.760110751'
Set newname for datafile 24 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata101.dbf'
Set newname for datafile 25 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata102.dbf'
Set newname for datafile 26 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata103.dbf'
Set newname for datafile 27 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata104.dbf'
Set newname for datafile 28 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata105.dbf'
Set newname for datafile 29 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata106.dbf'
Set newname for datafile 30 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata107.dbf'
Set newname for datafile 31 to'/ pmsdb/oradata/ORCL1/data1/ORCLrddata108.dbf'
Set newname for datafile 32 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex101.dbf'
Set newname for datafile 33 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex102.dbf'
Set newname for datafile 34 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex103.dbf'
Set newname for datafile 35 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex104.dbf'
Set newname for datafile 36 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex105.dbf'
Set newname for datafile 37 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex106.dbf'
Set newname for datafile 38 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex107.dbf'
Set newname for datafile 39 to'/ pmsdb/oradata/ORCL1/data1/ORCLrdindex108.dbf'
Restore database
Switch datafile all
Release channel 'dev_0'
}
Wait quietly for a long time, and finally recover successfully.
4. Restore archived fil
RMAN > run {
Allocate channel 'dev_0' type' sbt_tape'
Parms' SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV= (OB2BARTYPE=Oracle8,OB2APPNAME=ORCL1,OB2BARLIST=ORCL1)'
Send device type 'sbt_tape'' OB2BARHOSTNAME=yuanku_hostname'
Restore archivelog time between "to_date" ('2013-12-27 22 HH24:MI:SS' HH24:MI:SS') "and" to_date (' 2013-12-27 22 HH24:MI:SS' 30-mm HH24:MI:SS') "
Release channel 'dev_0'
}
Since I have set up a new archive directory before, after the recovery archive is complete, check under my archive directory and you will find several archive files.
5 execute recover
RMAN > recover database
6 execute open resetlogs
Before that, you need to set the size of the flashback recovery area, because at this time oracle may put the new onlinelog in your flashback recovery area, so you need to set the right size before you can start successfully.
This is how RAC recovers from a database to a single instance. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.