Oracle Pre-upgrade backup and failed fallback

Source: Internet
Author: User

One, pre-upgrade backup 1. Software backup
[Email protected] backup]# su-oracle

[email protected] ~]$ CD $ORACLE _home
[Email protected] db_1]$ pwd
/db/oracle/oracle/product/10.2.0/db_1
[Email protected] db_1]$ tar-cvzf ora_home.tar.gz.

Software upgrade is mainly to oracle_home under the file modification, first to the tar package.

2. Data file backup
The files that need to be backed up are mainly SPFile, Controlfile, datafile, and if you are taking a cold backup way direct CP, back up the directory where the data files are located, and if it is hot standby, You need to back up the Controlfile and datafile and the archivelog that are not fully logged in the control of the backup.
Rman> run{
2> Allocate channel Disk1 type disk;
3> Delete obsolete;
4> crosscheck Backup;
5> Delete expired backup;
6> Backup Database format '/backup/db_%d_%t_%s '
7> plus archivelog Delete all input format '/backup/arch_%d_%t_%s ';
8> Backup current controlfile format '/backup/ctl_%d_%t_%s ';
9> release channel Disk1;
10>}
These are the full backup scripts that you often use.

Next normal shut down the database, at this time the buffer cache data is all sync to disk, the next can be assured that the upgrade!
rman> shutdown immediate;
Before upgrading the software, please close all processes that use the objects under Oracle_home, otherwise you may not be able to patch correctly.
You can also use the restore Point feature in Oracle 10R2 to upgrade, because the production library generally does not open flashback database.
Sql>shutdown immediate;
Sql>startup Mount;
sql>create restore point upgrade guarantee Flashback database;
A restore point upgrade is created here, and then if the upgrade fails it can be returned directly, so there is no need to back up the data files and control files, the restore point is recorded in the control file, and then the corresponding record changes are recorded in the Flash zone, It is therefore necessary to ensure that the flash recovery area is large enough to save time relative to the Rman recovery (no restore data files are required).

Ii. fallback process (to 11.2.0.2)
1. Turn off instances of all RAC nodes
2. Shut down the DB instance on all nodes and start the database in Mount mode on one node to flash back.
$ sqlplus/as SYSDBA
sql> startup Mount;
sql> SELECT NAME, SCN, Time, database_incarnation#, Guarantee_flashback_database, storage_size from V$restore_ Point WHERE guarantee_flashback_database= ' YES ';
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------- --- ------------
NAME SCN Time Database_ incarnation# GUA Storage_size
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------- --- -----------
Upgrade_rollback 1227989 31-mar-12 10.21.06.000000000 AM 1 YES 910868480

sql> Flashback database to restore point upgrade_rollback;
Flashback complete.

sql> ALTER DATABASE open resetlogs;
Database altered.

Oracle Pre-upgrade backup and failed fallback

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.