Use RMAN to downgrade ORACLE10G64 to 32-bit _ MySQL

Source: Internet
Author: User
Use RMAN to downgrade ORACLE10G64 bit to 32-bit ORACLE RMAN

BitsCN.com

Use RMAN to downgrade ORACLE 10G 64-bit to 32-bit

Because the project needs to test the environment, the original database is ORACLE 10.2.0.4 64-bit, and the environment needs to be migrated to a 32-bit machine. There are many articles on the Internet that upgrade 32-bit to 64-bit, in fact, the 64-bit downgrade is similar to the 32-bit downgrade, and the data dictionary changes. you can use the cold backup RMAN and other methods for migration. This article uses RMAN for migration. For more information about RMAN backup, see other articles.

The procedure is as follows.

1. stop delete all input in the RMAN script one day before migration to stop deleting Archived log files.

2. use V $ LOG to determine the current LOG serial number before full backup.

3. create a directory on the current server to save the RMAN backup file.

4. use the RMAN full backup script to complete the RMAN backup and specify the directory to the new directory. At the same time, the RMAN backup log is saved to determine the backup part of the backup set where the ORACLE control file is located.

5. use create pfile from spfile in the original database to update PFILE.

6. create a database on the target server. the database name is the same as that of the original database.

7. after creation, all data files, log files, control files, and spfiles are deleted.

8. create a directory on the target server, which is the same as the directory on the original server.

9. transmit all backup sets to the directory created on the target server through FTP.

10. modify the PFILE of the database on the target server, which must be the same as the PFILE of the original database.

11. start the database to the NOMOUNT status.

12. create a directory on the target server to store the recovered control file. for details, refer to the configuration in PFILE.

13. restore the control file.

14. start the database to the MOUNT status.

15. create a directory on the target server to store database files, and create an archive directory to store Archived logs,

Create various TRACE file directories at the same time.

16. use RESOTRE to restore data files.

The preparation is complete. the following steps are the steps for data recovery.

17. extract the object information of the original database to facilitate comparison after migration.

18. close the application and make sure no new data will be written to the database.

19. perform multiple log switching to ensure that all changed data has been written to the archive log. if there are three log files, perform four switching.

20. check the V $ LOG in the original database to determine the current LOG sequence and determine the archive LOG files to be copied. for the sake of security, you can obtain more logs before the earliest archive.

21. copy the archived logs of the original server to the corresponding directory of the target server through FTP.

22. use recover database until for restoration.

23. use alter database open resetlogs to OPEN the DATABASE.

24. run the shutdown immediate command to shut down the database.

25. run the startup migrate command to start the database.

26. run the script utlirp. SQL.

27. use the command shutdown immediate to shut down the database.

28. run the STARTUP command to start the database.

29. run the script utlrp. SQL.

30. use the command shutdown immediate to shut down the database.

31. run the STARTUP command to start the database.

32. extract the object information of the database and compare it with the object information of the original database.

Now the data migration is complete.

Create a directory and copy all the backups to the same directory as the original database. my files are/u01/app/oracle/backup.

[Root @ itspf ~] # Su-oracle [oracle @ itspf ~] $ Cd/u01/app/oracle/[oracle @ itspf oracle] $ lsoraInventory product [oracle @ itspf oracle] $ mkdir admin [oracle @ itspf oracle] $ lsadmin oraInventory product [oracle @ itspf oracle] $ mkdir flash_recovery_area [oracle @ itspf oracle] $ mkdir archivelog [oracle @ itspf oracle] $ mkdir backup [oracle @ itspf oracle] $ mkdir oradata [oracle @ itspf oracle] $ cd admin [oracle @ itspf admin] $ mkdir itspfdb [oracle @ itspf admin] $ cd I Tspfdb/[oracle @ itspf itspfdb] $ mkdir adump [oracle @ itspf itspfdb] $ mkdir bdump [oracle @ itspf itspfdb] $ mkdir cdump [oracle @ itspf itspfdb] $ mkdir dpdump [oracle @ itspf itspfdb] $ mkdir pfile [oracle @ itspf itspfdb] $ mkdir udump [oracle @ itspf itspfdb] $ cd .. [oracle @ itspf admin] $ cd .. [oracle @ itspf oracle] $ cd oraoradata/oraInventory/[oracle @ itspf oracle] $ cd oradata/[oracle @ itspf oradata] $ mkdir itspfdb Source Database Copy a PFLIE to the new database SQL> startup mount from pfile = '/soft/pfile20130710.ora' ORACLE instance started. total System Global Area 1019215872 bytesFixed Size 1271252 bytesVariable Size 616565292 bytesDatabase Buffers 394264576 bytesRedo Buffers 7114752 bytesORA-02231: missing or invalid option to alter database [root @ itspf ~] # Su-oracleSQL> startup nomount pfile = '/soft/pfile20130710.ora'; SQL> create spfile = '/u01/app/oracle/product/10.2.0/db_1/dbs/spfileitspfdb. ora 'from pfile = '/soft/pfile20130710.ora '; -- you can also use RMAN to restore the parameter file backup RMAN> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/inititspfdb. ora 'from'/u01/app/oracle/backup/c-4014947212-20130919-01 '; -- restore control file [oracle @ itspf ~] $ Rman target/Recovery Manager: Release 10.2.0.4.0-Production on Thu Sep 26 00:43:08 2013 Copyright (c) 1982,200 7, Oracle. all rights reserved. connected to target database: itspfdb (not mounted) RMAN> restore controlfile from '/u01/app/oracle/backup/c-4014947212-20130919-01'; RMAN> exitRecovery Manager complete. -- restore the database [oracle @ itspf ~] $ Rman target/Recovery Manager: Release 10.2.0.4.0-Production on Thu Sep 26 02:09:44 2013 Copyright (c) 1982,200 7, Oracle. all rights reserved. connected to target database: itspfdb (not mounted) RMAN> alter database mount; RMAN> restore database -- restore the database. SQL> startup mount; -- several archive files may be required. you can copy the archive files backed up on the day of the original database and select AUTOSQL> recover database using BACKUP CONTROLFILE until cancel; SQL> alter database open resetlogs; SQL> shutdown immediate -- SQL> Shutdown immediateSQL> startup migrateSQL> @ $ ORACLE_HOME/rdbms/admin/utlirp. SQL; SQL> Shutdown immediateSQL> StartupSQL> @ $ ORACLE_HOME/rdbms/admin/utlrp. SQL; SQL> Shutdown immediateSQL> Startup


BitsCN.com

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.