facebook twitter youtube facebook facebook facebook

E-Mail : info@askmlabs.com

Phone : +1.215.353.8306

Latest Post

OEM 12C CLOUD CONTROL INSTALLATION - Advanced Option

Written By askMLabs on Sunday, March 2, 2014 | 5:58 AM

In this article, we will see 12c oem grid control installation. There are two types of installations for oem grid control, simple installation and advanced installation. We are going to see advanced installation in this article.

  1. 1.Software
  2. 2.OS installation
  3. 3.Database Installation
  4. 4.Oem 12c Prerequisites
    1. a.Hardware Requirements
    2. b.Operating System Requirements
    3. c.Package Requirements
    4. d.Kernel Parameter Requirements
    5. e.Library Requirements
    6. f.Operating System Groups and Users Requirements
    7. g.Unique Host Name and Static IP Address Requirements
    8. h.Temporary Directory Space Requirements
    9. i.Central Inventory Requirements
    10. j.UMASK Value Requirements
    11. k.File Descriptor Requirements
    12. l.Existing Database Version Requirements
    13. m.Host File Requirements
    14. n.Port Requirements
  5. 5.Oem 12c Installation Procedure
  6. 6.Verification Checks
  7. 7.Starting and Stopping oem 12c Services

1. Software : 
The required software for the oem 12c cloud control are :

  • CentOS 6.5 (x86_64)  Download
  • Oracle Database 12c (x86_64)  Download
  • Enterprise Manager Cloud Control 12c (12.1.0.3) (x86_64) Download

2. OS Installation :
We are using CentOS 6.5 for this installation. Please download the latest software and install OS. While installing the OS select the option to install database server, so the most of the required rpms will be installed by default.

3. Database Installation :
Please follow my article Database 12c Installation on CentOS 6.5 for database installation. We need to have the database installed for oem 12c installation. It is called oracle management repository. Oracle database 12c is not yet certified with the oem 12c at the time i am writing this article. But i used database 12c as OMR for oem 12c installation.
Please complete all the following pre-requisite on OMR
[oracle@fsrsrv10 oem12c]$ sqlplus '/as sysdba'
SQL*Plus: Release 12.1.0.1.0 Production on Mon Feb 24 03:04:33 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> sho parameter session_cached
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
session_cached_cursors               integer     50
SQL> sho parameter shared_
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
max_shared_servers                   integer
shared_memory_address                integer     0
shared_pool_reserved_size            big integer 95630131
shared_pool_size                     big integer 0
shared_server_sessions               integer
shared_servers                       integer     1
SQL> alter system set session_cached_cursors=200 scope=both;
alter system set session_cached_cursors=200 scope=both
                 *
ERROR at line 1:
ORA-02096: specified initialization parameter is not modifiable with this
option

SQL> desc v$log
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 GROUP#                                             NUMBER
 THREAD#                                            NUMBER
 SEQUENCE#                                          NUMBER
 BYTES                                              NUMBER
 BLOCKSIZE                                          NUMBER
 MEMBERS                                            NUMBER
 ARCHIVED                                           VARCHAR2(3)
 STATUS                                             VARCHAR2(16)
 FIRST_CHANGE#                                      NUMBER
 FIRST_TIME                                         DATE
 NEXT_CHANGE#                                       NUMBER
 NEXT_TIME                                          DATE
 CON_ID                                             NUMBER
SQL> desc v$logname
ERROR:
ORA-04043: object v$logname does not exist

SQL> desc v$logfile
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 GROUP#                                             NUMBER
 STATUS                                             VARCHAR2(7)
 TYPE                                               VARCHAR2(7)
 MEMBER                                             VARCHAR2(513)
 IS_RECOVERY_DEST_FILE                              VARCHAR2(3)
 CON_ID                                             NUMBER
SQL> select group#,thread#,bytes/1024/1024 from v$log;
    GROUP#    THREAD# BYTES/1024/1024
---------- ---------- ---------------
         1          1              50
         2          1              50
         3          1              50
SQL> select group#,thread#,MEMBERS,bytes/1024/1024 from v$log;
    GROUP#    THREAD#    MEMBERS BYTES/1024/1024
---------- ---------- ---------- ---------------
         1          1          1              50
         2          1          1              50
         3          1          1              50
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/home/apps/oem12c/oradata/oem12c/redo03.log
/home/apps/oem12c/oradata/oem12c/redo02.log
/home/apps/oem12c/oradata/oem12c/redo01.log
SQL> alter database add logfile thread 1 group 4 ('/home/apps/oem12c/oradata/oem12c/redo04.log') size 300M;
Database altered.
SQL> alter database add logfile thread 1 group 5 ('/home/apps/oem12c/oradata/oem12c/redo05.log') size 300M;
Database altered.
SQL> alter database add logfile thread 1 group 6 ('/home/apps/oem12c/oradata/oem12c/redo06.log') size 300M;
Database altered.
SQL> select member,status  from v$logfile;
MEMBER
--------------------------------------------------------------------------------
STATUS
-------
/home/apps/oem12c/oradata/oem12c/redo03.log

/home/apps/oem12c/oradata/oem12c/redo02.log

/home/apps/oem12c/oradata/oem12c/redo01.log


MEMBER
--------------------------------------------------------------------------------
STATUS
-------
/home/apps/oem12c/oradata/oem12c/redo04.log

/home/apps/oem12c/oradata/oem12c/redo05.log

/home/apps/oem12c/oradata/oem12c/redo06.log


6 rows selected.
SQL> select group#,thread#,MEMBERS,status,bytes/1024/1024 from v$log;
    GROUP#    THREAD#    MEMBERS STATUS           BYTES/1024/1024
---------- ---------- ---------- ---------------- ---------------
         1          1          1 INACTIVE                      50
         2          1          1 CURRENT                       50
         3          1          1 INACTIVE                      50
         4          1          1 UNUSED                       300
         5          1          1 UNUSED                       300
         6          1          1 UNUSED                       300
6 rows selected.
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database drop logfile group 3;
Database altered.
SQL> atler system switch logfile;
SP2-0734: unknown command beginning "atler syst..." - rest of line ignored.
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;
System altered.
SQL> select group#,thread#,MEMBERS,status,bytes/1024/1024 from v$log;
    GROUP#    THREAD#    MEMBERS STATUS           BYTES/1024/1024
---------- ---------- ---------- ---------------- ---------------
         2          1          1 INACTIVE                      50
         4          1          1 CURRENT                      300
         5          1          1 UNUSED                       300
         6          1          1 UNUSED                       300
SQL> alter database drop logfile group 2;
Database altered.
SQL> select group#,thread#,MEMBERS,status,bytes/1024/1024 from v$log;
    GROUP#    THREAD#    MEMBERS STATUS           BYTES/1024/1024
---------- ---------- ---------- ---------------- ---------------
         4          1          1 CURRENT                      300
         5          1          1 UNUSED                       300
         6          1          1 UNUSED                       300
SQL> alter system set session_cached_cursors=250 scope=spfile;
System altered.
SQL> alter system set shared_pool_size=600M scope=spfile;
System altered.
SQL>


SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.5132E+10 bytes
Fixed Size                  3092488 bytes
Variable Size            1040191480 bytes
Database Buffers         1.4059E+10 bytes
Redo Buffers               29700096 bytes
Database mounted.
Database opened.
SQL> sho parameter session_cached_cursors
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
session_cached_cursors               integer     250
SQL> sho parameter shared_pool_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 608M
SQL>
4.OEM 12c Pre-Requisites : 
4.a Hardware requirements : CPU, RAM, Heap Size, and Hard Disk Space requirements vary depending on the type of installation we are choosing. Please review the here to know the exact hardware requirements.

4.b Operating System Requirements :
Ensure that you install Enterprise Manger Cloud Control only on certified operating system as mentioned in the Enterprise Manager Certification Matrix.

4.c Package Requirements: Though we are using CentOS6.5, we will follow Linux 6.x requirement for the installation.
For OMS : 
Platform
64-Bit Packages for 64-Bit Platform
Oracle Linux 6.x
(Red Hat 6 Kernel and Unbreakable Enterprise Kernel (UEK))


  • make-3.81
  • binutils-2.20.51.0.2-5.11
  • gcc-4.4.4
  • libaio-0.3.107
  • glibc-common-2.12-1
  • libstdc++-4.4.4
  • libXtst-1.0.99.2-3.el6.x86_64.rpm
  • sysstat-9.0.4
  • glibc-devel-2.12-1.7.el6.i686 (This is a 32-bit package)
  • glibc-devel-2.12-1.7.el6.x86_64 (This is a 64-bit package)
  • (Applicable only for Oracle Linux 6.2, which includes RH6.2 and UEK 6.2) glibc-2.12-1.47.0.2

For Agent : 
Platform
64-Bit Packages for 64-Bit Platform
Oracle Linux 6.x
(Red Hat 6 Kernel and Unbreakable Enterprise Kernel (UEK))
  • make-3.81
  • binutils-2.20.51.0.2-5.11
  • gcc-4.4.4
  • libaio-0.3.107
  • glibc-common-2.12-1.7
  • libstdc++-4.4.4
  • sysstat-9.0.4
4.d Kernel Parameter Requirements
For installing an OMS or a Management Agent on Unix operating systems (32-bit or 64-bit), set the kernel.shmmax parameter to a value 1 byte less than 4 GB or 4294967295.

4.e Library Requirements :
Install glibc-2.5.12 package

4.f.Operating System Groups and Users Requirements:
# /usr/sbin/groupadd oinstall
# /usr/sbin/useradd -g oinstall oracle
# passwd oracle

4.g Host Name and Static IP Address Requirements :
Ensure that you check the network configuration to verify that the host on which you are installing resolves to a unique host name and a static IP address that is visible to other hosts in the network.
You must use a static IP address. If you use a dynamic IP address, the installation might fail.
Ensure that the host name specified in /etc/hosts file is unique, and that it maps to the correct IP address. Following is the recommended format of the /etc/hosts file:
<ip address> <fully_qualified_host_name> <short_host_name>
If the DNS server is configured, then it should resolve the host name for the OMS machine correctly. For example, all these command must return the same output:
nslookup host1
nslookup host1.foo.com
nslookup 141.81.5.71

4.h.Temporary Directory Space Requirements :
Ensure that you allocate 400 MB of space for a temporary directory where the executables can be copied.

4.i.Central Inventory Requirements :
Ensure that you allocate 100 MB of space for the central inventory directory.
 Also ensure that the central inventory directory is not on a shared file system. If it is already on a shared file system, then switch over to a non-shared file system by following the instructions outlined in My Oracle Support note 1092645.1.
To determine whether the Oracle Inventory group exists, enter the following command:
     $ more /etc/oraInst.loc
     If the oraInst.loc file exists, then the output from this command looks like:
     inventory_loc=/u01/app/oracle/oraInventory
     inst_group=oinstall

4.j.UMASK Value Requirements:
Ensure that you set the default file mode creation mask (umask) to 022 in the shell startup file.

4.k.File Descriptor Requirements :
If the current value is less than 4096, then as root user, update the /etc/security/limits.conf file as shown below:
         <UID> soft nofile 4096
         <UID> hard nofile 4096

4.l.Existing Database Version Requirements :
Ensure that the database is patched with all the Patch Set Updates (PSU) or Critical Patch Updates (CPU) released for that release. Also ensure that you apply the patches.
The database can also have the Automatic Memory Management (AMM) feature enabled.

4.m.Host File Requirements :
Ensure that the host name specified in the /etc/hosts file is unique, and ensure that it maps to the correct IP address of that host. Otherwise, the installation can fail on the product-specific prerequisite check page.
The following is the recommended format of the /etc/hosts file:
<ip> <fully_qualified_host_name> <short_host_name>

4.n.Port Requirements :
Ensure that the ports you assign (within the given range) to the following components are free and available:
    • Admin Server HTTP SSL Port = 7101 - 7200
    • Enterprise Manager Upload HTTP Port = 4889 - 4898
    • Enterprise Manager Upload HTTP SSL Port = 1159, 4899 - 4908
    • Enterprise Manager Central Console HTTP Port = 7788 - 7798
    • Enterprise Manager Central Console HTTP SSL Port = 7799 - 7809
    • Oracle Management Agent Port = 3872, 1830 - 1849
    • Node Manager = 7101 - 7200
    • Managed Server HTTP Port = 7201 - 7300
    • Managed Server HTTPS Port = 7301 - 7400
5. Oem 12cR3 Installation Procedure :(Advanced)















[root@fsrsrv10 apps]# /home/apps/oem12c/middleware/oms/allroot.sh

Starting to execute allroot.sh .........

Starting to execute /home/apps/oem12c/middleware/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /home/apps/oem12c/middleware/oms

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist

Creating /etc/oragchomelist file...
/home/apps/oem12c/middleware/oms
Finished execution of  /home/apps/oem12c/middleware/oms/root.sh ......


6.Verification Checks :
Access the following URL with sysman user and navigate to different pages to verify everything looks good.
                   https://<oms hostname>:7802/em

7.Starting and Stopping oem 12c Services :
Use the following commands to start all components :
    $ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
    $ export OMS_HOME=/u01/app/oracle/Middleware/oms
    $ export AGENT_HOME=/u01/app/oracle/Middleware/agent/core/12.1.0.3.0
    # Start everything
    $ $ORACLE_HOME/bin/sqlplus '/as sysdba'
    SQL> startup
 
    $lsnrctl start listener
    $ $OMS_HOME/bin/emctl start oms
    $ $AGENT_HOME/bin/emctl start agent

Use the following commands to stop all components :
    $ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
    $ export OMS_HOME=/u01/app/oracle/Middleware/oms
    $ export AGENT_HOME=/u01/app/oracle/Middleware/agent/core/12.1.0.3.0
    # Stop everything
   $  $OMS_HOME/bin/emctl stop oms -all
   $  $AGENT_HOME/bin/emctl stop agent
    $ $ORACLE_HOME/bin/sqlplus '/as sysdba'
    SQL> shut immediate
 
    $ $lsnrctl stop listener

Database Upgrade From 11204 to 12101 - Manual Steps

In this article, we will see the complete manual upgrade steps for database upgrade from 11204 to 12101. There is another article DATABASE UPGRADE FROM 11202 TO 12101 USING DBUA  which explains the database upgrade using DBUA utility. Manual upgrade helps you to understand the complete upgrade process and gives you complete control on the upgrade process. I am presenting both screen shots and also video demo which helps you to understand the complete upgrade process.

1. Following table gives you the upgrade path reference :
Source Database
Target Database
10.2.0.5
12.1.x
11.1.0.7
12.1.x
11.2.0.2 or higher
12.1.x
2. Complete the backup before proceeding with the upgrade.
3. Run the script dbupgdiag.sql for the integrity of the source database. Resolve any duplicate objects reported by this scripts following the NOTE.1030426.6. Also compile invalid objects if you find during this script using utlrp.sql.
Following commands helps you to check the invalids and database components status before proceeding with the upgrade.
set pagesize500
set linesize 100
select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name;
select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from dba_objects where status='INVALID' order by owner,object_type;
select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type ;


4. Pre-Upgrade Steps
4.1 Download the latest pre-upgrade utility from Note 884522.1 and extract it to any temporary directory. The extracted zip file contains the scripts preupgrd.sql and utluppkg.sql . You need to run the script preupgrd.sql in the source database. This scripts produced two xxx_fixup.sql scripts. Review these two scripts generated and take necessary actions. In my environment it generated 4 suggestions. I am presenting the session log for your reference below.
SQL> @preupgrd.sql
Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
      ************************************************************
Results of the checks are located at:
 /u01/app/oracle/cfgtoollogs/ORCL/preupgrade/preupgrade.log
Pre-Upgrade Fixup Script (run in source database environment):
 /u01/app/oracle/cfgtoollogs/ORCL/preupgrade/preupgrade_fixups.sql
Post-Upgrade Fixup Script (run shortly after upgrade):
 /u01/app/oracle/cfgtoollogs/ORCL/preupgrade/postupgrade_fixups.sql
      ************************************************************
         Fixup scripts must be reviewed prior to being executed.
      ************************************************************
      ************************************************************
                   ====>> USER ACTION REQUIRED  <<====
      ************************************************************
 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.
           You MUST resolve the above errors prior to upgrade
      ************************************************************
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 upgrade]$ vi /u01/app/oracle/cfgtoollogs/ORCL/preupgrade/preupgrade_fixups.sql
[oracle@db11204 upgrade]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.4.0 Production on Sat Mar 1 00:31:27 2014
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> @/u01/app/oracle/cfgtoollogs/ORCL/preupgrade/preupgrade_fixups.sql
Pre-Upgrade Fixup Script Generated on 2014-03-01 00:28:08  Version: 12.1.0.1 Build: 006
Beginning Pre-Upgrade Fixups...
PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

**********************************************************************
Check Tag:     DEFAULT_PROCESS_COUNT
Check Summary: Verify min process count is not too low
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.
**********************************************************************

PL/SQL procedure successfully completed.

**********************************************************************
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
     In Oracle Database 12c, Database Control is removed during
     the upgrade. To save time during the Upgrade, this action
     can be done prior to upgrading using the following steps after
     copying rdbms/admin/emremove.sql from the new Oracle home
   - Stop EM Database Control:
    $> emctl stop dbconsole
   - Connect to the Database using the SYS account AS SYSDBA:
   SET ECHO ON;
   SET SERVEROUTPUT ON;
   @emremove.sql
     Without the set echo and serveroutput commands you will not
     be able to follow the progress of the script.
**********************************************************************

PL/SQL procedure successfully completed.

**********************************************************************
Check Tag:     DBMS_LDAP_DEPENDENCIES_EXIST
Check Summary: Check for dependency on DBMS_LDAP package
Fix Summary:   Network Objects must be reviewed manually.
**********************************************************************
Fixup Returned Information:
WARNING: --> Existing DBMS_LDAP dependent objects
     Database contains schemas with objects dependent on DBMS_LDAP package.
     Refer to the Upgrade Guide for instructions to configure Network ACLs.
     USER APEX_030200 has dependent objects.
**********************************************************************

PL/SQL procedure successfully completed.

**********************************************************************
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
     Starting with Oracle Database 12c, OLAP Catalog component is desupported.
     If you are not using the OLAP Catalog component and want
     to remove it, then execute the
     ORACLE_HOME/olap/admin/catnoamd.sql script before or
     after the upgrade.
**********************************************************************

PL/SQL procedure successfully completed.

**********************************************************************
                      [Pre-Upgrade Recommendations]
**********************************************************************

PL/SQL procedure successfully completed.
                        *****************************************
                        ********* Dictionary Statistics *********
                        *****************************************
Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
    EXECUTE dbms_stats.gather_dictionary_stats;
^^^ MANUAL ACTION SUGGESTED ^^^

PL/SQL procedure successfully completed.

           **************************************************
                ************* Fixup Summary ************
 4 fixup routines generated INFORMATIONAL messages that should be reviewed.

PL/SQL procedure successfully completed.
**************** Pre-Upgrade Fixup Script Complete *********************
PL/SQL procedure successfully completed.
SQL>

If there are any suggestions returned by this script specific to your environment, you need to complete all those recommendations.
NOTE : You will also get preupgrd.sql script from the $ORACLE_HOME/rdbms/admin directory of the 12c home, if you already have installed by this time.
4.2 Check if you have any other privileges assigned to CONNECT role.(applicable only to 9.2 and 10.1)
SQL> SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP', 'LOGSTDBY_ADMINISTRATOR', 'ORDSYS', 'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY', 'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS', 'WMSYS', 'EXFSYS', 'SYSMAN', 'MDDATA', 'SI_INFORMTN_SCHEMA', 'XDB', 'ODM');
4.3 Check if you have any dependencies on Network Utility Packages 
SQL> SELECT * FROM DBA_DEPENDENCIES
WHERE referenced_name IN ('UTL_TCP','UTL_SMTP','UTL_MAIL','UTL_HTTP','UTL_
INADDR','DBMS_LDAP')
AND owner NOT IN ('SYS','PUBLIC','ORDPLUGINS');
4.4 Collect database links information. This will help incase if there is any need to downgrade your database for any foreseen issues. We will not be able to recover the encrypted passwords during downgrade.
SQL> SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)
||DECODE(U.NAME,'PUBLIC',Null, 'SYS','',U.NAME||'.')|| L.NAME||chr(10)
||'CONNECT TO ' || L.USERID || ' IDENTIFIED BY "'||L.PASSWORD||'" USING
'''||L.HOST||''''
||chr(10)||';' TEXT
FROM SYS.LINK$ L, SYS.USER$ U
WHERE L.OWNER# = U.USER#;
4.5 Verify the time zone.
Verify the time zone in your environment. The latest 12c versions brings time zone 18. If you plan to upgrade the time zone as part of your upgrade, refer the Note 1509653.1.
SELECT version FROM v$timezone_file;
4.6 Run following command to gather statistics in advance to avoid downtime during upgrade.
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
4.7 Verify that the MVs have completed their refresh before upgrade.
SQL> select s.obj#,o.obj#,s.containerobj#,lastrefreshdate,pflags,xpflags,o.name,o.owner#, bitand(s.mflags, 8) from obj$ o, sum$ s where o.obj# = s.obj# and o.type# = 42 AND bitand(s.mflags, 8) = 8;
4.8 Ensure that no datafiles are in recovery mode and in backup mode.
SQL> SELECT * FROM v$recover_file;
SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
4.9 If your database is OLTP and have distributed transactions runnings, make sure that the following query returns 0 rows.
SQL> SELECT * FROM dba_2pc_pending;
If you see any output for above query, use the following queries to resolve.
SQL> SELECT local_tran_id FROM dba_2pc_pending;
SQL> EXECUTE dbms_transaction.purge_lost_db_entry('');
SQL> COMMIT;
4.10 Purge recyclebin. Because the downtime during upgrade depends on the number of objects present in recyclebin. Also make sure all the cronjobs and any automated jobs are disabled till the completion of the upgrade.
SQL> PURGE DBA_RECYCLEBIN
4.11 Verify that the sys and system users have only SYSTEM as default  tablespace using the following command.
SQL> SELECT username, default_tablespace FROM dba_users WHERE username in ('SYS','SYSTEM');
4.12 Verify auditing tables data. The large auditing data also effects the upgrade downtime. So if you don't need auditing data in the upgraded database, purge the data using following commands.
SQL> SELECT owner,tablespace_name FROM dba_tables WHERE table_name='AUD$';
SQL> truncate table sys.aud$;
SQL> truncate table sys.fga_log$;
4.13 Remove the enterprise manager database control. 12c database is desupported for database control. It has got new tool, oracle enterprise manager express control. This also amounts to downtime for database upgrade. So please remove database control before starting the upgrade.
$emctl stop dbcontrol
SQL> @ ?/rdbms/admin/emremove.sql
5. Install 12c binaries 
Please follow the video to install the 12c binaries. Choose  software only install for 12c database installation. We will use these binaries to upgrade the existing database.















6. Start Upgrade
6.1 Copy the spfile or pfile from 11g oracle home to 12c home created in step 5.
6.2 Set 11g home and stop the listener from 11g home. Now set the 12c home, and start netca from 12c home and create a new listener. Verify that the new listener is started from new 12c home. Refer video for more information on how to create listener using netca.





6.3 Set 11g home and stop the database. Now set 12c home and start the database in upgrade mode.
SQL> shutdown immediate;  <=== From 11g home
$ export ORACLE_HOME=<location of Oracle 12.1>
$ export PATH=$ORACLE_HOME/bin:$PATH
$ export ORACLE_BASE=<Oracle_Base set during installation>
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> startup UPGRADE                  <== From 12c home
SQL> exit
6.4 Run the upgrade script catctl.pl
cd $ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl -n  6 -l $ORACLE_HOME/diagnostics catupgrd.sql
6.5 Run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu121s.sql which provides a summary of the upgrade at the end of the spool log.
$ sqlplus "/as sysdba"
SQL> STARTUP
SQL> @utlu121s.sql
6.6 Verify the invaild objects and run the utlrp.sql scripts for resolve any invalid objects. Also run dbupgdiag.sql to collect upgrade information.
7.Post upgrade Steps

  1. Change the profile value for oracle user to reflect the new oracle home.
  2. Remove any obsolete parameters from the spfile/pfile. Also set the new compatibility parameter to 12.0.0.
  3. Create new password file.
  4. Upgrade the recovery catalog after database upgrade.
  5. Upgrade time zone
8.Final verification steps
set pagesize500
set linesize 100
select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name;
select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from dba_objects where status='INVALID' order by owner,object_type;
select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type ;
select name,user,created,CDB,CON_ID,CON_DBID from v$database;
select instance_name,status from v$instance;
SELECT version FROM v$timezone_file;
SELECT dbms_xdb_config.gethttpsport FROM dual;
Database enterprise manager express control url :  https://<database-ip>:5500/em

Database Upgrade From 11202 to 12101 Using DBUA

Written By askMLabs on Tuesday, February 25, 2014 | 10:10 AM

In this article, i am going to explain the single standalone database upgrade from 11202 version to latest 12c (12101) version using DBUA.

When we use DBUA to upgrade your database, most of the upgrade tasks are automated.
The outlined action plan to upgrade database is given below, but all steps mentioned below are explained in detail in the video.

  1. 1. Verify all the components status

set pagesize500
set linesize 100
select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name;
  1. 2. Run dbupgdiag.sql : Note 556610.1
  2. 3. Disable the custom triggers that would fire before/after DDL and enable them after the upgrade is complete.
  3. 4. Take database backup.
  4. 5. Install database 12c software only installation in a new oracle home.
  5. 6. Copy preupgrd.sql file from new 12c home created in step 5 to any temporary location and run this script. This script creates two fixup scripts. Review those fixup scripts ( This step is optional ) - DBUA runs this step.
  6. 7. Check invalid objects and run utlrp.sql script if you have any invalids
  7.  8. Verify the time zone. Oracle database 12c brings time zone file 18. So you have the option, either you can upgrade time zone after completing database upgrade or during the database upgrade. Note 1522719.1
  8. 9. Gather optimizer statistics
  9. 10. Disable database vault  Note 453902.1
  10. 11. Truncate audit records ( to avoid hanging issues while upgrading)
SQL> truncate table sys.aud$;
SQL> truncate table sys.fga_log$;
  1. 12. Remove oem database control if you have configured in your environment.
sql> connect / as sysdba
sql> spool emremoval.log
sql>@emremove.sql
sql> spool off

  1. 13. Unset ORACLE_HOME and invoke DBUA from the 12c binaries installed in step5. 
  2. 14. Complete the upgrade database.
  3. 15. Verify for any invalid objects and run the utlrp.sql
  4. 16. Check if you have any special instructions specific to your environment and complete all the steps.
  5. 17. Post upgrade verification steps :

set pagesize500
set linesize 100
select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name;
select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from dba_objects where status='INVALID' order by owner,object_type;
select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type ;
select name,user,created,CDB,CON_ID,CON_DBID from v$database;
select instance_name,status from v$instance;
SELECT version FROM v$timezone_file;
SELECT dbms_xdb_config.gethttpsport FROM dual;
https://<database-ip>:5500/em
Logfile for upgrade are located : $ORACLE_BASE/cfgtoollogs/$ORACLE_SID

Please watch the video for more details on database upgrade from 11202 to 12101 using DBUA.

NOTE : This video is created with audio. Due to some technical issues, the audio is not recorded properly. Reference :  1516557.1
Hope this helps
SRI

Database 12c Installation on CentOS 6.5

Written By askMLabs on Monday, February 24, 2014 | 9:48 AM

In this article, i am going to show you the steps to install oracle database 12c on CentOS 6.5. Though CentOS 6.5 is officially not supported by oracle by its certification matrix, we do follow the same instructions that we use for OL6.x or RHEL6.x. 
You might be finding so many other places about the instructions with screen shots to install oracle database 12c, and this is just another place to find the same content. The actual purpose to create this database is to use for oem 12c installation. So just collected the installation screen shots to present if it helps some newbies.

Download the software for database 12c. Download

Complete all the following pre-requisites before starting the oracle database 12c installation.

1. Hardware requirement:
    RAM - 1.5 GB min
    Swap - 1.5*RAM ( this is optional, we can configure temporary swap )
    /tmp space - 1GB min
    ORACLE_HOME -- 6.5GB

2. Software Requirements : 
2.1 Check OS version and Kernel : 
[root@db12c ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@db12c ~]# uname -r
2.6.32-431.3.1.el6.x86_64
[root@db12c ~]#
2.2 Install all the required rpms. The following table lists all the required rpms for database 12c. This table is copied from the MOS ID 1587357.1
If you have configured YUM repository for your server, you can use the following commands to install rpms. Refer my other article to know how to configure YUM to your distribution.
yum install <rpm name>. 
If you don't have YUM configured, you need to copy all the below specified rpms from your CentOS 6.5 distribution CD and need to install manually.
rpm -ivh <rpm name>
OS Version
Patches/Packages
Kernel settings
Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6uek.x86_64 or later
Oracle Linux 6 with the Red Hat Compatible kernel: 2.6.32-71.el6.x86_64 or later
Red Hat Enterprise Linux 6: 2.6.32-71.el6.x86_64 or later
Red Hat Enterprise Linux 6 with the Unbreakable Enterprise Kernel: 2.6.32-100.28.5.el6.x86_64 or later
Reference :

binutils-2.20.51.0.2-5.11.el6 (x86_64)
glibc-2.12-1.7.el6 (x86_64)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libaio-0.3.107-10.el6 (x86_64)
libXext-1.1 (x86_64)
libXtst-1.0.99.2 (x86_64)
libX11-1.3 (x86_64)
libXau-1.0.5 (x86_64)
libxcb-1.5 (x86_64)
libXi-1.3 (x86_64)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
ksh  <== any version of ksh is acceptable
libstdc++-devel-4.4.4-13.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (x86_64)


Some depended RPMS for above listed packages

cloog-ppl.x86_64 0:0.15.7-1.2.el6
cpp.x86_64 0:4.4.6-4.el6
glibc-headers.x86_64 0:2.12-1.80.el6
kernel-headers.x86_64 0:2.6.32-279.el6
mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6
/etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
Note: This value limits concurrent outstanding requests and should be set to avoid I/O subsystem failures.
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

/etc/security/limits.conf
oracle   soft    nproc    2047
oracle   hard   nproc   16384
oracle   soft    nofile    1024
oracle   hard   nofile    65536
oracle   soft    stack    10240
oracle   hard   stack    10240


/etc/pam.d/login
session required pam_limits.so

/etc/profile
if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
    fi
fi

Session Log For Reference:
[root@db12c ~]# egrep --color 'Mem|Cache|Swap' /proc/meminfoMemTotal:       49423668 kB
MemFree:         7364136 kB
Cached:         34088520 kB
SwapCached:         8060 kB
SwapTotal:      24780792 kB
SwapFree:       23905912 kB
[root@db12c ~]# df -h /tmpFilesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/vg_db12c-lv_root   11G  5.1G  5.3G  50% /
[root@db12c ~]# df -h /homeFilesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/vg_db12c-lv_home  2.7T  641G  1.9T  25% /home
[root@db12c ~]# cat /etc/redhat-releaseCentOS release 6.5 (Final)
[root@db12c ~]# uname -r2.6.32-431.3.1.el6.x86_64
[root@db12c ~]#
[root@db12c ~]# rpm -qa | grep -i binutils-binutils-2.20.51.0.2-5.36.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i glibcglibc-devel-2.12-1.132.el6.i686
glibc-common-2.12-1.132.el6.x86_64
glibc-2.12-1.132.el6.x86_64
glibc-devel-2.12-1.132.el6.x86_64
glibc-headers-2.12-1.132.el6.x86_64
glibc-2.12-1.132.el6.i686
[root@db12c ~]# rpm -qa | grep -i libgcclibgcc-4.4.7-4.el6.x86_64
libgcc-4.4.7-4.el6.i686
[root@db12c ~]# rpm -qa | grep -i libstdc++libstdc++-4.4.7-4.el6.i686
libstdc++-4.4.7-4.el6.x86_64
libstdc++-devel-4.4.7-4.el6.x86_64
compat-libstdc++-33-3.2.3-69.el6.x86_64
compat-libstdc++-296-2.96-144.el6.i686
libstdc++-devel-4.4.7-4.el6.i686
[root@db12c ~]# rpm -qa | grep -i libaiolibaio-devel-0.3.107-10.el6.i686
libaio-0.3.107-10.el6.x86_64
libaio-devel-0.3.107-10.el6.x86_64
libaio-0.3.107-10.el6.i686
[root@db12c ~]# rpm -qa | grep -i libXextlibXext-1.3.1-2.el6.i686
libXext-devel-1.3.1-2.el6.x86_64
libXext-1.3.1-2.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i libXtstlibXtst-1.2.1-2.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i libX11libX11-1.5.0-4.el6.x86_64
libX11-common-1.5.0-4.el6.noarch
libX11-devel-1.5.0-4.el6.x86_64
libX11-1.5.0-4.el6.i686
[root@db12c ~]# rpm -qa | grep -i libXaulibXau-1.0.6-4.el6.i686
libXau-devel-1.0.6-4.el6.x86_64
libXau-1.0.6-4.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i libxcblibxcb-1.8.1-1.el6.i686
libxcb-devel-1.8.1-1.el6.x86_64
libxcb-1.8.1-1.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i libXilibXinerama-devel-1.1.2-2.el6.x86_64
libXinerama-1.1.2-2.el6.x86_64
libXi-devel-1.6.1-3.el6.x86_64
libXi-1.6.1-3.el6.i686
libXi-1.6.1-3.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i makeautomake-1.11.1-4.el6.noarch
MAKEDEV-3.24-6.el6.x86_64
perl-ExtUtils-MakeMaker-6.55-136.el6.x86_64
perl-Locale-Maketext-Simple-0.18-136.el6.x86_64
make-3.81-20.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i sysstatsysstat-9.0.4-22.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i compat-libcap1compat-libcap1-1.10-1.x86_64
[root@db12c ~]# rpm -qa | grep -i compat-libstdc++compat-libstdc++-33-3.2.3-69.el6.x86_64
compat-libstdc++-296-2.96-144.el6.i686
[root@db12c ~]# rpm -qa | grep -i gccgcc-4.4.7-4.el6.x86_64
libgcc-4.4.7-4.el6.x86_64
libgcc-4.4.7-4.el6.i686
gcc-gfortran-4.4.7-4.el6.x86_64
gcc-c++-4.4.7-4.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i gcc-c++gcc-c++-4.4.7-4.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i glibc-develglibc-devel-2.12-1.132.el6.i686
glibc-devel-2.12-1.132.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i kshpdksh-5.2.14-30.x86_64
[root@db12c ~]# rpm -qa | grep -i libstdc++-devellibstdc++-devel-4.4.7-4.el6.x86_64
libstdc++-devel-4.4.7-4.el6.i686
[root@db12c ~]# rpm -qa | grep -i libaio-devellibaio-devel-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6.x86_64
[root@db12c ~]#
[root@db12c ~]# rpm -qa | grep -i cloog-pplcloog-ppl-devel-0.15.7-1.2.el6.x86_64
cloog-ppl-0.15.7-1.2.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i cppcpp-4.4.7-4.el6.x86_64
abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64
cppunit-1.12.1-3.1.el6.x86_64
cppunit-doc-1.12.1-3.1.el6.x86_64
mcpp-2.7.2-4.1.el6.x86_64
cppunit-devel-1.12.1-3.1.el6.x86_64
libmcpp-2.7.2-4.1.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i glibc-headersglibc-headers-2.12-1.132.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i kernel-headerskernel-headers-2.6.32-431.3.1.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i mpfrmpfr-2.4.1-6.el6.x86_64
[root@db12c ~]# rpm -qa | grep -i pplpoppler-utils-0.12.4-3.el6_0.1.x86_64
wpa_supplicant-0.7.3-4.el6_3.x86_64
cloog-ppl-devel-0.15.7-1.2.el6.x86_64
poppler-0.12.4-3.el6_0.1.x86_64
poppler-qt4-0.12.4-3.el6_0.1.x86_64
cloog-ppl-0.15.7-1.2.el6.x86_64
gnome-python2-applet-2.28.0-5.el6.x86_64
gnome-applets-2.28.0-7.el6.centos.x86_64
ppl-devel-0.10.2-11.el6.x86_64
gdm-user-switch-applet-2.30.4-52.el6.x86_64
poppler-data-0.4.0-1.el6.noarch
ppl-0.10.2-11.el6.x86_64
[root@db12c ~]#

[root@db12c ~]# grep -i pam_limits.so  /etc/pam.d/loginsession required pam_limits.so
[root@db12c ~]#
[root@db12c ~]# gcc --versiongcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@db12c ~]# g++ --versiong++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@db12c ~]#
[root@db12c ~]#  hostnamedb12c.askmlabs.com
[root@db12c ~]#

2.3 Extract the software and start the installation











[root@db12c ~]# /home/apps/oem12c/product/12.1.0/dbhome_1/root.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /home/apps/oem12c/product/12.1.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@db12c ~]#




[root@db12c ~]# su - oracle
[oracle@db12c ~]$ ps -ef | grep -i pmonoracle    2598     1  0 Feb23 ?        00:00:02 ora_pmon_VIS
oracle   13254     1  0 01:09 ?        00:00:00 ora_pmon_oem12c
oracle   14186 14152  0 01:39 pts/2    00:00:00 grep -i pmon
[oracle@db12c ~]$ export ORACLE_SID=oem12c[oracle@db12c ~]$ export ORACLE_HOME=/home/apps/oem12c/product/12.1.0/dbhome_1[oracle@db12c ~]$ export PATH=$PATH:$ORACLE_HOME/bin[oracle@db12c ~]$ which sqlplus/home/apps/oem12c/product/12.1.0/dbhome_1/bin/sqlplus
[oracle@db12c ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 12.1.0.1.0 Production on Mon Feb 24 01:40:33 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name,user,created,CDB,CON_ID,CON_DBID from v$database;
NAME      USER                           CREATED   CDB     CON_ID   CON_DBID
--------- ------------------------------ --------- --- ---------- ----------
OEM12C    SYS                            24-FEB-14 NO           0  151531197
SQL> select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
---------------- ------------
oem12c           OPEN
SQL>

Reference : MOS ID  Note 1529864.1

Hope this helps
SRI
 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger