Migrating from Oracle9i Rman full library to oracle10g

Source: Internet
Author: User
Tags deprecated sqlplus


1. Create the following directory:
MKDIR-PV $ORACLE _base/admin/$ORACLE _sid/{{a,b,c,dp,u}dump,pfile}
MKDIR-PV $ORACLE _base/flash_recovery_area

2. Create a oracle10g Init$oracle_sid.ora
dbinfo.__db_cache_size=339738624
dbinfo.__java_pool_size=4194304
dbinfo.__large_pool_size=4194304
dbinfo.__shared_pool_size=243269632
Dbinfo.__streams_pool_size=0
*.aq_tm_processes=0
*.audit_file_dest= '/home/oracle10/admin/dbinfo/adump '
*.background_dump_dest= '/home/oracle10/admin/dbinfo/bdump '
*.compatible= ' 10.2.0.1.0 '
*.control_files= '/home/oracle10/oradata/dbinfo/control01.ctl ', '/home/oracle10/oradata/dbinfo/control02.ctl ', '/ Home/oracle10/oradata/dbinfo/control03.ctl '
*.core_dump_dest= '/home/oracle10/admin/dbinfo/cdump '
*.db_block_size=8192
*.db_domain= "
*.db_file_multiblock_read_count=16
*.db_name= ' Dbinfo '
*.db_recovery_file_dest= '/home/oracle10/flash_recovery_area '
*.db_recovery_file_dest_size=2147483648
*.dispatchers= ' (protocol=tcp) (SERVICE=DBINFOXDB) '
*.job_queue_processes=0
*.open_cursors=300
*.pga_aggregate_target=199229440
*.processes=150
*.remote_login_passwordfile= ' EXCLUSIVE '
*.sga_target=598736896
*.undo_management= ' AUTO '
*.undo_tablespace= ' UNDOTBS1 '
*.user_dump_dest= '/home/oracle10/admin/dbinfo/udump '

3. Restore the control file:
Rman Target/
Startup Nomount;
Restore Controlfile from ' $BAKDIR/controlfile_bak_20150624_dbinfo ';
ALTER DATABASE Mount;

The following error occurred:
Ora-19905:log_archive_format must contain%s,%t and%r
Ora-32004:obsolete and/or deprecated parameter (s) specified. (The deprecated parameters are said to be used.)
Workaround:
Oracle9i Init$oracle_sid.ora cannot be used directly in oracle10g. Must use ORACLE10G's Init$oracle_sid.ora
The template posted above is the Init$sid.ora template for oracle10g.

4. Recover Archived log files:
Crosscheck Archivelog All;
Crosscheck backup of Archivelog all;
#此步骤是删除源主机上归档存储的信息 so that the archive can be recovered from the Rman backup file to the newly specified location on the target machine.
Delete Expired Archivelog all;
Restore Archivelog from sequence=4260;

The following error occurred:
Ora-19870:error Reading Backup Piece/orabackup/archivelog_back_20150731_dbinfo
Ora-19809:limit exceeded for recovery files
Ora-19804:cannot Reclaim 22348234 bytes disk space from 23487289 limit
Workaround:
Make sure that the directory specified by "Db_recovery_file_dest" inside the Init$oracle_sid.ora exists.
And the size of "db_recovery_file_dest_size" is sufficient to restore the archive log.

5. Recover Data files:
Rman Target/
Rman> Run {
Allocate channel A1 type disk;
Allocate channel A2 type disk;
Set newname for datafile 1 to '/oracle/oradata/dbinfo/1024m_system01.dbf ';
Set newname for datafile 2 to '/oracle/oradata/dbinfo/8192m_undotbs01.dbf ';
Set newname for DataFile 3 to '/oracle/oradata/dbinfo/256m_users01.dbf ';
Set newname for datafile 4 to '/oracle/oradata/dbinfo/256m_tools01.dbf ';
Set newname for datafile 5 to '/oracle/oradata/dbinfo/256m_perf.dbf ';
Set newname for datafile 6 to '/oracle/oradata/dbinfo/app_data01.dbf ';
Set newname for datafile 7 to '/oracle/oradata/dbinfo/app_data02.dbf ';
Set newname for datafile 8 to '/oracle/oradata/dbinfo/app_data03.dbf ';
Set newname for DataFile 9 to '/oracle/oradata/dbinfo/app_index01.dbf ';
Set newname for datafile '/oracle/oradata/dbinfo/indx01.dbf ';
Restore database; This is the recovery data file directly from the default Rman backup path.
Release channel A1;
Release channel A2;
}

The following error occurred:
ORA-01180: Unable to create data file 1
ORA-01110: Data file 1: '/HOME/ORACLE/ORABASE/ORADATA/ORACLE/SYSTEM01.DBF '
Workaround:
Crosscheck backupset; #检查过期 or an invalid backup set.
Delete expired backup; #删除过期的备份集.
Another note:
This ancestor encountered a workaround for this issue:
He was re-registering the backup set through catalog to make it work: http://www.linuxidc.com/Linux/2014-08/104999.htm


6. Restore Redo log:
Rman Target/
Rman> Run {
Allocate channel A1 type disk;
Allocate channel A2 type disk;
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo11_256m" to "/oracle/oradata/dbinfo/256m_redo11.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo12_256m" to "/oracle/oradata/dbinfo/256m_redo12.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo21_256m" to "/oracle/oradata/dbinfo/256m_redo21.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo22_256m" to "/oracle/oradata/dbinfo/256m_redo22.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo31_256m" to "/oracle/oradata/dbinfo/256m_redo31.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo32_256m" to "/oracle/oradata/dbinfo/256m_redo32.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo41_256m" to "/oracle/oradata/dbinfo/256m_redo41.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo42_256m" to "/oracle/oradata/dbinfo/256m_redo42.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo51_256m" to "/oracle/oradata/dbinfo/256m_redo51.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo52_256m" to "/oracle/oradata/dbinfo/256m_redo52.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo61_256m" to "/oracle/oradata/dbinfo/256m_redo61.log";
SQL "ALTER DATABASE rename file '/dev/dbinfo/lv_redo62_256m" to "/oracle/oradata/dbinfo/256m_redo62.log";
Switch datafile all;
Release channel A1;
Release channel A2;
}

7. Perform database recovery:
Rman Target/
Recover database;

The following error occurred, which can be ignored:
Rman-03002:failure of recover command at 06/24/2015 16:02:25
Rman-06054:media recovery requesting unknown Log:thread 1 SCN 277200603

Sqlplus/as SYSDBA
ALTER DATABASE open resetlogs;

After this command is executed, Oracle exits with an error and prompts in alter log to require the use of upgrade to start.

8. Start the database upgrade.
Sqlplus/as SYSDBA
Startup upgrade

1. After successfully entering Oracle, the first step is to create the system secondary table space first.
Create tablespace sysaux datafile '/home/oracle/oradata/dbinfo/sysaux01.dbf '
Size 100M Reuse
Extent Management Local
Segment Space Management Auto
Online

2. Increase the temporal table space appropriately
Alter Tablespace TEMP addTempfile'/home/oracle/oradata/dbinfo/temp_200m.dbf ' size 200M;

3. It is recommended to turn off the archive mode, on the one hand to speed up, on the other hand to avoid the following hung.
ALTER DATABASE Noarchivelog;
Archive log list;

4. Modify the shared pool and Java pool size.
Shutdown immediate
Startup Nomount
Create SPFile from Pfile;
ALTER SYSTEM SET shared_pool_size= ' 150M ' scope=spfile;
ALTER SYSTEM SET java_pool_size= ' 150M ' scope=spfile;
Shutdown immediate
Startup upgrade

5. Upgrade the data dictionary:
Sql> Spool Updict.log
sql> @ $ORACLE _home/rdbms/admin/catupgrd.sql
Sql> Spool Off
sql> shutdown Immediate

6. Compile the invalid Application object:
Sql> Startup
sql> @ $ORACLE _home/rdbms/admin/utlrp.sql
Sql> Set pagesize 100
Sql> Set Linesize 200
Sql> Col comp_id for A15
Sql> col status for A10
Sql> Col version for A20
#检查组件的版本是否都已经成功升级到10g:
Sql> select Comp_id,status,version from Dba_registry;
#检查是否存在无效对象 (no output, for normal.):
Sql> SELECT * from dba_objects where owner= ' Gistar ' and status= ' INVALID ';
#以SYSDBA身份登录上, execute the authorization script:
Sql> Grant Select on Sys.v_$session to public;

Sql> @?/rdbms/admin/utlrp.sql
#最后检查:
Sql> select * from V$option;

Migrating from Oracle9i Rman full library to oracle10g

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.