[Oracle][RMAN] Use RMAN to Migrate database from CentOS_5-11201-SingleDB to OracleLinux_5-11204-SingleDB

リンク:
How to Move/Restore DB to New Host and File System using RMAN (Doc ID 1338193.1)
https://docs.oracle.com/cd/E16338_01/server.112/b56310/upgrade.htm#CACGGHJC

**********************************************
**************Migration Resource**************
************CentOS_5-11201-SingleDB **********
**********************************************
[oracle@node2 ~]$ lsnrctl start ★start listener

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-DEC-2018 09:26:24

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Starting /u01/app/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/diag/tnslsnr/node2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node2)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-DEC-2018 09:26:25
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/diag/tnslsnr/node2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node2)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@node2 ~]$ sql

SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 25 09:26:31 2018

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

Connected to an idle instance.

SYS@orcl>startup mount ★start DB with mount option
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size 2213896 bytes
Variable Size 1291847672 bytes
Database Buffers 352321536 bytes
Redo Buffers 7135232 bytes
Database mounted.
SYS@orcl>archive log list
Database log mode Archive Mode
Automatic archival Enabled ★This DB is running in Archive Mode
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 640
Next log sequence to archive 642
Current log sequence 642
SYS@orcl>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node2 ~]$ rman target / ★connect to DB with RMAN

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Dec 25 09:28:27 2018

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1500970442, not open)

RMAN> report schema; ★Check information of TableSpace and datafiles

Report of database schema for database with db_unique_name ORCL

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 2048 SYSTEM *** /u01/app/oradata/orcl/system01.dbf
2 600 SYSAUX *** /u01/app/oradata/orcl/sysaux01.dbf
3 500 UNDOTBS1 *** /u01/app/oradata/orcl/undotbs01.dbf
4 3072 USERS *** /u01/app/oradata/orcl/users01.dbf
5 10 TOOLS *** /db/MODB2/tools01.dbf
6 1000 MOIT1 *** /db/MODB2/moit1_01.dbf
7 1000 MOIT2 *** /db/MODB2/moit2_01.dbf
8 1000 MOIT3 *** /db/MODB2/moit3_01.dbf
9 1000 MOIT4 *** /db/MODB2/moit4_01.dbf
10 1000 MOIT5 *** /db/MODB2/moit5_01.dbf
11 1024 IDX *** /db/MODB2/idx.dbf
12 500 IDX *** /db/MODB2/system02.dbf
13 1000 MOIT6 *** /db/MODB2/moit6_01.dbf
14 1000 MOIT7 *** /db/MODB2/moit7_01.dbf
15 1000 MOIT8 *** /db/MODB2/moit8.dbf
16 1024 BOMASTER *** /db/MODB2/bomaster_01.dbf
17 512 KCDBDEV *** /u01/app/oradata/orcl/KCDBDEV.DBF
18 50 KABUIDX01 *** /u01/app/oradata/orcl/KABUIDX01.DBF
19 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs101.dbf
20 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs201.dbf
21 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs301.dbf
22 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs401.dbf
23 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs501.dbf
24 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs601.dbf
25 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs701.dbf
26 10 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs801.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 133 TEMP 32767 /u01/app/oradata/orcl/temp01.dbf

RMAN> show all; ★Check RMAN configuration

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

RMAN> list backupset verbose; ★There is no Backup file for this DB

specification does not match any backup in the repository

RMAN> run {
allocate channel c1 type disk format '/tmp/%U'; ★There are many datafiles, use multiple channels to access them
allocate channel c2 type disk format '/tmp/%U';
allocate channel c3 type disk format '/tmp/%U';
allocate channel c4 type disk format '/tmp/%U';
allocate channel c5 type disk format '/tmp/%U';
backup database plus archivelog; ★Backup database (this command will backup datafile, archivelog files,control files, and spfiles,So ,Unlike 1338193.1 ,there is no need to backup control and spfile again)
}2> 3> 4> 5> 6> 7> 8>

released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=63 device type=DISK

allocated channel: c2
channel c2: SID=129 device type=DISK

allocated channel: c3
channel c3: SID=192 device type=DISK

allocated channel: c4
channel c4: SID=6 device type=DISK

allocated channel: c5
channel c5: SID=67 device type=DISK


Starting backup at 18-12-25_09:58:24
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=633 RECID=122 STAMP=995469440
input archived log thread=1 sequence=634 RECID=123 STAMP=995469446
channel c1: starting piece 1 at 18-12-25_09:58:25
channel c2: starting archived log backup set
channel c2: specifying archived log(s) in backup set
input archived log thread=1 sequence=635 RECID=124 STAMP=995469449
input archived log thread=1 sequence=636 RECID=125 STAMP=995469473
channel c2: starting piece 1 at 18-12-25_09:58:25
channel c3: starting archived log backup set
channel c3: specifying archived log(s) in backup set
input archived log thread=1 sequence=637 RECID=126 STAMP=995469507
input archived log thread=1 sequence=638 RECID=127 STAMP=995469781
channel c3: starting piece 1 at 18-12-25_09:58:25
channel c4: starting archived log backup set
channel c4: specifying archived log(s) in backup set
input archived log thread=1 sequence=639 RECID=128 STAMP=995469903
input archived log thread=1 sequence=640 RECID=129 STAMP=995469985
channel c4: starting piece 1 at 18-12-25_09:58:25
channel c5: starting archived log backup set
channel c5: specifying archived log(s) in backup set
input archived log thread=1 sequence=641 RECID=130 STAMP=995470177
channel c5: starting piece 1 at 18-12-25_09:58:25
channel c5: finished piece 1 at 18-12-25_09:58:43
piece handle=/tmp/06tll8u1_1_1 tag=TAG20181225T095824 comment=NONE
channel c5: backup set complete, elapsed time: 00:00:20
channel c4: finished piece 1 at 18-12-25_09:58:58
piece handle=/tmp/05tll8u1_1_1 tag=TAG20181225T095824 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:33
channel c1: finished piece 1 at 18-12-25_09:59:08
piece handle=/tmp/02tll8u1_1_1 tag=TAG20181225T095824 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:43
channel c2: finished piece 1 at 18-12-25_09:59:08
piece handle=/tmp/03tll8u1_1_1 tag=TAG20181225T095824 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:43
channel c3: finished piece 1 at 18-12-25_09:59:08
piece handle=/tmp/04tll8u1_1_1 tag=TAG20181225T095824 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:43
Finished backup at 18-12-25_09:59:08

Starting backup at 18-12-25_09:59:08
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oradata/orcl/users01.dbf
input datafile file number=00003 name=/u01/app/oradata/orcl/undotbs01.dbf
input datafile file number=00012 name=/db/MODB2/system02.dbf
channel c1: starting piece 1 at 18-12-25_09:59:09
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00006 name=/db/MODB2/moit1_01.dbf
input datafile file number=00007 name=/db/MODB2/moit2_01.dbf
input datafile file number=00010 name=/db/MODB2/moit5_01.dbf
input datafile file number=00018 name=/u01/app/oradata/orcl/KABUIDX01.DBF
input datafile file number=00025 name=/u01/app/oradata/orcl/partis_tbs701.dbf
input datafile file number=00002 name=/u01/app/oradata/orcl/sysaux01.dbf
channel c2: starting piece 1 at 18-12-25_09:59:09
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oradata/orcl/system01.dbf
input datafile file number=00015 name=/db/MODB2/moit8.dbf
input datafile file number=00024 name=/u01/app/oradata/orcl/partis_tbs601.dbf
input datafile file number=00026 name=/u01/app/oradata/orcl/partis_tbs801.dbf
input datafile file number=00017 name=/u01/app/oradata/orcl/KCDBDEV.DBF
channel c3: starting piece 1 at 18-12-25_09:59:09
channel c4: starting full datafile backup set
channel c4: specifying datafile(s) in backup set
input datafile file number=00011 name=/db/MODB2/idx.dbf
input datafile file number=00008 name=/db/MODB2/moit3_01.dbf
input datafile file number=00013 name=/db/MODB2/moit6_01.dbf
input datafile file number=00005 name=/db/MODB2/tools01.dbf
input datafile file number=00020 name=/u01/app/oradata/orcl/partis_tbs201.dbf
input datafile file number=00022 name=/u01/app/oradata/orcl/partis_tbs401.dbf
channel c4: starting piece 1 at 18-12-25_09:59:10
channel c5: starting full datafile backup set
channel c5: specifying datafile(s) in backup set
input datafile file number=00016 name=/db/MODB2/bomaster_01.dbf
input datafile file number=00009 name=/db/MODB2/moit4_01.dbf
input datafile file number=00014 name=/db/MODB2/moit7_01.dbf
input datafile file number=00019 name=/u01/app/oradata/orcl/partis_tbs101.dbf
input datafile file number=00021 name=/u01/app/oradata/orcl/partis_tbs301.dbf
input datafile file number=00023 name=/u01/app/oradata/orcl/partis_tbs501.dbf
channel c5: starting piece 1 at 18-12-25_09:59:10
channel c4: finished piece 1 at 18-12-25_10:02:05
piece handle=/tmp/0atll8ve_1_1 tag=TAG20181225T095908 comment=NONE
channel c4: backup set complete, elapsed time: 00:02:55
channel c4: starting full datafile backup set
channel c4: specifying datafile(s) in backup set
including current control file in backup set
channel c4: starting piece 1 at 18-12-25_10:02:34
channel c4: finished piece 1 at 18-12-25_10:02:47
piece handle=/tmp/0ctll94v_1_1 tag=TAG20181225T095908 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:13
channel c4: starting full datafile backup set
channel c4: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c4: starting piece 1 at 18-12-25_10:02:52
channel c4: finished piece 1 at 18-12-25_10:02:53
piece handle=/tmp/0dtll96b_1_1 tag=TAG20181225T095908 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:01
channel c5: finished piece 1 at 18-12-25_10:04:37
piece handle=/tmp/0btll8ve_1_1 tag=TAG20181225T095908 comment=NONE
channel c5: backup set complete, elapsed time: 00:05:27
channel c3: finished piece 1 at 18-12-25_10:06:17
piece handle=/tmp/09tll8vd_1_1 tag=TAG20181225T095908 comment=NONE
channel c3: backup set complete, elapsed time: 00:07:08
channel c1: finished piece 1 at 18-12-25_10:08:17
piece handle=/tmp/07tll8vd_1_1 tag=TAG20181225T095908 comment=NONE
channel c1: backup set complete, elapsed time: 00:09:08
channel c2: finished piece 1 at 18-12-25_10:08:47
piece handle=/tmp/08tll8vd_1_1 tag=TAG20181225T095908 comment=NONE
channel c2: backup set complete, elapsed time: 00:09:38
Finished backup at 18-12-25_10:08:47 ★done

Starting backup at 18-12-25_10:08:47
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 18-12-25_10:08:48
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: c5

RMAN> shutdown immediate ★shutdown 11201-SingleDB

database dismounted
[oracle@node2 ~]$ cd /tmp/
[oracle@node2 tmp]$ ls -l 0*
-rw-r----- 1 oracle oinstall 85481984 12月 25 09:59 02tll8u1_1_1
-rw-r----- 1 oracle oinstall 87916544 12月 25 09:58 03tll8u1_1_1
-rw-r----- 1 oracle oinstall 84720128 12月 25 09:58 04tll8u1_1_1
-rw-r----- 1 oracle oinstall 82724352 12月 25 09:58 05tll8u1_1_1
-rw-r----- 1 oracle oinstall 40510464 12月 25 09:58 06tll8u1_1_1
-rw-r----- 1 oracle oinstall 3005718528 12月 25 10:08 07tll8vd_1_1
-rw-r----- 1 oracle oinstall 1311129600 12月 25 10:08 08tll8vd_1_1
-rw-r----- 1 oracle oinstall 1072676864 12月 25 10:06 09tll8vd_1_1
-rw-r----- 1 oracle oinstall 247963648 12月 25 10:01 0atll8ve_1_1
-rw-r----- 1 oracle oinstall 842711040 12月 25 10:04 0btll8ve_1_1
-rw-r----- 1 oracle oinstall 10059776 12月 25 10:02 0ctll94v_1_1 ★control files' backup
-rw-r----- 1 oracle oinstall 98304 12月 25 10:02 0dtll96b_1_1 ★spfile's backup
[oracle@node2 tmp]$ scp 0* oracle@192.168.56.101:/tmp/ ★transfer all the backup files to OracleLinux_5-11204-SingleDB
The authenticity of host '192.168.56.101 (192.168.56.101)' can't be established.
RSA key fingerprint is 21:55:56:37:f4:85:58:bb:d9:ae:87:c6:7f:ce:23:2d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.56.101' (RSA) to the list of known hosts.
oracle@192.168.56.101's password:
02tll8u1_1_1 100% 82MB 13.6MB/s 00:06
03tll8u1_1_1 100% 84MB 3.8MB/s 00:22
04tll8u1_1_1 100% 81MB 7.4MB/s 00:11
05tll8u1_1_1 100% 79MB 5.6MB/s 00:14
06tll8u1_1_1 100% 39MB 5.5MB/s 00:07
07tll8vd_1_1 100% 2866MB 3.0MB/s 15:47
08tll8vd_1_1 100% 1250MB 2.9MB/s 07:13
09tll8vd_1_1 100% 1023MB 2.9MB/s 05:58
0atll8ve_1_1 100% 236MB 3.9MB/s 01:01
0btll8ve_1_1 100% 804MB 3.2MB/s 04:11
0ctll94v_1_1 100% 9824KB 1.9MB/s 00:05
0dtll96b_1_1 100% 96KB 96.0KB/s 00:00


**********************************************
**************Migration Destination***********
**********OracleLinux_5-11204-SingleDB********
**********************************************
[oracle@db11204 ~]$ lsnrctl start ★Start Listener on OracleLinux_5-11204-SingleDB

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 26-12月-2018 09:08:53

Copyright (c) 1991, 2013, Oracle. All rights reserved.

/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnrを起動しています。お待ちください...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
システム・パラメータ・ファイルは/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraです。
ログ・メッセージを/u01/app/oracle/diag/tnslsnr/db11204/listener/alert/log.xmlに書き込みました。
リスニングしています: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db11204)(PORT=1521)))
リスニングしています: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db11204)(PORT=1521)))に接続中
リスナーのステータス
------------------------
別名 LISTENER
バージョン TNSLSNR for Linux: Version 11.2.0.4.0 - Production
開始日 26-12月-2018 09:08:54
稼働時間 0 日 0 時間 0 分 1 秒
トレース・レベル off
セキュリティ ON: Local OS Authentication
SNMP OFF
パラメータ・ファイル /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
ログ・ファイル /u01/app/oracle/diag/tnslsnr/db11204/listener/alert/log.xml
リスニング・エンドポイントのサマリー...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db11204)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
リスナーはサービスをサポートしていません。
コマンドは正常に終了しました。
[oracle@db11204 ~]$ env | grep ORA ★Check environmane variables
ORACLE_SID=ora11204 ★this need to be modified to 'orcl'
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@db11204 ~]$ vi .bash_profile ★modify
[oracle@db11204 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

#add by leo 2014.02.01 start
export TMPDIR=$HOME/tmp
export TEMP=$HOME/tmp
export ORACLE_SID=orcl ★
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/jdk/bin:${PATH}
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG=JAPANESE_JAPAN.UTF8
export LANG=ja_JP.UTF-8
#add by leo 2014.02.01 end
[oracle@db11204 ~]$ source .bash_profile ★
[oracle@db11204 ~]$ cat /etc/oratab ★This file need to be modified too.
#

 

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
[oracle@db11204 ~]$ vi /etc/oratab ★modify
[oracle@db11204 ~]$ cat /etc/oratab
#

 

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N ★entry added
[oracle@db11204 ~]$ cd /tmp/
[oracle@db11204 tmp]$ pwd
/tmp
[oracle@db11204 tmp]$ ll
合計 6717316
-rw-r----- 1 oracle oinstall 85481984 12月 25 10:51 02tll8u1_1_1 ★All the files are ready
-rw-r----- 1 oracle oinstall 87916544 12月 25 10:52 03tll8u1_1_1
-rw-r----- 1 oracle oinstall 84720128 12月 25 10:52 04tll8u1_1_1
-rw-r----- 1 oracle oinstall 82724352 12月 25 10:52 05tll8u1_1_1
-rw-r----- 1 oracle oinstall 40510464 12月 25 10:52 06tll8u1_1_1
-rw-r----- 1 oracle oinstall 3005718528 12月 25 11:08 07tll8vd_1_1
-rw-r----- 1 oracle oinstall 1311129600 12月 25 11:15 08tll8vd_1_1
-rw-r----- 1 oracle oinstall 1072676864 12月 25 11:21 09tll8vd_1_1
-rw-r----- 1 oracle oinstall 247963648 12月 25 11:22 0atll8ve_1_1
-rw-r----- 1 oracle oinstall 842711040 12月 25 11:27 0btll8ve_1_1
-rw-r----- 1 oracle oinstall 10059776 12月 25 11:27 0ctll94v_1_1
-rw-r----- 1 oracle oinstall 98304 12月 25 11:27 0dtll96b_1_1 ★
drwx------ 2 oracle oinstall 4096 12月 25 09:11 gconfd-oracle
drwx------ 2 root root 4096 12月 25 10:17 gconfd-root
srwxr-xr-x 1 root root 0 12月 25 10:16 mapping-root
srw------- 1 oracle oinstall 0 12月 25 09:04 scim-panel-socket:0-oracle
srw------- 1 root root 0 12月 25 10:16 scim-panel-socket:0-root
-rw-r--r-- 1 root root 20064 2月 1 2014 vboxguest-Module.symvers
[oracle@db11204 tmp]$ rman target / ★connect to new DB with RMAN

Recovery Manager: Release 11.2.0.4.0 - Production on 水 12月 26 09:16:41 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

ターゲット・データベースに接続しました(起動していません)。 ★not opened

RMAN> startup nomount force; ★start new DB with nomount force option.

起動に失敗しました: ORA-01078: failure in processing system parameters
LRM-00109: ??????????????????????????????'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora'?????????????????????????????????

SPFILE取得用のパラメータ・ファイルのないOracleインスタンスを起動しています
Oracleインスタンスが起動しました ★started

システム・グローバル領域の合計は、 1068937216バイトです。

Fixed Size 2260088バイト
Variable Size 281019272バイト
Database Buffers 780140544バイト
Redo Buffers 5517312バイト

RMAN> restore spfile from '/tmp/0dtll96b_1_1'; ★restore spfile

restoreが開始されました(開始時間: 18-12-26)
リカバリ・カタログのかわりにターゲット・データベース制御ファイルを使用しています
チャネル: ORA_DISK_1が割り当てられました
チャネルORA_DISK_1: SID=171 デバイス・タイプ=DISK

チャネルORA_DISK_1: 自動バックアップ/tmp/0dtll96b_1_1からSPFILEをリストアしています
チャネルORA_DISK_1: 自動バックアップからのSPFILEのリストアが完了しました
restoreが完了しました(完了時間: 18-12-26)

RMAN> restore spfile to pfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora' from '/tmp/0dtll96b_1_1'; ★restore spfile to pfile

restoreが開始されました(開始時間: 18-12-26)
チャネルORA_DISK_1の使用

チャネルORA_DISK_1: 自動バックアップ/tmp/0dtll96b_1_1からSPFILEをリストアしています
チャネルORA_DISK_1: 自動バックアップからのSPFILEのリストアが完了しました
restoreが完了しました(完了時間: 18-12-26)

RMAN> shutdown immediate; ★shutdown new DB

Oracleインスタンスがシャットダウンしました

RMAN> exit


Recovery Managerが完了しました。
[oracle@db11204 tmp]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora ★Check the pfile
orcl.__db_cache_size=352321536
orcl.__java_pool_size=16777216
orcl.__large_pool_size=16777216
orcl.__oracle_base='/u01/app'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=570425344
orcl.__sga_target=1090519040
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=654311424
orcl.__streams_pool_size=33554432
*.audit_file_dest='/u01/app/admin/orcl/adump' ★Path needed to be made (No.1)
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oradata/orcl/control01.ctl','/u01/app/flash_recovery_area/orcl/control02.ctl' ★Path needed to be made (No.2,3)
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/flash_recovery_area'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.memory_target=1656750080
*.open_cursors=300
*.optimizer_use_sql_plan_baselines=FALSE
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
[oracle@db11204 tmp]$ mkdir -p /u01/app/admin/orcl/adump ★No.1
[oracle@db11204 tmp]$ mkdir -p /u01/app/oracle/oradata/orcl/ ★No.2
[oracle@db11204 tmp]$ mkdir -p /u01/app/flash_recovery_area/orcl/ ★No.3
[oracle@db11204 tmp]$ mkdir -p /u01/app/oradata/orcl/ ★because control files of 11201 are located on different paths, old path needs to be made too.
[oracle@db11204 tmp]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on 水 12月 26 09:22:56 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

ターゲット・データベース: ORCLに接続されました(マウントされていません)

RMAN> restore controlfile from '/tmp/0ctll94v_1_1'; ★restore controlfile

restoreが開始されました(開始時間: 18-12-26)
リカバリ・カタログのかわりにターゲット・データベース制御ファイルを使用しています
チャネル: ORA_DISK_1が割り当てられました
チャネルORA_DISK_1: SID=125 デバイス・タイプ=DISK

チャネルORA_DISK_1: 制御ファイルをリストア中です
チャネルORA_DISK_1: リストアが完了しました。経過時間: 00:00:03
出力ファイル名=/u01/app/oradata/orcl/control01.ctl
出力ファイル名=/u01/app/flash_recovery_area/orcl/control02.ctl
restoreが完了しました(完了時間: 18-12-26)

RMAN> exit


Recovery Managerが完了しました。
[oracle@db11204 tmp]$ export NLS_LANG='American' ★Change language
[oracle@db11204 tmp]$ export NLS_DATE_FORMAT=YYYY-MM-DD_HH24:MI:SS ★change NLS_DATE_FORMAT
[oracle@db11204 tmp]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 26 09:23:44 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (not mounted)

RMAN> alter database mount; ★mount new db

using target database control file instead of recovery catalog
database mounted
RMAN> catalog start with '/tmp/'; ★catalog backup file into control files of new db

using target database control file instead of recovery catalog
searching for all files that match the pattern /tmp/

List of Files Unknown to the Database
=====================================
File Name: /tmp/08tll8vd_1_1
File Name: /tmp/0ctll94v_1_1
File Name: /tmp/vboxguest-Module.symvers
File Name: /tmp/07tll8vd_1_1
File Name: /tmp/0btll8ve_1_1
File Name: /tmp/.X0-lock
File Name: /tmp/09tll8vd_1_1
File Name: /tmp/0dtll96b_1_1

Do you really want to catalog the above files (enter YES or NO)? yes ★yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /tmp/08tll8vd_1_1
File Name: /tmp/0ctll94v_1_1
File Name: /tmp/07tll8vd_1_1
File Name: /tmp/0btll8ve_1_1
File Name: /tmp/09tll8vd_1_1
File Name: /tmp/0dtll96b_1_1

List of Files Which Where Not Cataloged
=======================================
File Name: /tmp/vboxguest-Module.symvers
RMAN-07517: Reason: The file header is corrupted
File Name: /tmp/.X0-lock
RMAN-07517: Reason: The file header is corrupted

RMAN>
catalog backuppiece '/tmp/02tll8u1_1_1'; ★catalog the files that was now cataloged on command of 'catalog start with'
catalog backuppiece '/tmp/03tll8u1_1_1';
catalog backuppiece '/tmp/04tll8u1_1_1';
catalog backuppiece '/tmp/05tll8u1_1_1';
catalog backuppiece '/tmp/06tll8u1_1_1';
RMAN>
cataloged backup piece
backup piece handle=/tmp/02tll8u1_1_1 RECID=13 STAMP=995880419

RMAN>
cataloged backup piece
backup piece handle=/tmp/03tll8u1_1_1 RECID=14 STAMP=995880419

RMAN>
cataloged backup piece
backup piece handle=/tmp/04tll8u1_1_1 RECID=15 STAMP=995880419

RMAN>
cataloged backup piece
backup piece handle=/tmp/05tll8u1_1_1 RECID=16 STAMP=995880420

RMAN>

cataloged backup piece
backup piece handle=/tmp/06tll8u1_1_1 RECID=17 STAMP=995880421

RMAN> list backupset verbose; ★check backup files' details


List of Backup Sets
===================


BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
1 38.63M DISK 00:00:08 2018-12-25_09:58:33
BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095824
Piece Name: /tmp/06tll8u1_1_1

List of Archived Logs in backup set 1
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 641 3275697803 2018-12-21_15:26:21 3275711750 2018-12-21_15:29:33

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
2 78.89M DISK 00:00:28 2018-12-25_09:58:53
BP Key: 16 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095824
Piece Name: /tmp/05tll8u1_1_1

List of Archived Logs in backup set 2
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 639 3275629880 2018-12-21_15:22:56 3275670717 2018-12-21_15:24:59
1 640 3275670717 2018-12-21_15:24:59 3275697803 2018-12-21_15:26:21

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
3 80.79M DISK 00:00:33 2018-12-25_09:58:58
BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095824
Piece Name: /tmp/04tll8u1_1_1

List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 637 3275587606 2018-12-21_15:17:49 3275600334 2018-12-21_15:18:23
1 638 3275600334 2018-12-21_15:18:23 3275629880 2018-12-21_15:22:56

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
4 83.84M DISK 00:00:35 2018-12-25_09:59:00
BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095824
Piece Name: /tmp/03tll8u1_1_1

List of Archived Logs in backup set 4
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 635 3275563223 2018-12-21_15:06:13 3275576086 2018-12-21_15:17:20
1 636 3275576086 2018-12-21_15:17:20 3275587606 2018-12-21_15:17:49

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
5 81.52M DISK 00:00:36 2018-12-25_09:59:01
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095824
Piece Name: /tmp/02tll8u1_1_1

List of Archived Logs in backup set 5
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 633 3275537154 2018-12-21_15:05:06 3275549232 2018-12-21_15:05:39
1 634 3275549232 2018-12-21_15:05:39 3275563223 2018-12-21_15:06:13

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
6 Full 236.47M DISK 00:02:48 2018-12-25_10:01:58
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0atll8ve_1_1
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
5 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/tools01.dbf
8 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit3_01.dbf
11 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/idx.dbf
13 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit6_01.dbf
20 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs201.dbf
22 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs401.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
7 Full 1.22G DISK 00:00:00 2018-12-25_09:59:09
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/08tll8vd_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
2 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/sysaux01.dbf
6 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit1_01.dbf
7 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit2_01.dbf
10 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit5_01.dbf
18 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/KABUIDX01.DBF
25 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs701.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
8 Full 9.58M DISK 00:00:00 2018-12-25_10:02:07
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0ctll94v_1_1
Control File Included: Ckp SCN: 3275722635 Ckp time: 2018-12-21_15:47:10

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
9 Full 2.80G DISK 00:00:00 2018-12-25_09:59:09
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/07tll8vd_1_1
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
3 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/undotbs01.dbf
4 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/users01.dbf
12 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/system02.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
10 Full 803.66M DISK 00:00:00 2018-12-25_09:59:10
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0btll8ve_1_1
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
9 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit4_01.dbf
14 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit7_01.dbf
16 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/bomaster_01.dbf
19 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs101.dbf
21 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs301.dbf
23 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs501.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
11 Full 1022.98M DISK 00:00:00 2018-12-25_09:59:09
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/09tll8vd_1_1
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
1 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/system01.dbf
15 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit8.dbf
17 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/KCDBDEV.DBF
24 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs601.dbf
26 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs801.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
12 Full 80.00K DISK 00:00:00 2018-12-25_10:02:51
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0dtll96b_1_1
SPFILE Included: Modification time: 2018-12-25_09:26:53
SPFILE db_unique_name: ORCL

RMAN> report schema; ★check schema information

RMAN-06139: WARNING: control file is not current for REPORT SCHEMA ★before restoration , this warning message was prompted
Report of database schema for database with db_unique_name ORCL

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 0 SYSTEM *** /u01/app/oradata/orcl/system01.dbf ★Location was still same with 11201-SingleDB
2 0 SYSAUX *** /u01/app/oradata/orcl/sysaux01.dbf
3 0 UNDOTBS1 *** /u01/app/oradata/orcl/undotbs01.dbf
4 0 USERS *** /u01/app/oradata/orcl/users01.dbf
5 0 TOOLS *** /db/MODB2/tools01.dbf ★Location was still same with 11201-SingleDB
6 0 MOIT1 *** /db/MODB2/moit1_01.dbf
7 0 MOIT2 *** /db/MODB2/moit2_01.dbf
8 0 MOIT3 *** /db/MODB2/moit3_01.dbf
9 0 MOIT4 *** /db/MODB2/moit4_01.dbf
10 0 MOIT5 *** /db/MODB2/moit5_01.dbf
11 0 IDX *** /db/MODB2/idx.dbf
12 0 IDX *** /db/MODB2/system02.dbf
13 0 MOIT6 *** /db/MODB2/moit6_01.dbf
14 0 MOIT7 *** /db/MODB2/moit7_01.dbf
15 0 MOIT8 *** /db/MODB2/moit8.dbf
16 0 BOMASTER *** /db/MODB2/bomaster_01.dbf
17 0 KCDBDEV *** /u01/app/oradata/orcl/KCDBDEV.DBF
18 0 KABUIDX01 *** /u01/app/oradata/orcl/KABUIDX01.DBF
19 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs101.dbf
20 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs201.dbf
21 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs301.dbf
22 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs401.dbf
23 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs501.dbf
24 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs601.dbf
25 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs701.dbf
26 0 PARTIS_TBS *** /u01/app/oradata/orcl/partis_tbs801.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u01/app/oradata/orcl/temp01.dbf ★Location was still same with 11201-SingleDB

RMAN> restore database preview; ★

Starting restore at 2018-12-26_09:28:03
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=125 device type=DISK


List of Backup Sets
===================


BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
11 Full 1022.98M DISK 00:00:00 2018-12-26_09:26:42
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/09tll8vd_1_1
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
1 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/system01.dbf
15 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit8.dbf
17 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/KCDBDEV.DBF
24 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs601.dbf
26 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs801.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
7 Full 1.22G DISK 00:00:00 2018-12-26_09:26:41
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/08tll8vd_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
2 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/sysaux01.dbf
6 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit1_01.dbf
7 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit2_01.dbf
10 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit5_01.dbf
18 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/KABUIDX01.DBF
25 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs701.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
9 Full 2.80G DISK 00:00:00 2018-12-26_09:26:41
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/07tll8vd_1_1
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
3 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/undotbs01.dbf
4 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/users01.dbf
12 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/system02.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
6 Full 236.47M DISK 00:02:48 2018-12-25_09:59:19
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0atll8ve_1_1
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
5 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/tools01.dbf
8 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit3_01.dbf
11 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/idx.dbf
13 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit6_01.dbf
20 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs201.dbf
22 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs401.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
10 Full 803.66M DISK 00:00:00 2018-12-26_09:26:41
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20181225T095908
Piece Name: /tmp/0btll8ve_1_1
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ------------------- ----
9 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit4_01.dbf
14 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/moit7_01.dbf
16 Full 3275722635 2018-12-21_15:47:10 /db/MODB2/bomaster_01.dbf
19 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs101.dbf
21 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs301.dbf
23 Full 3275722635 2018-12-21_15:47:10 /u01/app/oradata/orcl/partis_tbs501.dbf
using channel ORA_DISK_1

archived logs generated after SCN 3275722635 not found in repository
Media recovery start SCN is 3275722635
Recovery must be done beyond SCN 3275722635 to clear datafile fuzziness
Finished restore at 2018-12-26_09:28:04

RMAN> run {
allocate channel c1 type disk format '/tmp/%U';
allocate channel c2 type disk format '/tmp/%U';
allocate channel c3 type disk format '/tmp/%U';
allocate channel c4 type disk format '/tmp/%U';
allocate channel c5 type disk format '/tmp/%U';
set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/system01.dbf'; ★CHANGE location of datafiles of new DB to
set newname for datafile 2 to '/u01/app/oracle/oradata/orcl/sysaux01.dbf'; ★/u01/app/oracle/oradata/orcl/
set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/undotbs01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata/orcl/users01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/tools01.dbf';
set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/moit1_01.dbf';
set newname for datafile 7 to '/u01/app/oracle/oradata/orcl/moit2_01.dbf';
set newname for datafile 8 to '/u01/app/oracle/oradata/orcl/moit3_01.dbf';
set newname for datafile 9 to '/u01/app/oracle/oradata/orcl/moit4_01.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata/orcl/moit5_01.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata/orcl/idx.dbf';
3> set newname for datafile 12 to '/u01/app/oracle/oradata/orcl/system02.dbf';
set newname for datafile 13 to '/u01/app/oracle/oradata/orcl/moit6_01.dbf';
set newname for datafile 14 to '/u01/app/oracle/oradata/orcl/moit7_01.dbf';
set newname for datafile 15 to '/u01/app/oracle/oradata/orcl/moit8.dbf';
set newname for datafile 16 to '/u01/app/oracle/oradata/orcl/bomaster_01.dbf';
set newname for datafile 17 to '/u01/app/oracle/oradata/orcl/KCDBDEV.DBF';
set newname for datafile 18 to '/u01/app/oracle/oradata/orcl/KABUIDX01.DBF';
set newname for datafile 19 to '/u01/app/oracle/oradata/orcl/partis_tbs101.dbf';
set newname for datafile 20 to '/u01/app/oracle/oradata/orcl/partis_tbs201.dbf';
set newname for datafile 21 to '/u01/app/oracle/oradata/orcl/partis_tbs301.dbf';
set newname for datafile 22 to '/u01/app/oracle/oradata/orcl/partis_tbs401.dbf';
set newname for datafile 23 to '/u01/app/oracle/oradata/orcl/partis_tbs501.dbf';
set newname for datafile 24 to '/u01/app/oracle/oradata/orcl/partis_tbs601.dbf';
set newname for datafile 25 to '/u01/app/oracle/oradata/orcl/partis_tbs701.dbf';
set newname for datafile 26 to '/u01/app/oracle/oradata/orcl/partis_tbs801.dbf';
set newname for tempfile 1 to '/u01/app/oracle/oradata/orcl/temp01.dbf'; ★CHANGE location of tempfile of new DB too
restore database; ★
switch datafile all; ★
switch tempfile all; ★
}4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37>

released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=125 device type=DISK

allocated channel: c2
channel c2: SID=10 device type=DISK

allocated channel: c3
channel c3: SID=135 device type=DISK

allocated channel: c4
channel c4: SID=11 device type=DISK

allocated channel: c5
channel c5: SID=136 device type=DISK

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 2018-12-26_09:28:33

channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/tools01.dbf
channel c1: restoring datafile 00008 to /u01/app/oracle/oradata/orcl/moit3_01.dbf
channel c1: restoring datafile 00011 to /u01/app/oracle/oradata/orcl/idx.dbf
channel c1: restoring datafile 00013 to /u01/app/oracle/oradata/orcl/moit6_01.dbf
channel c1: restoring datafile 00020 to /u01/app/oracle/oradata/orcl/partis_tbs201.dbf
channel c1: restoring datafile 00022 to /u01/app/oracle/oradata/orcl/partis_tbs401.dbf
channel c1: reading from backup piece /tmp/0atll8ve_1_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel c2: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/moit1_01.dbf
channel c2: restoring datafile 00007 to /u01/app/oracle/oradata/orcl/moit2_01.dbf
channel c2: restoring datafile 00010 to /u01/app/oracle/oradata/orcl/moit5_01.dbf
channel c2: restoring datafile 00018 to /u01/app/oracle/oradata/orcl/KABUIDX01.DBF
channel c2: restoring datafile 00025 to /u01/app/oracle/oradata/orcl/partis_tbs701.dbf
channel c2: reading from backup piece /tmp/08tll8vd_1_1
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel c3: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel c3: restoring datafile 00012 to /u01/app/oracle/oradata/orcl/system02.dbf
channel c3: reading from backup piece /tmp/07tll8vd_1_1
channel c4: starting datafile backup set restore
channel c4: specifying datafile(s) to restore from backup set
channel c4: restoring datafile 00009 to /u01/app/oracle/oradata/orcl/moit4_01.dbf
channel c4: restoring datafile 00014 to /u01/app/oracle/oradata/orcl/moit7_01.dbf
channel c4: restoring datafile 00016 to /u01/app/oracle/oradata/orcl/bomaster_01.dbf
channel c4: restoring datafile 00019 to /u01/app/oracle/oradata/orcl/partis_tbs101.dbf
channel c4: restoring datafile 00021 to /u01/app/oracle/oradata/orcl/partis_tbs301.dbf
channel c4: restoring datafile 00023 to /u01/app/oracle/oradata/orcl/partis_tbs501.dbf
channel c4: reading from backup piece /tmp/0btll8ve_1_1
channel c5: starting datafile backup set restore
channel c5: specifying datafile(s) to restore from backup set
channel c5: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel c5: restoring datafile 00015 to /u01/app/oracle/oradata/orcl/moit8.dbf
channel c5: restoring datafile 00017 to /u01/app/oracle/oradata/orcl/KCDBDEV.DBF
channel c5: restoring datafile 00024 to /u01/app/oracle/oradata/orcl/partis_tbs601.dbf
channel c5: restoring datafile 00026 to /u01/app/oracle/oradata/orcl/partis_tbs801.dbf
channel c5: reading from backup piece /tmp/09tll8vd_1_1
channel c3: piece handle=/tmp/07tll8vd_1_1 tag=TAG20181225T095908
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:24:18
channel c5: piece handle=/tmp/09tll8vd_1_1 tag=TAG20181225T095908
channel c5: restored backup piece 1
channel c5: restore complete, elapsed time: 00:25:18
channel c2: piece handle=/tmp/08tll8vd_1_1 tag=TAG20181225T095908
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:25:28
channel c1: piece handle=/tmp/0atll8ve_1_1 tag=TAG20181225T095908
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:27:19
channel c4: piece handle=/tmp/0btll8ve_1_1 tag=TAG20181225T095908
channel c4: restored backup piece 1
channel c4: restore complete, elapsed time: 00:28:29
Finished restore at 2018-12-26_09:57:03

datafile 1 switched to datafile copy
input datafile copy RECID=27 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=28 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=29 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=30 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=31 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/tools01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=32 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit1_01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=33 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit2_01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=34 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit3_01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=35 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit4_01.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=36 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit5_01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=37 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/idx.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=38 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/system02.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=39 STAMP=995882224 file name=/u01/app/oracle/oradata/orcl/moit6_01.dbf
datafile 14 switched to datafile copy
input datafile copy RECID=40 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/moit7_01.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=41 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/moit8.dbf
datafile 16 switched to datafile copy
input datafile copy RECID=42 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/bomaster_01.dbf
datafile 17 switched to datafile copy
input datafile copy RECID=43 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/KCDBDEV.DBF
datafile 18 switched to datafile copy
input datafile copy RECID=44 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/KABUIDX01.DBF
datafile 19 switched to datafile copy
input datafile copy RECID=45 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs101.dbf
datafile 20 switched to datafile copy
input datafile copy RECID=46 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs201.dbf
datafile 21 switched to datafile copy
input datafile copy RECID=47 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs301.dbf
datafile 22 switched to datafile copy
input datafile copy RECID=48 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs401.dbf
datafile 23 switched to datafile copy
input datafile copy RECID=49 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs501.dbf
datafile 24 switched to datafile copy
input datafile copy RECID=50 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs601.dbf
datafile 25 switched to datafile copy
input datafile copy RECID=51 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs701.dbf
datafile 26 switched to datafile copy
input datafile copy RECID=52 STAMP=995882225 file name=/u01/app/oracle/oradata/orcl/partis_tbs801.dbf

renamed tempfile 1 to /u01/app/oracle/oradata/orcl/temp01.dbf in control file
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: c5

RMAN> report schema; ★Check schema information again

RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name ORCL

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 2048 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf ★location is OK now.
2 600 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 500 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 3072 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf
5 10 TOOLS *** /u01/app/oracle/oradata/orcl/tools01.dbf
6 1000 MOIT1 *** /u01/app/oracle/oradata/orcl/moit1_01.dbf
7 1000 MOIT2 *** /u01/app/oracle/oradata/orcl/moit2_01.dbf
8 1000 MOIT3 *** /u01/app/oracle/oradata/orcl/moit3_01.dbf
9 1000 MOIT4 *** /u01/app/oracle/oradata/orcl/moit4_01.dbf
10 1000 MOIT5 *** /u01/app/oracle/oradata/orcl/moit5_01.dbf
11 1024 IDX *** /u01/app/oracle/oradata/orcl/idx.dbf
12 500 IDX *** /u01/app/oracle/oradata/orcl/system02.dbf
13 1000 MOIT6 *** /u01/app/oracle/oradata/orcl/moit6_01.dbf
14 1000 MOIT7 *** /u01/app/oracle/oradata/orcl/moit7_01.dbf
15 1000 MOIT8 *** /u01/app/oracle/oradata/orcl/moit8.dbf
16 1024 BOMASTER *** /u01/app/oracle/oradata/orcl/bomaster_01.dbf
17 512 KCDBDEV *** /u01/app/oracle/oradata/orcl/KCDBDEV.DBF
18 50 KABUIDX01 *** /u01/app/oracle/oradata/orcl/KABUIDX01.DBF
19 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs101.dbf
20 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs201.dbf
21 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs301.dbf
22 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs401.dbf
23 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs501.dbf
24 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs601.dbf
25 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs701.dbf
26 10 PARTIS_TBS *** /u01/app/oracle/oradata/orcl/partis_tbs801.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf

RMAN> recover database noredo; ★because the backup was made by mount option on 11201 DB , 'recover database noredo' will be enough.

Starting recover at 2018-12-26_09:58:29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=125 device type=DISK

Finished recover at 2018-12-26_09:58:31

RMAN> exit


Recovery Manager complete.
[oracle@db11204 tmp]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 26 09:58:48 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
1 ONLINE
/u01/app/oradata/orcl/redo01.log
NO

2 ONLINE
/u01/app/oradata/orcl/redo02.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---

3 ONLINE
/u01/app/oradata/orcl/redo03.log
NO


SQL> alter database rename file '/u01/app/oradata/orcl/redo01.log' to '/u01/app/oracle/oradata/orcl/redo01.log'; ★change location of REDO.

Database altered.

SQL> alter database rename file '/u01/app/oradata/orcl/redo02.log' to '/u01/app/oracle/oradata/orcl/redo02.log';

Database altered.

SQL> alter database rename file '/u01/app/oradata/orcl/redo03.log' to '/u01/app/oracle/oradata/orcl/redo03.log';

Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@db11204 tmp]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 26 10:00:10 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1500970442, not open)

RMAN> alter database open resetlogs; ★open resetlogs

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/26/2018 10:00:37
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 3598
Session ID: 125 Serial number: 41
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-03114: not connected to ORACLE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/26/2018 10:00:37
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option ★From 11201 to 11204, this message is expected.
Process ID: 3598
Session ID: 125 Serial number: 41
[oracle@db11204 tmp]$
[oracle@db11204 ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/ ★This is important , must cd to this path before running catupgrd.sql(Oracle manual)
[oracle@db11204 admin]$ sqlplus / as sysdba ★

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 26 10:01:53 2018

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

Connected to an idle instance.

SQL> startup upgrade ★startup upgrade
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 973081640 bytes
Database Buffers 671088640 bytes
Redo Buffers 7094272 bytes
Database mounted.
Database opened.
SQL> SPOOL upgrade.log ★
SQL> @catupgrd.sql ★
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC> The first time this script is run, there should be no error messages
DOC> generated; all normal upgrade error messages are suppressed.
DOC>
DOC> If this script is being re-run after correcting some problem, then
DOC> expect the following error which is not automatically suppressed:
DOC>
DOC> ORA-00001: unique constraint (<constraint_name>) violated
DOC> possibly in conjunction with
DOC> ORA-06512: at "<procedure/function name>", line NN
DOC>
DOC> These errors will automatically be suppressed by the Database Upgrade
DOC> Assistant (DBUA) when it re-runs an upgrade.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
DOC>######################################################################
DOC>######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the user running this script is not SYS. Disconnect
DOC> and reconnect with AS SYSDBA.
DOC>######################################################################
DOC>######################################################################
DOC>#

no rows selected

DOC>######################################################################
DOC>######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database server version is not correct for this script.
DOC> Perform "ALTER SYSTEM CHECKPOINT" prior to "SHUTDOWN ABORT", and use
DOC> a different script or a different server.
DOC>######################################################################
DOC>######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database has not been opened for UPGRADE.
DOC>
DOC> Perform "ALTER SYSTEM CHECKPOINT" prior to "SHUTDOWN ABORT", and
DOC> restart using UPGRADE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the Oracle Database Vault option is TRUE. Upgrades cannot
DOC> be run with the Oracle Database Vault option set to TRUE since
DOC> AS SYSDBA connections are restricted.
DOC>
DOC> Perform "ALTER SYSTEM CHECKPOINT" prior to "SHUTDOWN ABORT", relink
DOC> the server without the Database Vault option, and restart the server
DOC> using UPGRADE mode.
DOC>
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if Database Vault is installed in the database but the Oracle
DOC> Label Security option is FALSE. To successfully upgrade Oracle
DOC> Database Vault, the Oracle Label Security option must be TRUE.
DOC>
DOC> Perform "ALTER SYSTEM CHECKPOINT" prior to "SHUTDOWN ABORT",
DOC> relink the server with the OLS option (but without the Oracle Database
DOC> Vault option) and restart the server using UPGRADE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if bootstrap migration is in progress and logminer clients
DOC> require utlmmig.sql to be run next to support this redo stream.
DOC>
DOC> Run utlmmig.sql
DOC> then (if needed)
DOC> restart the database using UPGRADE and
DOC> rerun the upgrade script.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following error is generated if the pre-upgrade tool has not been
DOC> run in the old ORACLE_HOME home prior to upgrading a pre-11.2 database:
DOC>
DOC> SELECT TO_NUMBER('MUST_HAVE_RUN_PRE-UPGRADE_TOOL_FOR_TIMEZONE')
DOC> *
DOC> ERROR at line 1:
DOC> ORA-01722: invalid number
DOC>
DOC> o Action:
DOC> Shutdown database ("alter system checkpoint" and then "shutdown abort").
DOC> Revert to the original oracle home and start the database.
DOC> Run pre-upgrade tool against the database.
DOC> Review and take appropriate actions based on the pre-upgrade
DOC> output before opening the datatabase in the new software version.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#

Session altered.


Table created.


Table altered.


no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following error is generated if the pre-upgrade tool has not been
DOC> run in the old oracle home prior to upgrading a pre-11.2 database:
DOC>
DOC> SELECT TO_NUMBER('MUST_BE_SAME_TIMEZONE_FILE_VERSION')
DOC> *
DOC> ERROR at line 1:
DOC> ORA-01722: invalid number
DOC>
DOC>
DOC> o Action:
DOC> Shutdown database ("alter system checkpoint" and then "shutdown abort").
DOC> Revert to the original ORACLE_HOME and start the database.
DOC> Run pre-upgrade tool against the database.
DOC> Review and take appropriate actions based on the pre-upgrade
DOC> output before opening the datatabase in the new software version.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following error is generated if (1) the old release uses a time
DOC> zone file version newer than the one shipped with the new oracle
DOC> release and (2) the new oracle home has not been patched yet:
DOC>
DOC> SELECT TO_NUMBER('MUST_PATCH_TIMEZONE_FILE_VERSION_ON_NEW_ORACLE_HOME')
DOC> *
DOC> ERROR at line 1:
DOC> ORA-01722: invalid number
DOC>
DOC> o Action:
DOC> Shutdown database ("alter system checkpoint" and then "shutdown abort").
DOC> Patch new ORACLE_HOME to the same time zone file version as used
DOC> in the old ORACLE_HOME.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected

DOC>#######################################################################
DOC>#######################################################################
DOC> The following statements will cause an "ORA-01722: invalid number"
DOC> error if the SYSAUX tablespace does not exist or is not
DOC> ONLINE for READ WRITE, PERMANENT, EXTENT MANAGEMENT LOCAL, and
DOC> SEGMENT SPACE MANAGEMENT AUTO.
DOC>
DOC> The SYSAUX tablespace is used in 10.1 to consolidate data from
DOC> a number of tablespaces that were separate in prior releases.
DOC> Consult the Oracle Database Upgrade Guide for sizing estimates.
DOC>
DOC> Create the SYSAUX tablespace, for example,
DOC>
DOC> create tablespace SYSAUX datafile 'sysaux01.dbf'
DOC> size 70M reuse
DOC> extent management local
DOC> segment space management auto
DOC> online;
DOC>
DOC> Then rerun the catupgrd.sql script.
DOC>#######################################################################
DOC>#######################################################################
DOC>#

no rows selected


no rows selected


no rows selected


no rows selected


no rows selected


Session altered.


Table created.


Table created.


0 rows deleted.


Commit complete.


Table created.


1 row deleted.


1 row created.

<省略>
Oracle Expression Filter
. VALID 11.2.0.4.0 00:00:05
Oracle Rules Manager
. VALID 11.2.0.4.0 00:00:04
Oracle Application Express
. INVALID 3.2.1.00.10
Final Actions
. 00:00:00
Total Upgrade Time: 00:27:21

PL/SQL procedure successfully completed.

SQL>
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
SQL> commit;

Commit complete.

SQL>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> DOC
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC> The above sql script is the final step of the upgrade. Please
DOC> review any errors in the spool log file. If there are any errors in
DOC> the spool file, consult the Oracle Database Upgrade Guide for
DOC> troubleshooting recommendations.
DOC>
DOC> Next restart for normal operation, and then run utlrp.sql to
DOC> recompile any invalid application objects.
DOC>
DOC> If the source database had an older time zone version prior to
DOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgrade
DOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shipped
DOC> with Oracle.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SQL>
SQL> Rem Set errorlogging off
SQL> SET ERRORLOGGING OFF;
SQL>
SQL> REM END OF CATUPGRD.SQL
SQL>
SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.
SQL> REM This forces user to start a new sqlplus session in order
SQL> REM to connect to the upgraded db.
SQL> exit ★catupgrd.sql was done.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@db11204 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 26 10:33:35 2018

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

Connected to an idle instance.

SQL> startup ★startup new DB
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1073744936 bytes
Database Buffers 570425344 bytes
Redo Buffers 7094272 bytes
Database mounted.
Database opened. ★new DB was open.Change initial parameter as your spectation.
SQL> show parameter diag ★In my case , I want to change diagnostic_dest.

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest string /u01/app
SQL> alter system set diagnostic_dest='/u01/app/oracle'; ★change

System altered.

SQL>
SQL> show parameter contr ★and location of control file

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/app/oradata/orcl/control0
1.ctl, /u01/app/flash_recovery
_area/orcl/control02.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> alter system set control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/flash_recovery_area/orcl/control02.ctl' scope=spfile; ★Change

System altered.

SQL> shutdown immediate ★shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host cp /u01/app/oradata/orcl/control01.ctl /u01/app/oracle/oradata/orcl/control01.ctl ★CP to new location.

SQL> startup ★startup
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 973081640 bytes
Database Buffers 671088640 bytes
Redo Buffers 7094272 bytes
Database mounted.
Database opened.
SQL> show parameter contr

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/app/oracle/oradata/orcl/c
ontrol01.ctl, /u01/app/flash_r
ecovery_area/orcl/control02.ct
l ★OK
control_management_pack_access string DIAGNOSTIC+TUNING