Professional Documents
Culture Documents
11g To 12c Upgrade
11g To 12c Upgrade
▼
Upgrade Database from 11g to 12c manually and then moving
▼ 2017 (11)
▼
▼ October (3)
a Non Container Database (Non CDB) to Container Database
log file sync Oracle (CDB as PDB):
foreground
processes ...
Current ORACLE_HOME= /u00/app/oracle/product/11.2.0/db_1
NoSQL Data Target ORACLE_HOME= /u00/app/oracle/product/12.1.0/database
Modeling
Techniques
Download 12c binaries and unzip in new home:
Upgrade Database
from 11g to 12c
manually and -rwxr-xr-x 1 oracle oinstall 1673544724 Dec 19 10:18
then... linuxamd64_12102_database_1of2.zip
► -rwxr-xr-x 1 oracle oinstall 1014530602 Dec 19 10:20
► February (7)
linuxamd64_12102_database_2of2.zip
►
► January (1)
►
► 2016 (47) Install 12c Database software :
BANK-> cd /u00/app/oracle/product/12.1.0/database/
BANK-> ./runInstaller oracle.install.option=INSTALL_DB_SWONLY \
> ORACLE_BASE=/u00/app/oracle \
> ORACLE_HOME=/u00/app/oracle/product/12.1.0/database \
> UNIX_GROUP_NAME=oinstall \
> oracle.install.db.DBA_GROUP=dba \
> oracle.install.db.OPER_GROUP=oper \
> oracle.install.db.BACKUPDBA_GROUP=dba \
> oracle.install.db.DGDBA_GROUP=dba \
> oracle.install.db.KMDBA_GROUP=dba \
> FROM_LOCATION=../stage/products.xml \
> INVENTORY_LOCATION=/u00/app/oraInventory \
> SELECTED_LANGUAGES=en \
> oracle.install.db.InstallEdition=EE \
> DECLINE_SECURITY_UPDATES=true -silent -waitForCompletion
Sample output:
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 1512 MB Passed
Checking swap space: must be greater than 150 MB. Actual 15297 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-
19_02-00-46PM. Please wait ...
PRECHECKS:
COMP_ID STATUS
------------------------------ -----------
CATALOG VALID
CATPROC VALID
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 1/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
and owner = 'SYSTEM';
OBJECT_NAME OBJECT_TYPE
--------------------------------------------------- -------------------
DBMS_REPCAT_AUTH PACKAGE BODY
AQ$_SCHEDULES_PRIMARY INDEX
AQ$_SCHEDULES TABLE
DBMS_REPCAT_AUTH PACKAGE
If you found any other objects other than these four, then investigate or
cleanup those objects owned by sys and system.
sql>@utlrp.sql;
SQL> @preupgrd.sql;
Sample Output:
SQL> @preupgrd.sql;
Loading Pre-Upgrade Package...
***************************************************************************
Executing Pre-Upgrade Checks in UPGRD...
***************************************************************************
************************************************************
The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
prior to attempting your upgrade.
Failure to do so will result in a failed upgrade.
************************************************************
************************************************************
ACTIONS REQUIRED:
************************************************************
***************************************************************************
Pre-Upgrade Checks in UPGRD Completed.
***************************************************************************
***************************************************************************
***************************************************************************
SQL> @/u00/app/oracle/cfgtoollogs/UPGRD/preupgrade/preupgrade_fixups.sql
Sample Output:
SQL> @/u00/app/oracle/cfgtoollogs/UPGRD/preupgrade/preupgrade_fixups.sql;
Pre-Upgrade Fixup Script Generated on 2016-12-19 15:15:25 Version: 12.1.0.2
Build: 006
Beginning Pre-Upgrade Fixups...
Executing in container UPGRD
**********************************************************************
Check Tag: DEFAULT_PROCESS_COUNT
Check Summary: Verify min process count is not too low
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 2/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
Fix Summary: Review and increase if needed, your PROCESSES value.
**********************************************************************
Fixup Returned Information:
WARNING: --> Process Count may be too low
Database has a maximum process count of 150 which is lower than the
default value of 300 for this release.
You should update your processes value prior to the upgrade
to a value of at least 300.
For example:
ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
or update your init.ora file.
**********************************************************************
**********************************************************************
Check Tag: EM_PRESENT
Check Summary: Check if Enterprise Manager is present
Fix Summary: Execute emremove.sql prior to upgrade.
**********************************************************************
Fixup Returned Information:
WARNING: --> Enterprise Manager Database Control repository found in the
database
**********************************************************************
Check Tag: AMD_EXISTS
Check Summary: Check to see if AMD is present in the database
Fix Summary: Manually execute ORACLE_HOME/oraolap/admin/catnoamd.sql script
to remove OLAP.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> OLAP Catalog(AMD) exists in database
**********************************************************************
Check Tag: APEX_UPGRADE_MSG
Check Summary: Check that APEX will need to be upgraded.
Fix Summary: Oracle Application Express can be manually upgraded prior to
database upgrade.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> Oracle Application Express (APEX) can be
manually upgraded prior to database upgrade
**********************************************************************
[Pre-Upgrade Recommendations]
**********************************************************************
*****************************************
********* Dictionary Statistics *********
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 3/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
*****************************************
**************************************************
************* Fixup Summary ************
no rows selected
VERSION
----------
14
For 12c, the new timezone is 18. So after the db upgrade is completed, we will
upgrade the dst timezone from 14 to 18.
8. Optimizer Statistics
no rows selected
no rows selected
13. Synchronize the Standby Database with the Primary Database When Upgrading
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 4/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
USERNAME DEFAULT_TABLESPACE
------------------------------ ------------------------------
SYSTEM SYSTEM
SYS SYSTEM
17. Check whether database has any externally authenticated SSL users
SQL> SELECT name, value from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\'
order by name;
no rows selected
================================================
UPGRADE:
lsnrctl stop
SQL>shutdown immediate
23. Move the spfile and password file from 11g oracle_home/dbs location to
12cHome/dbs location.
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> startup UPGRADE
SQL> exit
cd $ORACLE_HOME/rdbms/admin
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 5/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
$ORACLE_HOME/perl/bin/perl catctl.pl -n 6 -l $ORACLE_HOME/diagnostics
catupgrd.sql
Sample Output:
TESCOBANK-> $ORACLE_HOME/perl/bin/perl catctl.pl -n 6 -l
$ORACLE_HOME/diagnostics catupgrd.sql
cd /u00/app/oracle/product/12.1.0/database/diagnostics
tail -100f catupgrd0.log
Sample Output:
SQL> @utlu121s.sql
CATCTL REPORT =
/u00/app/oracle/product/12.1.0/database/cfgtoollogs/UPGRD/upgrade/upg_summary.
log
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 6/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
Oracle Application Express VALID 4.2.5.00.08 00:24:24
Final Actions 00:01:33
Post Upgrade 00:01:40
27.Run Catuppst.sql
The catuppst.sql script is run as part of the upgrade process unless the
upgrade returns errors during the process.
Check the log file for “BEGIN catuppst.sql” to verify that catuppst.sql ran
during the upgrade process. If catuppst.sql has not run, then proceed to run
catuppst.sql as shown in this step.
Warning messages are also displayed when running catctl.pl indicating that
catuppst.sql was not run during the upgrade.
SQL>@catuppst.sql
$ cd DBMS_DST_scriptsV1.9
SQL> @countstatsTSTZ.sql
1 row selected.
1. SQL> @/u00/app/oracle/cfgtoollogs/UPGRD/preupgrade/postupgrade_fixups.sql;
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 7/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
ORACLE instance shut down.
Database altered.
NAME OPEN_MODE
--------- --------------------
UPGRD READ ONLY
SQL> BEGIN
DBMS_PDB.DESCRIBE(
pdb_descr_file => '/u02/backup/ora12c.xml');
END;
/
3. Shutdown the Non CDB Database, and login to CDB Database as SYS user
If the upgraded database is the only database on the current system, then you
need to create a Container Database (CDB) first
Once the CDB is created you can proceed with the next step.
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 8/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
53% complete
62% complete
70% complete
72% complete
Creating Pluggable Databases
78% complete
83% complete
100% complete
Look at the log file "/u00/app/oracle/cfgtoollogs/dbca/CONUPGRD/CONUPGRD.log"
for further details.
TESCOBANK-> vi "/u00/app/oracle/cfgtoollogs/dbca/CONUPGRD/CONUPGRD.log"
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options
NAME OPEN_MODE
--------- --------------------
CONUPGRD READ WRITE
PDB_ID CON_UID
---------- ----------
PDB_NAME
------------------------------------------------------------------------------
--
2 2721201891
PDB$SEED
3 105835700
PDBUPGRD1
4 2418664579
PDBUPGRD2
CON_ID NAME
---------- -------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------------------
1 /u02/oradata/CONUPGRD/users01.dbf
1 /u02/oradata/CONUPGRD/sysaux01.dbf
1 /u02/oradata/CONUPGRD/undotbs01.dbf
1 /u02/oradata/CONUPGRD/system01.dbf
2 /u02/oradata/CONUPGRD/pdbseed/system01.dbf
2 /u02/oradata/CONUPGRD/pdbseed/sysaux01.dbf
3 /u02/oradata/CONUPGRD/pdbupgrd1/system01.dbf
3 /u02/oradata/CONUPGRD/pdbupgrd1/sysaux01.dbf
3 /u02/oradata/CONUPGRD/pdbupgrd1/pdbupgrd1_users01.dbf
4 /u02/oradata/CONUPGRD/pdbupgrd2/system01.dbf
4 /u02/oradata/CONUPGRD/pdbupgrd2/sysaux01.dbf
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 9/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
4 /u02/oradata/CONUPGRD/pdbupgrd2/pdbupgrd2_users01.dbf
On CDB , Create the PDB Database by mapping the XML file that Is generated in
step 2
NAME OPEN_MODE
--------- --------------------
CONUPGRD READ WRITE
5. Connect to the new PDB that has been created on CDB Database as SYS, and
execute the "noncdb_to_pdb.sql" script.
Session altered.
SQL> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql
NAME OPEN_MODE
------------------------------ ----------
ORA12C READ WRITE
1 row selected.
NAME OPEN_MODE
--------- --------------------
CONUPGRD READ WRITE
No comments:
Post a Comment
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 10/11
4/25/2019 Vishwanath Nayak (OCM,OCE) : Upgrade Database from 11g to 12c manually and then moving a Non Container Database (Non C…
nayakvishwanath.blogspot.com/2017/10/upgrade-database-from-11g-to-12c.html 11/11