Professional Documents
Culture Documents
Environment Detail’s
SQL> commit;
Commit complete.
[oracle@gg-11 ~]$ cd
/u01/app/oracle/fast_recovery_area/ORADBWR/backupset/2018_08_03/
[oracle@gg-11 2018_08_03]$ scp
o1_mf_nnndf_TAG20180803T012705_fp6rjkt8_.bkp
o1_mf_annnn_TAG20180803T012751_fp6rkz5m_.bkp
oracle@192.168.2.157:/u01/app/oracle/fast_recovery_area/ORADBWR/bac
kupset/2018_08_03/
oracle@192.168.2.157's password:
o1_mf_nnndf_TAG20180803T012705_fp6rjkt8_.bkp 100% 993MB 26.8MB/s
00:37
o1_mf_annnn_TAG20180803T012751_fp6rkz5m_.bkp 100% 3072 3.0KB/s
00:00
[oracle@gg-11 2018_08_03]$ cd
/u01/app/oracle/fast_recovery_area/ORADBWR/autobackup/
[oracle@gg-11 autobackup]$ scp
2018_08_03/o1_mf_s_983150872_fp6rl0lw_.bkp
oracle@192.168.2.157:/u01/app/oracle/fast_recovery_area/ORADBWR/aut
obackup/
oracle@192.168.2.157's password:
o1_mf_s_983150872_fp6rl0lw_.bkp
Step5:- Create and copy the pfile $ passwordfile from source 11g to
destination 12c
[oracle@gg-11 dbs]$ scp orapworadbwr initoradbwr.ora
oracle@192.168.2.157:/u01/app/oracle/product/12.2.0/dbhome_2/dbs
oracle@192.168.2.157’s password:
orapworadbwr 100% 1536 1.5KB/s 00:00
initoradbwr.ora 100% 1046 1.0KB/s 00:00
2.Oracle Database 12c Restore
Step6:-Change the pfile parameters for 12c database
compatible=’12.2.0.1.0′
RMAN> run {
set until sequence = 11; (this sequence number i get from 11g DB)
recover database;
}
TIMESTAMP
-------------------------------------------------------------------
-------------
COMP_TIMESTAMP UTLRP_BGN 2018-08-03 05:24:35
DOC> The following PL/SQL block invokes UTL_RECOMP to recompile
invalid
DOC> objects in the database. Recompilation time is proportional to
the
DOC> number of invalid objects in the database, so this command may
take
DOC> a long time to execute on a database with a large number of
invalid
DOC> objects.
DOC>
DOC> Use the following queries to track recompilation progress:
DOC>
DOC> 1. Query returning the number of invalid objects remaining.
This
DOC> number should decrease with time.
DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC> 2. Query returning the number of objects compiled so far. This
number
DOC> should increase with time.
DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC> This script automatically chooses serial or parallel
recompilation
DOC> based on the number of CPUs available (parameter cpu_count)
multiplied
DOC> by the number of threads per CPU (parameter
parallel_threads_per_cpu).
DOC> On RAC, this number is added across all RAC nodes.
DOC>
DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC> recompilation. Jobs are created without instance affinity so
that they
DOC> can migrate across RAC nodes. Use the following queries to
verify
DOC> whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC> 1. Query showing jobs created by UTL_RECOMP
DOC> SELECT job_name FROM dba_scheduler_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC> 2. Query showing UTL_RECOMP jobs that are running
DOC> SELECT job_name FROM dba_scheduler_running_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
PL/SQL procedure successfully completed.
TIMESTAMP
-------------------------------------------------------------------
-------------
COMP_TIMESTAMP UTLRP_END 2018-08-03 05:33:52
DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the
error
DOC> messages reported with each object (using SHOW ERRORS) to see
if they
DOC> point to system misconfiguration or resource constraints that
must be
DOC> fixed before attempting to recompile these objects.
DOC>#
OBJECTS WITH ERRORS
-------------------
0
Function created.
PL/SQL procedure successfully completed.
Function dropped.
...Starting validation 05:34:07
...Database user "SYS", database schema "APEX_050000", user# "121"
05:34:07
...grant execute on "SYS"."DBMS_CRYPTO_INTERNAL" to APEX_050000
05:34:10
...272 packages
...265 package bodies
...465 tables
...8 functions
...16 procedures
...4 sequences
...497 triggers
...1582 indexes
...255 views
...0 libraries
...14 types
...5 type bodies
...0 operators
...0 index types
...Begin key object existence check 05:34:17
...Completed key object existence check 05:34:17
...Setting DBMS Registry 05:34:17
...Setting DBMS Registry Complete 05:34:17
...Exiting validate 05:34:17
PL/SQL procedure successfully completed
COMP_NAME VERSION
---------------- ------------------------------
Oracle Database Catalog Views 12.2.0.1.0
Oracle Database Packages and Types 12.2.0.1.0
JServer JAVA Virtual Machine 12.2.0.1.0
Oracle XDK 12.2.0.1.0
Oracle Database Java Packages 12.2.0.1.0
OLAP Analytic Workspace 12.2.0.1.0
Oracle Workspace Manager 12.2.0.1.0
Oracle Text 12.2.0.1.0
Oracle XML Database 12.2.0.1.0
Oracle Multimedia 12.2.0.1.0
Spatial 12.2.0.1.0
Oracle OLAP API 12.2.0.1.0
Oracle Application Express 5.0.4.00.12
13 rows selected.
Successfully upgrade to 12c database