RMAN同字节序跨平台跨版本迁移数据库(四)

2015-04-07 14:09:44 · 作者: · 浏览: 97
LRKG2_.DBF
-rwxrwxrwx 1 oracle oinstall 503324672 Mar 31 16:20 O1_MF_SYSTEM_BKLLOT8Z_.DBF
-rwxrwxrwx 1 oracle oinstall? 52436992 Mar 31 16:21 TSPITR01.DBF
-rwxrwxrwx 1 oracle oinstall? 52436992 Mar 31 16:21 TEST01.DBF
-rwxrwxrwx 1 oracle oinstall? 31465472 Mar 31 16:22 O1_MF_UNDOTBS1_BKLLOTM0_.DBF
-rwxrwxrwx 1 oracle oinstall? 5251072 Mar 31 16:22 O1_MF_USERS_BKLLOTM6_.DBF
-rwxrwxrwx 1 oracle oinstall? ? ? 2582 Mar 31 16:23 TRANSPORT_DB_SCRIPT.SQL
-rwxrwxrwx 1 oracle oinstall 251666432 Mar 31 16:24 O1_MF_SYSAUX_BKLLOTFL_.DBF


?


6.在目标主机上创建数据库需要的目录,并修改PFILE参数文件中的相关参数,并修改传输脚本中指示数据文件的位置。


创建相关目录
[oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/admin/jingyong/adump
[oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/admin/jingyong/bdump
[oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/admin/jingyong/cdump
[oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/admin/jingyong/udump
[oracle@oracle11g dbs]$ chmod -R 777 /u01/app/oracle/admin/jingyong*



修改PFILE参数文件
[oracle@oracle11g jingyong]$ vi initjingyong.ora
# Please change the values of the following parameters:



? audit_file_dest? ? ? ? ? = '/u01/app/oracle/admin/jingyong/adump'


? background_dump_dest? ? = '/u01/app/oracle/admin/jingyong/bdump'


? user_dump_dest? ? ? ? ? = '/u01/app/oracle/admin/jingyong/udump'


? core_dump_dest? ? ? ? ? = '/u01/app/oracle/admin/jingyong/udump'


? db_name? ? ? ? ? ? ? ? ? = "JINGYONG"
? control_files='/u01/app/oracle/oradata/test/control01.ctl'



# Please review the values of the following parameters:



? dispatchers? ? ? ? ? ? ? = "(PROTOCOL=TCP) (SERVICE=jingyongXDB)"


?


# The values of the following parameters are from source database:


? processes? ? ? ? ? ? ? ? = 150


? nls_language? ? ? ? ? ? = "SIMPLIFIED CHINESE"


? nls_territory? ? ? ? ? ? = "CHINA"


? sga_target? ? ? ? ? ? ? = 130M


? db_block_size? ? ? ? ? ? = 8192


? compatible? ? ? ? ? ? ? = "10.2.0.1.0"


? db_file_multiblock_read_count= 16


? undo_management? ? ? ? ? = "AUTO"


? undo_tablespace? ? ? ? ? = "UNDOTBS1"


? job_queue_processes? ? ? = 10


? open_cursors? ? ? ? ? ? = 300


? pga_aggregate_target? ? = 32M


?


修改convert database命令生成的传输脚本
[oracle@oracle11g jingyong]$ vi TRANSPORT_DB_SCRIPT.SQL
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.


-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--? ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE


STARTUP NOMOUNT PFILE='/u01/app/oracle/10.2.0/db/dbs/initjingyong.ora'


-- Create SPFILE
CREATE SPFILE FROM PFILE = '/u01/app/oracle/10.2.0/db/dbs/initjingyong.ora';



STARTUP FORCE NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "JINGYONG" RESETLOGS? NOARCHIVELOG
? ? MAXLOGFILES 16
? ? MAXLOGMEMBERS 3
? ? MAXDATAFILES 100
? ? MAXINSTANCES 8
? ? MAXLOGHISTORY 292
LOGFILE
? GROUP 1 '/u02/jingyong/redo01.log' SIZE 50M,
? GROUP 2 '/u02/jingyong/redo02.log' SIZE 50M,
? GROUP 3 '/u02/jingyong/redo03.log' SIZE 50M
DATAFILE
? '/u02/jingyong/O1_MF_SYSTEM_BKLLOT8Z_.DBF',
? '/u02/jingyong/O1_MF_UNDOTBS1_BKLLOTM0_.DBF',
? '/u02/jingyong/O1_MF_SYSAUX_BKLLOTFL_.DBF',
? '/u02/jingyong/O1_MF_USERS_BKLLOTM6_.DBF',
? '/u02/jingyong/O1_MF_EXAMPLE_BKLLRKG2_.DBF',
? '/u02/jingyong/TSPITR01.DBF',
? '/u02/jingyong/TEST01.DBF'
CHARACTER SET ZHS16GBK
;


-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;


-- Commands to add tempfiles to temporary tablesp