实战:Oracle10.2.0.4异机迁移并升级到Oracle11.2.0.4(四)

2015-01-22 21:28:33 · 作者: · 浏览: 33
lt='FALSE' Changes will need to be made in the init.ora or spfile. ********************************************************************** SQL> spool off; SQL> create pfile='/home/oracle/pfile.ora' from spfile; SQL> alter system set sga_target=600M scope=spfile; SQL> EXECUTE dbms_stats.gather_dictionary_stats;

===根据以上检查结果,对源库进行调整;

运行 dbupgdiag.sql 脚本来检查源库的一致性
如果 dbupgdiag.sql 脚本有无效对象,则运行 utlrp.sql
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> @utlrp.sql


使无效对象有效之后,再次在数据库中重新运行 dbupgdiag.sql,然后确保一切正常。
SQL> alter tablespace system add datafile '/home/oracle/oradata/orcl/system02.dbf' size 650M;

Tablespace altered.

SQL> alter tablespace UNDOTBS1 add datafile '/home/oracle/oradata/orcl/undotbs02.dbf' size 400m;

Tablespace altered.

SQL> alter tablespace SYSAUX add datafile '/home/oracle/oradata/orcl/sysaux02.dbf' size 500m;

Tablespace altered.

SQL> alter tablespace temp add tempfile '/home/oracle/oradata/orcl/temp02.dbf' size 60m;

Tablespace altered.

SQL> alter tablespace EXAMPLE add datafile '/home/oracle/oradata/orcl/ex.dbf' size 80m;

Tablespace altered.

SQL>



######备份源库:
[oracle@ora1 bak]$ rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Dec 12 16:09:47 2014

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: ORCL (DBID=1393903281)

RMAN> backup full database format '/home/oracle/bak/full_orcl_%U';

Starting backup at 12-DEC-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=146 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/home/oracle/oradata/orcl/system02.dbf
input datafile fno=00008 name=/home/oracle/oradata/orcl/sysaux02.dbf
input datafile fno=00001 name=/home/oracle/oradata/orcl/system01.dbf
input datafile fno=00007 name=/home/oracle/oradata/orcl/undotbs02.dbf
input datafile fno=00003 name=/home/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/home/oracle/oradata/orcl/example01.dbf
input datafile fno=00009 name=/home/oracle/oradata/orcl/ex.dbf
input datafile fno=00002 name=/home/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/home/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 12-DEC-14
channel ORA_DISK_1: finished piece 1 at 12-DEC-14
piece handle=/home/oracle/bak/full_orcl_01pq07r8_1_1 tag=TAG20141212T161015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:47
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 12-DEC-14
channel ORA_DISK_1: finished piece 1 at 12-DEC-14
piece handle=/home/oracle/bak/full_orcl_02pq07sn_1_1 tag=TAG20141212T161015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 12-DEC-14

RMAN> exit


Recovery Manager complete.

[oracle@ora1 ~]$ rman target /



Recovery Manager: Release 10.2.0.4.0 - Production on Fri Dec 12 17