Showing posts with label 12cdatabase. Show all posts
Showing posts with label 12cdatabase. Show all posts

Friday, January 8, 2016

Resolving ORA-00392 During ALTER DATABASE OPEN RESETLOGS

Scenario

While attempting to open an Oracle database after recovery using:


SQL> alter database open resetlogs;
alter database open resetlogs
*

ERROR at line 1:
ORA-00392: log 4 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 4 thread 1:
'/oradata/datafile/fahdb/onlinelog/group_4.268.792016823'
ORA-00312: online log 4 thread 1:
'/oradata/datafile/fahdb/onlinelog/group_4.257.792016845'


Understanding the Issue

This error typically indicates that an online redo log file is invalid or partially cleared. Oracle cannot proceed with OPEN RESETLOGS because the log is unarchived and may contain incomplete or uncommitted transactions.

Resolution

To resolve this, we can safely clear the problematic log group—provided we are sure it's no longer needed for recovery. In my case, this was log group 4.

Step 1: Clear the Unarchived Log Group

SQL> alter database clear unarchived logfile group 4;

Database altered.

Step 2: Retry Opening the Database

Now that the corrupted/unusable log group has been cleared, retry opening the database:

SQL> alter database open resetlogs;

Step 3: Verify Database Status

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

SQL>

Important Considerations

Clearing logs is irreversible. Ensure all necessary recovery steps are complete and that the redo log group in question is not needed for point-in-time recovery.


Always have a valid backup before performing any operations involving redo log manipulation.


This is typically part of a manual recovery or restore process, especially when dealing with incomplete recovery scenarios.

Conclusion

Encountering ORA-00392 can be alarming, especially after a restore operation. However, understanding the purpose of redo logs and how to safely handle unarchived ones is critical. With the right approach, we can bring the database back online confidently and securely.


Sunday, June 29, 2014

Steps to Relink 12c Grid

Relinking the 12c Grid 

In this Practice have have used 2 Nodes with the Hp-ux Itanium as the O/S with the 12c grid and 12c database with The standard cluster .. Before starting the re linking process we need to stop all the cluster services running in all the Nodes ..check the CRS and make sure that the crs had been in all the Nodes

Step 1  Unlock the grid infrastructure 

We need to unlock all the nodes in the grid infrastructure to perform the relink .. the unlocking can be done by the O/S root user ..before unlock the grid make sure that all the services had been  stopped correctly
As the root user navigate to the GRID_HOME/crs/install directory and run the command  perl rootcrs.pl -unlock  In all the nodes
Node1
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/crs/install >perl rootcrs.pl -unlock
Using configuration parameter file: ./crsconfig_params
2014/06/29 11:50:07 CLSRSC-347: Successfully unlock /prod01/oracle/12.1.0/12.1.0/grid
root @ db01./prod01/oracle/12.1.0/12.1.0/grid/crs/install >
Node2
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/crs/install >perl rootcrs.pl -unlock
Using configuration parameter file: ./crsconfig_params
2014/06/29 11:53:39 CLSRSC-347: Successfully unlock /prod01/oracle/12.1.0/12.1.0/grid
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/crs/install >

Step 2 Relink for the grid owner[O/S]
Switch the user to the grid owner and set the environment variable for ORACLE_HOME and path for the grid user and navigate to ORACLE_HOME/bin and execute the command relink all in all the nodes 
Node1
oragrid @ db01/home/oragrid >echo $ORACLE_HOME
/prod01/oracle/12.1.0/12.1.0/grid
oragrid @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >relink all
writing relink log to: /prod01/oracle/12.1.0/12.1.0/grid/install/relink.log
Node2
oragrid @ db02/prod01/oracle/12.1.0/12.1.0/grid >echo $ORACLE_HOME
/prod01/oracle/12.1.0/12.1.0/grid
oragrid @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >relink all
writing relink log to: /prod01/oracle/12.1.0/12.1.0/grid/install/relink.log
Once the Re-link is done check the relink.log to find where any discard or any error Messages if there are error or discard messages fix the problem and move to next step .. else Proceed to the next step 

Step 3 Rootadd and rootcrs execution

Once the relink command had been successfully completed then we need to run the rootadd and rootcrs  again from the o/s root user

Run the rootadd_rdbms.sh from the GRID_HOME/rdbms/install as the root user run the command on all the nodes of the grid
Node1
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install >pwd
/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install >./rootadd_rdbms.sh
Node2
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install >pwd
/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/rdbms/install >./rootadd_rdbms.sh

After the execution of the rootadd_rdbms.sh we need to execute the perl rootcrs.pl -patch  it will start the all the Custer services .. we need to execute this command in all the nodes in the cluster
Node1
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/crs/install >perl rootcrs.pl -patch
Using configuration parameter file: ./crsconfig_params
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'db01'
CRS-2672: Attempting to start 'ora.evmd' on 'db01'
CRS-2676: Start of 'ora.mdnsd' on 'db01' succeeded
CRS-2676: Start of 'ora.evmd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db01'
CRS-2676: Start of 'ora.gpnpd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'db01'
CRS-2676: Start of 'ora.gipcd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db01'
CRS-2676: Start of 'ora.cssdmonitor' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db01'
CRS-2672: Attempting to start 'ora.diskmon' on 'db01'
CRS-2676: Start of 'ora.diskmon' on 'db01' succeeded
CRS-2789: Cannot stop resource 'ora.diskmon' as it is not running on server 'db01'
CRS-2676: Start of 'ora.cssd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db01'
CRS-2672: Attempting to start 'ora.ctssd' on 'db01'
CRS-2676: Start of 'ora.ctssd' on 'db01' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db01'
CRS-2676: Start of 'ora.asm' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db01'
CRS-2676: Start of 'ora.storage' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db01'
CRS-2676: Start of 'ora.crsd' on 'db01' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: db01
CRS-2672: Attempting to start 'ora.scan1.vip' on 'db01'
CRS-2672: Attempting to start 'ora.ons' on 'db01'
CRS-2672: Attempting to start 'ora.db01.vip' on 'db01'
CRS-2672: Attempting to start 'ora.db02.vip' on 'db01'
CRS-2672: Attempting to start 'ora.cvu' on 'db01'
CRS-2676: Start of 'ora.cvu' on 'db01' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'db01'
CRS-2676: Start of 'ora.db02.vip' on 'db01' succeeded
CRS-2676: Start of 'ora.db01.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'db01'
CRS-2672: Attempting to start 'ora.LISTENER_OMPRD.lsnr' on 'db01'
CRS-2676: Start of 'ora.ons' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'db01'
CRS-2672: Attempting to start 'ora.scan2.vip' on 'db01'
CRS-2676: Start of 'ora.LISTENER_OMPRD.lsnr' on 'db01' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'db01' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'db01' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'db01'
CRS-2676: Start of 'ora.scan2.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'db01'
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'db01' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.omprd.db' on 'db01'
CRS-2676: Start of 'ora.omprd.db' on 'db01' succeeded
CRS-6016: Resource auto-start has completed for server db01
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
Oracle Clusterware active version on the cluster is [12.1.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].

Node2
root @ db02.oasiserp.com/prod01/oracle/12.1.0/12.1.0/grid/crs/install >perl rootcrs.pl -patch
Using configuration parameter file: ./crsconfig_params
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'db02'
CRS-2672: Attempting to start 'ora.evmd' on 'db02'
CRS-2676: Start of 'ora.evmd' on 'db02' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db02'
CRS-2676: Start of 'ora.gpnpd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'db02'
CRS-2676: Start of 'ora.gipcd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db02'
CRS-2676: Start of 'ora.cssdmonitor' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db02'
CRS-2672: Attempting to start 'ora.diskmon' on 'db02'
CRS-2676: Start of 'ora.diskmon' on 'db02' succeeded
CRS-2789: Cannot stop resource 'ora.diskmon' as it is not running on server 'db02'
CRS-2676: Start of 'ora.cssd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db02'
CRS-2672: Attempting to start 'ora.ctssd' on 'db02'
CRS-2676: Start of 'ora.ctssd' on 'db02' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db02'
CRS-2676: Start of 'ora.asm' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db02'
CRS-2676: Start of 'ora.storage' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db02'
CRS-2676: Start of 'ora.crsd' on 'db02' succeeded
CRS-6017: Processing resource auto-start for servers: db02
CRS-2672: Attempting to start 'ora.ons' on 'db02'
CRS-2673: Attempting to stop 'ora.db02.vip' on 'db01'
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'db02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'db01'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'db01'
CRS-2677: Stop of 'ora.db02.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.db02.vip' on 'db02'
CRS-2677: Stop of 'ora.scan1.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'db02'
CRS-2676: Start of 'ora.db02.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'db02'
CRS-2672: Attempting to start 'ora.LISTENER_OMPRD.lsnr' on 'db02'
CRS-2676: Start of 'ora.scan1.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'db02'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db02' succeeded
CRS-2676: Start of 'ora.ons' on 'db02' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'db02' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db02'
CRS-2676: Start of 'ora.LISTENER_OMPRD.lsnr' on 'db02' succeeded
CRS-2676: Start of 'ora.asm' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.omprd.db' on 'db02'
CRS-2676: Start of 'ora.omprd.db' on 'db02' succeeded
CRS-6016: Resource auto-start has completed for server db02
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
Oracle Clusterware active version on the cluster is [12.1.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].
Step 4
check the cluster now all the services should be up automatically
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >./crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host
----------------------------------------------------------------------
ora....SM.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    db01
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    db01
ora.FLASH.dg   ora....up.type 0/5    0/     ONLINE    ONLINE    db01
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    db01
ora....RD.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    db01
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    db02
ora....N2.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    db01
ora....N3.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    db01
ora.asm        ora.asm.type   0/5    0/0    ONLINE    ONLINE    db01
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    db01
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    db01
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    db01
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    db01
ora.db01.ons   application    0/3    0/0    ONLINE    ONLINE    db01
ora.db01.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    db01
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    db02
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    db02
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    db02
ora.db02.ons   application    0/3    0/0    ONLINE    ONLINE    db02
ora.db02.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    db02
ora.gns        ora.gns.type   0/5    0/0    ONLINE    ONLINE    db01
ora.gns.vip    ora....ip.type 0/0    0/0    ONLINE    ONLINE    db01
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    db01
ora.oc4j       ora.oc4j.type  0/1    0/2    OFFLINE   OFFLINE
ora.omprd.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    db01
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    db01
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    db02
ora.scan2.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    db01
ora.scan3.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    db01





Wednesday, June 18, 2014

Converting 12c ASM to Flex ASM

Converting ASM to 12c FLEX ASM 

Converting the 12c non flex ASM to flex ASM
In this practice we had upgraded the 11gr2 grid to the 12c ..we can do the upgraed from 11g to 12c with the traditional asm and  once the upgrade is complete then we can convert the non flex asm to flex asm.
[Note] Once the ASM converted to flex ASM  then we cant convert back to the traditional ASM
 In 12c Both the asm types of asm are supported
As with out flex asm like the traditional asm we can run one asm instance in each RAC nodes ..  when we use the flex asm  the asm instance will be running in one node [or cordiality  which is set by us]
Here there are two different concepts introduced in the 12c.. Flex cluster's and Flex ASM both are different components  of  12c we can have flex asm with out flex cluster .. but enabling the flex cluster we need to have the flex asm enabled
The advantage of the flex ASM  we can separately have one instance for ASM and then it will communicate with all the RAC nodes and treat them as the client .. not like the traditional ASM that it is mandatory to have one asm instance running in all the RAC nodes
In this practice we have two cluster nodes running with the two asm instance .. once we finish the conversion we have one asm instance communication with the two database instance

Step 1
check the Mode of the ASM in the  12c
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N        1024   4096  4194304    819136   167912                0          167912              0             Y  DATA/
MOUNTED  EXTERN  N        1024   4096  4194304    511968   324560                0          324560              0             N  FLASH/

ASMCMD> showclustermode
ASM cluster : Flex mode disabled
ASMCMD>

oragrid @ db01/home/oragrid >asmcmd showclustermode
ASM cluster : Flex mode disabled


Step 2
Check the current ASM details before starting the conversion 

oragrid @ db01/home/oragrid >srvctl status asm -detail
ASM is running on db02,db01

ASM is enabled.

root @ db02/prod01/oracle/12.1.0/12.1.0/grid/bin >./srvctl status asm -detail
ASM is running on db02,db01

ASM is enabled.

oragrid @ db01/home/oragrid >srvctl config asm
ASM home: /prod01/oracle/12.1.0/12.1.0/grid
Password file:
ASM listener: LISTENER

oragrid @ db02./home/oragrid >srvctl config asm
ASM home: /prod01/oracle/12.1.0/12.1.0/grid
Password file:
ASM listener: LISTENER

Run the below query to find the attached ASM in each Node of the RAC 

SQL> SELECT instance_name, db_name, status FROM V$ASM_CLIENT;

INSTANCE_NAME                                                    DB_NAME  STATUS
---------------------------------------------------------------- -------- ------------
+ASM1                                                              +ASM       CONNECTED
OMPRD1                                                           OMPRD    CONNECTED
OMPRD1                                                           OMPRD    CONNECTED

SQL> SELECT instance_name, db_name, status FROM V$ASM_CLIENT;

INSTANCE_NAME                                                    DB_NAME  STATUS
---------------------------------------------------------------- -------- ------------
+ASM2                                                              +ASM     CONNECTED
OMPRD2                                                           OMPRD    CONNECTED
OMPRD2                                                           OMPRD    CONNECTED

Step 3

Changing compatibility mode of the ASM

Before starting the conversion of the asm to flex asm we need to Change the compatibility mode of the disk group to the 12 to enable the new features of the 12c 
Go to the Disk group tab through the asmca and select the disk group which we need to change the compatibility and select the edit attributes 
we can change the compatibility in two methods by using the asmca and by using the command line 


check the asm compatibility ASM the database compatibility  of the 12 c.. the default value will be displayed in the screen we need to update to the necessary values 


Query also to check the compatibility values of the asm diskgroup


SQL> SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat,
     substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP;
DISKGROUP                      ASM_COMPAT   DB_COMPAT
------------------------------ ------------ ------------
FLASH                          11.2.0.0.0   10.1.0.0.0
DATA                           11.2.0.0.0   10.1.0.0.0

Query to check the ASM disk group attributes 


SQL> SELECT SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name,
  2       SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg,
  3       V$ASM_ATTRIBUTE a WHERE dg.name = 'DATA' AND dg.group_number = a.group_number
  4       AND a.name NOT LIKE '%template%';

DISKGROUP    NAME                     VALUE                    READ_ON
------------ ------------------------ ------------------------ -------
DATA         disk_repair_time                       3.6h                       N
DATA         au_size                                     4194304                Y
DATA         access_control.umask               066                        N
DATA         access_control.enabled             FALSE                   N
DATA         cell.smart_scan_capable            FALSE                   N
DATA         compatible.rdbms                     10.1.0.0.0                N
DATA         compatible.asm                         11.2.0.0.0               N
DATA         sector_size                                1024                       Y

8 rows selected.

SQL>SELECT SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name,   
  2       SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg,
  3       V$ASM_ATTRIBUTE a WHERE dg.name = 'FLASH' AND dg.group_number = a.group_number
  4       AND a.name NOT LIKE '%template%';
DISKGROUP    NAME                     VALUE                    READ_ON
------------ ------------------------ ------------------------ -------
FLASH        disk_repair_time         3.6h                     N
FLASH        access_control.enabled   FALSE                    N
FLASH        cell.smart_scan_capable  FALSE                    N
FLASH        compatible.rdbms         10.1.0.0.0               N
FLASH        compatible.asm           11.2.0.0.0               N
FLASH        sector_size              1024                     Y
FLASH        au_size                  4194304                  Y
FLASH        access_control.umask     066                      N

8 rows selected.

change the compatibility version to the 12.1.0.0.0 in the asm compatibility column  and click ok to save the new value for the disk group 


once we are changing the compatibility mode in the asm then we can degrade the compatibility mode .. make sure that all the clients which is using the disk group is accessing by the 12.1 asm



In the manual command lime method we can give the below command with the appropriate attribute to change the value  
as we had already change the DATA disk group attribute by using the asmca now for the FLASH we can change by using the command line

SQL> ALTER DISKGROUP FLASH SET ATTRIBUTE 'compatible.asm' = '12.1';

Diskgroup altered.

SQL>  SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat,
     substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP;  2

DISKGROUP                      ASM_COMPAT   DB_COMPAT
------------------------------ ------------ ------------
FLASH                          12.1.0.0.0   10.1.0.0.0
DATA                           12.1.0.0.0   10.1.0.0.0

check the spfile is placed in the disk group before starting the conversion 

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/ommprod-cluster/asmparam
                                                 eterfile/registry.253.828933955

Step 4

Converting non flex asm to flex asm

start the asmca and check the asm instance page which has the information about the number for asm instance which is currently available in the cluster  



Step 5

clink the convert to oracle flex asm  a new pop up window will display the lan interconnects which can be used  for the  flex asm 

Select appropriate lan interconnect which had been configured as the cluster interconnect ip and verify the asm listener port the default port is 1521 and if needed we can change the port  


Step 6

Create the password file for the ASM  instance .. as the new feature of the 12c now the password files can be kept  in the disk groups in common so the asm clients can access the ASM 


we can create the new password file are we can use the existing password file as the input file and create the new password file in the disk group  which can be accessed by all asm clients 
Step 7

Moving the ASM password file into the Disk group 

orapwd input_file='/prod01/oracle/12.1.0/12.1.0/grid/dbs/orapwASM' file='+DATA/ASM/orapw+ASM' asm=y

oragrid @ db01/prod01/oracle/12.1.0/12.1.0/grid/dbs >0/grid/dbs/orapw+ASM' file='+DATA/ASM/orapw+ASM' asm=y                                      <
/usr/lib/hpux64/dld.so: Unable to find library 'libocrb12.so'.
Killed

Set the  LD_LIBRARY_PATH to access the particular library .. this error is caused due to the environment variable set up

oragrid @ db01/prod01/oracle/12.1.0/12.1.0/grid/lib >ll libocrb12.so
-rw-r--r--   1 root       oinstall   3808144 Dec 18  2013 libocrb12.so

set the LD_LIBRARY_PATH to $ORACLE_HOME/lib  or GRID_HOME/lib according to the home env variable  and try the command

If the compatibility Mode is not set as per Step 3 then this error occurs  .. when we upgrade the asm the default compatibility  of the ASM is set to the version before the upgrade we need to change the version to the 12.1 to enable the flex asm

oragrid @ db01/home/oragrid >orapwd input_file='/prod01/oracle/12.1.0/12.1.0/grid/dbs/orapw+ASM' file='+DATA/ASM/orapwASM' asm=y
OPW-00010: Could not create the password file.
ORA-15056: additional error message
ORA-15221: ASM operation requires compatible.asm of 12.1.0.0.0 or higher
ORA-06512: at line 4

All the ASM disk groups should be set to  the compatible mode to 12.1.0.0.0 the default compatible mode for the ASM is 11.2.0.0 we need to change the compatible mode to 12 as the password file can be store in the disk group was introduced in 12  
follow the previous steps  in Step 3 to change the comparability mode for the disk groups before moving the password file 

Create a new directory named ASM in the disk group which is going to store the password file 
oragrid @ db01/home/oragrid >asmcmd
ASMCMD> cd DATA
ASMCMD> ls
OMPRD/
ommprod-cluster/
spfileomprd.ora
ASMCMD> mkdir ASM
ASMCMD> ls
ASM/
OMPRD/
ommprod-cluster/
spfileomprd.ora
ASMCMD> exit


oragrid @ db01/home/oragrid >orapwd input_file='/prod01/oracle/12.1.0/12.1.0/grid/dbs/orapw+ASM' file='+DATA/ASM/orapwASM' asm=y
oragrid @ db01/home/oragrid >

check the newly create  password file by using the asmcmd

ASMCMD> ls -lt
Type      Redund  Striped  Time             Sys  Name
                                            Y    PASSWORD/
PASSWORD  UNPROT  COARSE   JUN 17 16:00:00  N    orapwasm => +DATA/ASM/PASSWORD/pwdasm.362.850494523

Now we can retry the conversion process to convert the asm to the Flex ASM
Once the password file is moved to the Disk group then we can resume the conversion of the ASM 




 

Step 8

Running the converttoFlexASM.sh script 



oragrid @ db01/prod01/oracle/12.1.0/oragrid/cfgtoollogs/asmca/scripts >ll
total 2
-rwxr-xr-x   1 oragrid    oinstall       530 Jun 17 16:39 converttoFlexASM.sh
oragrid @ db01/prod01/oracle/12.1.0/oragrid/cfgtoollogs/asmca/scripts >

Running the converttoFlexASM.sh script 

root @ db01.oasiserp.com/prod01/oracle/12.1.0/12.1.0/grid/bin >cd /prod01/oracle/12.1.0/oragrid/cfgtoollogs/asmca/scripts
root @ db01.oasiserp.com/prod01/oracle/12.1.0/oragrid/cfgtoollogs/asmca/scripts >./converttoFlexASM.sh
CRS-2673: Attempting to stop 'ora.crsd' on 'db01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'db01'
CRS-2673: Attempting to stop 'ora.omprd.db' on 'db01'
CRS-2673: Attempting to stop 'ora.LISTENER_OMPRD.lsnr' on 'db01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'db01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'db01'
CRS-2677: Stop of 'ora.LISTENER_OMPRD.lsnr' on 'db01' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.db01.vip' on 'db01'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'db01'
CRS-2677: Stop of 'ora.omprd.db' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'db01'
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'db01'
CRS-2677: Stop of 'ora.DATA.dg' on 'db01' succeeded
CRS-2677: Stop of 'ora.FLASH.dg' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'db01'
CRS-2677: Stop of 'ora.asm' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'db01'
CRS-2677: Stop of 'ora.scan1.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'db02'
CRS-2677: Stop of 'ora.db01.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.db01.vip' on 'db02'
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db01' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'db02'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'db02' succeeded
CRS-2676: Start of 'ora.db01.vip' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'db01'
CRS-2677: Stop of 'ora.ons' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'db01'
CRS-2677: Stop of 'ora.net1.network' on 'db01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'db01' has completed
CRS-2677: Stop of 'ora.crsd' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'db01'
CRS-2673: Attempting to stop 'ora.evmd' on 'db01'
CRS-2673: Attempting to stop 'ora.storage' on 'db01'
CRS-2677: Stop of 'ora.storage' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'db01'
CRS-2677: Stop of 'ora.ctssd' on 'db01' succeeded
CRS-2677: Stop of 'ora.asm' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'db01'
CRS-2677: Stop of 'ora.evmd' on 'db01' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'db01'
CRS-2677: Stop of 'ora.cssd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'db01'
CRS-2676: Start of 'ora.evmd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db01'
CRS-2676: Start of 'ora.cssdmonitor' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db01'
CRS-2672: Attempting to start 'ora.diskmon' on 'db01'
CRS-2676: Start of 'ora.diskmon' on 'db01' succeeded
CRS-2676: Start of 'ora.cssd' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'db01'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db01'
CRS-2676: Start of 'ora.ctssd' on 'db01' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db01'
CRS-2676: Start of 'ora.asm' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db01'
CRS-2676: Start of 'ora.storage' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db01'
CRS-2676: Start of 'ora.crsd' on 'db01' succeeded
Cluster bounced in node db01
CRS-2673: Attempting to stop 'ora.crsd' on 'db02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'db02'
CRS-2673: Attempting to stop 'ora.LISTENER_OMPRD.lsnr' on 'db02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'db02'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'db02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'db02'
CRS-2673: Attempting to stop 'ora.cvu' on 'db02'
CRS-2677: Stop of 'ora.LISTENER_OMPRD.lsnr' on 'db02' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'db02'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'db02' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'db02'
CRS-2677: Stop of 'ora.scan3.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'db01'
CRS-2677: Stop of 'ora.scan2.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'db01'
CRS-2676: Start of 'ora.scan3.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'db01'
CRS-2676: Start of 'ora.scan2.vip' on 'db01' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'db01'
CRS-2673: Attempting to stop 'ora.omprd.db' on 'db02'
CRS-2673: Attempting to stop 'ora.db02.vip' on 'db02'
CRS-2677: Stop of 'ora.db02.vip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.db02.vip' on 'db01'
CRS-2677: Stop of 'ora.omprd.db' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'db02'
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'db02'
CRS-2677: Stop of 'ora.DATA.dg' on 'db02' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'db01' succeeded
CRS-2677: Stop of 'ora.FLASH.dg' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'db02'
CRS-2677: Stop of 'ora.asm' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'db02'
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'db01' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db02' succeeded
CRS-2676: Start of 'ora.db02.vip' on 'db01' succeeded
CRS-2677: Stop of 'ora.cvu' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'db01'
CRS-2676: Start of 'ora.cvu' on 'db01' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'db02'
CRS-2677: Stop of 'ora.ons' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'db02'
CRS-2677: Stop of 'ora.net1.network' on 'db02' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'db02' has completed
CRS-2677: Stop of 'ora.crsd' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'db02'
CRS-2673: Attempting to stop 'ora.evmd' on 'db02'
CRS-2673: Attempting to stop 'ora.storage' on 'db02'
CRS-2677: Stop of 'ora.storage' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'db02'
CRS-2677: Stop of 'ora.ctssd' on 'db02' succeeded
CRS-2677: Stop of 'ora.asm' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'db02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'db02' succeeded
CRS-2677: Stop of 'ora.evmd' on 'db02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'db02'
CRS-2677: Stop of 'ora.cssd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'db02'
CRS-2676: Start of 'ora.evmd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db02'
CRS-2676: Start of 'ora.cssdmonitor' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db02'
CRS-2672: Attempting to start 'ora.diskmon' on 'db02'
CRS-2676: Start of 'ora.diskmon' on 'db02' succeeded
CRS-2676: Start of 'ora.cssd' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'db02'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db02'
CRS-2676: Start of 'ora.ctssd' on 'db02' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db02'
CRS-2676: Start of 'ora.asm' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db02'
CRS-2676: Start of 'ora.storage' on 'db02' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db02'
CRS-2676: Start of 'ora.crsd' on 'db02' succeeded
Cluster bounced in node db02
root @ db01.oasiserp.com/prod01/oracle/12.1.0/oragrid/cfgtoollogs/asmca/scripts >
Once the script is completed  then  once stop the cluster in all the nodes and start the cluster   we need to do this step because some time while bouncing the cluster there may be one or two proces which remains as zombi process .. so once you shutdown all the cluster . and check and conform no process exists from previous session and then start the cluster

Step 8 

Changing the cardinality of the FLEX ASM

we can set the cardinality of the asm according to the number of nodes
For two nodes  we  set the cardinality as one so asm will be running in one instance  and all the database instance will be communications with this asm instance
oragrid @ db01/home/oragrid >srvctl modify asm -count 1

oragrid @ db01home/oragrid >srvctl config asm
ASM home: /prod01/oracle/12.1.0/12.1.0/grid
Password file: +DATA/ASM/orapwasm
ASM listener: LISTENER
ASM instance count: 1
Cluster ASM listener: ASMNET1LSNR_ASM
oragrid @ db01.oasiserp.com/home/oragrid >

Query's to check the client connections in the FLEX ASM





SQL> SELECT instance_name, db_name, status FROM V$ASM_CLIENT;

INSTANCE_NAME                                                    DB_NAME  STATUS
---------------------------------------------------------------- -------- ------------
+ASM1                                                            +ASM     CONNECTED
OMPRD1                                                           OMPRD    CONNECTED
OMPRD1                                                           OMPRD    CONNECTED
OMPRD2                                                           OMPRD    CONNECTED
OMPRD2                                                           OMPRD    CONNECTED

SQL>

SQL>  select group_number,instance_name,status from gv$asm_client where DB_NAME='+ASM';

GROUP_NUMBER INSTANCE_NAME                                                    STATUS
------------ ---------------------------------------------------------------- ------------
           1 +ASM1                                                            CONNECTED


SQL> select distinct i.instance_name asm_instance_name, c.instance_name client_instance_name, c.db_name, c.status from gv$instance i, gv$asm_client c where i.inst_id=c.inst_id;

ASM_INSTANCE_NAM CLIENT_INSTANCE_NAME                                             DB_NAME  STATUS
---------------- ---------------------------------------------------------------- -------- ------------
+ASM1            +ASM1                                                            +ASM     CONNECTED
+ASM1            OMPRD1                                                           OMPRD    CONNECTED
+ASM1            OMPRD2                                                           OMPRD    CONNECTED


oragrid @ db01/home/oragrid >asmcmd lsct data
DB_Name  Status     Software_Version  Compatible_version  Instance_Name  Disk_Group
+ASM     CONNECTED        12.1.0.1.0          12.1.0.1.0  +ASM1          DATA
OMPRD    CONNECTED        12.1.0.1.0          11.2.0.0.0  OMPRD1         DATA
OMPRD    CONNECTED        12.1.0.1.0          11.2.0.0.0  OMPRD2         DATA


oragrid @ db01/home/oragrid >asmcmd lsct flash
DB_Name  Status     Software_Version  Compatible_version  Instance_Name  Disk_Group
OMPRD    CONNECTED        12.1.0.1.0          11.2.0.0.0  OMPRD1         FLASH
OMPRD    CONNECTED        12.1.0.1.0          11.2.0.0.0  OMPRD2         FLASH

SQL> select INST_ID,GROUP_NUMBER, INSTANCE_NAME, DB_NAME, INSTANCE_NAME||':'||DB_NAME client_id,
STATUS from gv$asm_client where DB_NAME = 'OMPRD';  2

   INST_ID GROUP_NUMBER INSTANCE_NAME        DB_NAME  CLIENT_ID                                                                 STATUS
---------- ------------ -------------------- -------- ------------------------------------------------------------------------- ------------
         1            1 OMPRD1               OMPRD    OMPRD1:OMPRD                                                              CONNECTED
         1            2 OMPRD1               OMPRD    OMPRD1:OMPRD                                                              CONNECTED
         1            1 OMPRD2               OMPRD    OMPRD2:OMPRD                                                              CONNECTED
         1            2 OMPRD2               OMPRD    OMPRD2:OMPRD                                                              CONNECTED

SQL> select INSTANCE_NUMBER,INSTANCE_NAME,STATUS, HOST_NAME from v$instance;

INSTANCE_NUMBER INSTANCE_NAME        STATUS       HOST_NAME
--------------- -------------------- ------------ ----------------------------------------------------------------
              1 +ASM1                STARTED      db01<domain>.com


IN this Above Practice we have converted  the flex ASM with out flex Cluster ..

FLEX ASM with out Flex Cluster

It is not mandatory to change the cluster to flex cluster  for converting the asm to flex asm with the standard cluster  oracle Flex asm can be used 


Note:-once you have converted the non flex asm to flex asm then you cant go back normal asm
          For enabling the flex cluster it is mandatory that ASM should be in FLEX ASM
          we can run the Flex ASM with out flex cluster



Monday, June 9, 2014

Upgrade 11.2.0.3 cluster to 12.1.0 cluster

Upgrading 11gr2 grid to 12c Grid

We have two node 11.2.0.3 Rac database with the 11.2.0.3 grid as the environment for this Practice The 11.2.0.3 can be directly upgrade to 12c as the out box box upgrade by creating the new grid_home for 12c   . The O/s we are using in this practice is hp-ux 11.31 for Itanium Servers'

Step 1

Check the cluster status before starting the upgrade and make sure the necessary services are running
oragrid @ db01/prod01/oracle/11.2.0/grid/bin >./crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    db01
ora.FLASH.dg   ora....up.type 0/5    0/     ONLINE    ONLINE    db01
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    db01
ora....RD.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    db01
ora....N1.lsnr ora....er.type 0/5    0/0    OFFLINE   OFFLINE
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    db01
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    db02
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    db01
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    db01
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    db01
ora.db01.gsd   application    0/5    0/0    OFFLINE   OFFLINE
ora.db01.ons   application    0/3    0/0    ONLINE    ONLINE    db01
ora.db01.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    db01
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    db02
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    db02
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    db02
ora.db02.gsd   application    0/5    0/0    OFFLINE   OFFLINE
ora.db02.ons   application    0/3    0/0    ONLINE    ONLINE    db02
ora.db02.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    db02
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    db01
ora.oc4j       ora.oc4j.type  0/1    0/2    OFFLINE   OFFLINE
ora.omprd.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    db01
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    db01
ora.scan1.vip  ora....ip.type 0/0    0/0    OFFLINE   OFFLINE

Step 2

Download the  below Software binaries for the  oracle cloud

Step 3

Minor Number for Device files 
check the async value in all nodes of the grid and if the async value differs then change to the suitable value
The recommended values for the async in hp-ux are  101 0x4 [or] 101 0x104
We can use the command  /sbin/mknod to change the value to the async device file
move the old file to different name and create the new file with the desired values
Node1
root @ db01/prod01/oracle >mv /dev/async /dev/async_old_db01
root @ db01./prod01/oracle >/sbin/mknod /dev/async c 101 0x104
Node2
root @ db02./prod01/oracle >mv /dev/async /dev/async_old_db02
root @ db02/prod01/oracle >/sbin/mknod /dev/async c 101 0x104

Step 4
Running the cluster verify and checking the SCAN
Run the cluster verify command  with the parameter value as per to verify the values before upgrade and check the scan listener 
Check all the O/S Prerequisites by using the cluster verify command
If you have configured the scan listener in 11g by adding the host name with one ip in 12c it is mandatory to have DNS configuration with three ip's
reconfigure the scan listener with the three ip's after making the necessary changed in the DNS if the Sacn  existing meets the requirement then we can go head oraprod @ db01/prod01/oracle/11.2.0/grid/bin >srvctl config scan
SCAN name: ommprod-cluster-scan, Network: 1
Subnet IPv4: 192.168.5.0/255.255.255.0/lan0
Subnet IPv6:
SCAN 0 IPv4 VIP: <ip_address>
SCAN name: ommprod-cluster-scan, Network: 1
Subnet IPv4: 192.168.5.0/255.255.255.0/lan0
Subnet IPv6:
SCAN 1 IPv4 VIP: <ipaddress>
SCAN name: ommprod-cluster-scan, Network: 1
Subnet IPv4: 192.168.5.0/255.255.255.0/lan0
Subnet IPv6:
SCAN 2 IPv4 VIP: <ip_address>
oraprod @ db01/prod01/oracle/11.2.0/grid/bin >srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node db01
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node db02
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node db01

Step 5

Backup the OCr disk' and  unset the env variables .. shutdown the database before upgrade of cluster

root @ db01.oasiserp.com/prod01/oracle/11.2.0/grid/bin >./ocrconfig -manualbackup
check the ocr's status by using the ocrcheck and you can check the list of backup files also by using the ocrcheck
Shutdown the database before starting the upgrade of the grid
Unset all the env variables which is pointing to the old location of the grid home
Set the new grid home and patch to start the run installer .. if OUI has Problems with the Host name not found then set the env variable as ORACLE_HOSTNAME ..




Step 6

upgrading the 11gr2 grid to 12c 

start the OUI 




Step7

skip or provide the MOS credentials

Step8
Select the upgrade the grid infrastructure to upgrade the existing 11.2.0.3 grid to the 12 c 


Step 9
Select the Preferred Language


Step10

Select the Node which need to be upgraded in our env e have two node cluster and we had selected both the nodes
As we are in the Process of upgrade the User equivalence between the two nodes had been existing  in the environment



Step 11

Select the necessary groups for OAASM [asmadmin] , ASMDBA [asmdba] ASM operator [asmoper]



Step12
Select the Oracle base and the oracle home for the new grid installation we are doing the out of box installation and specify the new location instead of the old software location



Step13
we can provide the root password to run the  root configuration scripts instead of manual running in each nodes -e decided to run as manual and skipped this page
if you want to run the root scripts automatically then skip this page and follow the steps from 13a ,13b


Step 13A

 we can provide the root password for running the scripts

Step 13B
Once the root password is provide and we had many nodes you can combine the nodes into a batch processing to run the root script here we had to nodes combined to single batch and the batch will be running the sequence if the large number of nodes are present



Step 14

check the Prerequisite and fix the warnings before staring to process


check the async value and set to appropriate value check the step 3 kernel warnings can be fixed by running the fix script or by using the kctune in hp-ux or changing manually  the kernel values according to  recommendations

Step 14 B

Once the all the values are fixed and then you will get the response file page 
save the response file and start the installation




Step 15
Once the GUI installtion is completed in both the nodes then you will pop up prompting for run the rootupgrade.sh script from the grid home form all the Nodes 


Once the rootupgrade.sh had been completed in both the nodes the installation is completed and the grid service's will be up


Check the ASM  and check the asm disk which had been attached

oragrid @ db01/prod01/oracle/12.1.0/12.1.0/grid >sqlplus
SQL*Plus: Release 12.1.0.1.0 Production on Fri Mar 14 10:04:04 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Enter user-name: sys as sysasm
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> set line 300
SQL> select name, header_status, path from v$asm_disk;

NAME                           HEADER_STATU PATH
------------------------------ ------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DATA_0000                      MEMBER       /dev/vg_data1/rlv_data1
DATA_0001                      MEMBER       /dev/vg_data2/rlv_data2
DATA_0002                      MEMBER       /dev/vg_data3/rlv_data3
DATA_0003                      MEMBER       /dev/vg_data4/rlv_data4
FLASH_0000                     MEMBER       /dev/vg_flash1/rlv_flash1
FLASH_0001                     MEMBER       /dev/vg_flash2/rlv_flash2
6 rows selected.
oragrid @ db01.oasiserp.com/prod01/oracle/12.1.0/12.1.0/grid >asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N        1024   4096  4194304    819136   167912                0          167912              0             Y  DATA/
MOUNTED  EXTERN  N        1024   4096  4194304    511968   340428                0          340428              0             N  FLASH/
ASMCMD>

 Step 16

Conform the software version's in both the nodes the 11.2.0.3 database is compitable with the 12.1cluster so we can start the database and verify before we start the upgrade of the database to 12.1

Node 1

root @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >./olsnodes -s
db01 Active
db02 Active
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >./crsctl query crs softwareversion
Oracle Clusterware version on node [db01] is [12.1.0.1.0]
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.1.0]
root @ db01/prod01/oracle/12.1.0/12.1.0/grid/bin >

Node2
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/bin >./crsctl query crs softwareversion
Oracle Clusterware version on node [db02] is [12.1.0.1.0]
root @ db02./prod01/oracle/12.1.0/12.1.0/grid/bin >./olsnodes -s
db01 Active
db02 Active
root @ db02prod01/oracle/12.1.0/12.1.0/grid/bin >./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.1.0]
root @ db02/prod01/oracle/12.1.0/12.1.0/grid/bin >


Friday, November 22, 2013

Installing 12c database in Linux 6 x84_64

STEP BY STEP INSTALLATION OF 12 C DATABASE IN REDHAT LINUX 6.4 X86_64

This are the steps to install the 12c database [single node] in Redhat Linux 6.4 [or ] oracle Linux 6.4

Step1

create the oracle public yum repository and enable the version
Run the prerequisite Rpm for the 12 c from the oracle public yum repository
oracle has the pre- built rpm like 11g release for the 12c which will be helpful
[root@oracledb1 ~]# yum install *oracle*12*
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
ol6_UEK_latest
ol6_addons
ol6_ofed_UEK                                                                                                                                     | 1.2 kB     00:00
ol6_u4_base                                                                                                                                      | 1.4 kB     00:00
rackspace-rhel-x86_64-server-6-ius                                                                                                               |  871 B     00:00
rhel-x86_64-server-6                                                                                                                             | 1.5 kB     00:00
rhel-x86_64-server-6-common                                                                                                                      |  871 B     00:00
rhel-x86_64-server-optional-6                                                                                                                    | 1.5 kB     00:00
rhn-tools-rhel-x86_64-server-6                                                                                                                   | 1.3 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-em-agent-12cR1-preinstall.x86_64 0:1.0-4.el6 will be installed
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-8.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                                      Arch                           Version                           Repository                          Size
========================================================================================================================================================================
Installing:
 oracle-em-agent-12cR1-preinstall                             x86_64                         1.0-4.el6                         ol6_addons                         7.0 k
 oracle-rdbms-server-12cR1-preinstall                         x86_64                         1.0-8.el6                         ol6_latest                          15 k

Transaction Summary
========================================================================================================================================================================
Install       2 Package(s)

Total size: 22 k
Installed size: 42 k
Is this ok [y/N]: Y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracle-em-agent-12cR1-preinstall-1.0-4.el6.x86_64                                                                                                    1/2
  Installing : oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64                                                                                                2/2
  Verifying  : oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64                                                                                                1/2
  Verifying  : oracle-em-agent-12cR1-preinstall-1.0-4.el6.x86_64                                                                                                    2/2
Installed:
  oracle-em-agent-12cR1-preinstall.x86_64 0:1.0-4.el6                              oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-8.el6

Complete!
 It will create the necessary Rpm's with the dependencies and add the entries in the /etc/sysctl.conf for the necessary Kernel Parameter's.. and /etc/security/limits.conf files
and it will create the new user named oracle with the oinstall as the group id 

Step 2
If you are using the oracle linux with support we can use the ksplice to apply the security updates with out rebooting

[1] Download the ksplice Rpm

[root@oracledb1 security]# wget https://www.ksplice.com/yum/uptrack/ol/ksplice-uptrack-release.noarch.rpm
--2013-11-20 20:29:27--  https://www.ksplice.com/yum/uptrack/ol/ksplice-uptrack-release.noarch.rpm
Resolving www.ksplice.com... 137.254.56.32
Connecting to www.ksplice.com|137.254.56.32|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6876 (6.7K) [application/x-redhat-package-manager]
Saving to: âksplice-uptrack-release.noarch.rpmâ

100%[==============================================================================================================================>] 6,876       --.-K/s   in 0s

2013-11-20 20:29:27 (15.4 MB/s) - âksplice-uptrack-release.noarch.rpmâ

[root@oracledb1 security]# rpm -i ksplice-uptrack-release.noarch.rpm
warning: ksplice-uptrack-release.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 16c083cd: NOKEY


[2] Install the ksplice rpm using the yum

[root@oracledb1 security]# yum -y install uptrack
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
ksplice-uptrack                                                             951 B     00:00
ksplice-uptrack/primary                                               3.9 kB     00:00
kspliceuptrack                                                                                                                                           12/12
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package uptrack.noarch 0:1.2.12-0.el6 will be installed
--> Processing Dependency: uptrack-PyYAML for package: uptrack-1.2.12-0.el6.noarch
--> Running transaction check
---> Package uptrack-PyYAML.x86_64 0:3.08-4.el6 will be installed
--> Processing Dependency: uptrack-libyaml >= 0.1.3-1 for package: uptrack-PyYAML-3.08-4.el6.x86_64
--> Running transaction check
---> Package uptrack-libyaml.x86_64 0:0.1.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                    Arch                              Version                                  Repository                                  Size
========================================================================================================================================================================
Installing:
 uptrack                                    noarch                            1.2.12-0.el6                             ksplice-uptrack                            375 k
Installing for dependencies:
 uptrack-PyYAML                             x86_64                            3.08-4.el6                               ksplice-uptrack                            143 k
 uptrack-libyaml                            x86_64                            0.1.3-1.el6                              ksplice-uptrack                             48 k

Transaction Summary
========================================================================================================================================================================
Install       3 Package(s)

Total download size: 566 k
Installed size: 1.8 M
Downloading Packages:
(1/3): uptrack-1.2.12-0.el6.noarch.rpm                                                                                                           | 375 kB     00:00
(2/3): uptrack-PyYAML-3.08-4.el6.x86_64.rpm                                                                                                      | 143 kB     00:00
(3/3): uptrack-libyaml-0.1.3-1.el6.x86_64.rpm                                                                                                    |  48 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   330 kB/s | 566 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : uptrack-libyaml-0.1.3-1.el6.x86_64                                                                                                                   1/3
  Installing : uptrack-PyYAML-3.08-4.el6.x86_64                                                                                                                     2/3
  Installing : uptrack-1.2.12-0.el6.noarch                                                                                                                          3/3
There are no existing modules on disk that need basename migration.
  Verifying  : uptrack-PyYAML-3.08-4.el6.x86_64                                                                                                                     1/3
  Verifying  : uptrack-1.2.12-0.el6.noarch                                                                                                                          2/3
  Verifying  : uptrack-libyaml-0.1.3-1.el6.x86_64                                                                                                                   3/3

Installed:
  uptrack.noarch 0:1.2.12-0.el6

Dependency Installed:
  uptrack-PyYAML.x86_64 0:3.08-4.el6                                                uptrack-libyaml.x86_64 0:0.1.3-1.el6

Complete!

Step 3

Prerequisite rpm's for 12c database 

Required rpm's  the Oracle r12c database for Linux x86_64

check the installed rpm this rpm's are the mandatory rpm's for the database installation if some of the rpm's are not install install through the oracle public yum
[root@oracledb1 ~]# rpm -q binutils-* \
>  compat-libcap* \
>  compat-libstdc++* \
>  compat-libstdc++* \
>  gcc-* \
>  gcc-c++* \
>  glibc-* \
>  glibc-devel* \
>  ksh* \
>  libgcc-* \
>  libstdc++* \
>  libstdc++-devel * \
>  libaio * \
>  libaio-devel \
>  libXext- \
>  libXtst \
>  libX11 \
>  libXau- \
>  libxcb- \
>  libXi-1.3 \
>  make- \
>  sysstat \
>  unixODBC \
>  cvuqdisk \
>  cloog-ppl \
>  cpp.x86_64 \
>  glibc-headers \
> kernel-headers \
> mpfr.x86_64 \
>  ppl.x86_64
libXtst-1.2.1-2.el6.x86_64
binutils-devel-2.20.51.0.2-5.36.el6.x86_64
gcc-objc++-4.4.7-3.el6.x86_64
cloog-ppl-0.15.7-1.2.el6.x86_64
libXtst-1.2.1-2.el6.i686
gcc-objc-4.4.7-3.el6.x86_64
unixODBC-2.2.14-12.el6_3.x86_64
compat-libstdc++-33-3.2.3-69.el6.x86_64
glibc-common-2.12-1.107.el6_4.5.x86_64
libaio-devel-0.3.107-10.el6.x86_64
libstdc++-4.4.7-3.el6.x86_64
ksh-20100621-19.el6_4.4.x86_64
libX11-1.5.0-4.el6.i686
libaio-0.3.107-10.el6.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64
compat-libstdc++-296-2.96-144.el6.i686
gcc-gnat-4.4.7-3.el6.x86_64
gcc-c++-4.4.7-3.el6.x86_64
compat-libcap1-1.10-1.x86_64
glibc-headers-2.12-1.107.el6_4.5.x86_64
libstdc++-devel-4.4.7-3.el6.x86_64
gcc-gfortran-4.4.7-3.el6.x86_64
glibc-static-2.12-1.107.el6_4.5.x86_64
libstdc++-docs-4.4.7-3.el6.x86_64
glibc-utils-2.12-1.107.el6_4.5.x86_64
kernel-headers-2.6.32-358.23.2.el6.x86_64
libX11-1.5.0-4.el6.x86_64
sysstat-9.0.4-20.el6.x86_64
gcc-java-4.4.7-3.el6.x86_64
[root@oracledb1 ~]#

Once all the rpm's are installed you can query and get Conformed

[root@oracledb1 ~]# rpm -q binutils  compat-libcap compat-libstdc++  compat-libstdc++  gcc  gcc-c++  glibc  glibc-devel  ksh  libgcc   libstdc++  libstdc++-devel   libaio   libaio-devel  libXext  libXtst   libX11   libXau  libxcb  libXi-1.3  make sysstat unixODBC cvuqdisk  cloog-ppl  cpp.x86_64   glibc-headers  kernel-headers  mpfr.x86_64   ppl.x86_64

Step 4 

Creating the user,groups for the 12 c database

[i] If you are using the pre-installation rpm then the  from the public yum then it will create the user named oracle and the group as oinstall
we can provide the same user group to all the group's during the installation but that is not the recommended method so we need to create the below groups and assign it to the oracle user

[root@oracledb1 app]# id oracle
uid=54321(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
 In 12c the new groups are introduced for the different purpose 

 [ii.a] BACKUPDBA GROUP 
This new group is needed when we need to configure the separate access for the operating system user's only for backup and restoration it is typically know as [sysbackup] 
Create the group  as backupdba
[root@oracledb1 app]# groupadd -g 505 backupdba

[ii.b]DGDBA
This particular group is assigned to the data guard user's [ it is typically can be use to assign the o/s user's who will monitor the data guard operation's]
Create the group as dgdba
[root@oracledb1 app]# groupadd -g 506 dgdb

[ii.c]KMDBA
This particular group can be assigned to the o/s users who will manage the encryption key [like db wallet]
[root@oracledb1 app]# groupadd -g 507 kmdba

As the preinstall rpm had created the oracle user id  we need to modify the oracle user with the necessary groups

[root@oracledb1 app]# usermod -g oinstall -G oinstall,dba,oper,backupdba,dgdba,kmdba oracle

[root@oracledb1 app]# id oracle
uid=54321(oracle) gid=502(oinstall)groups=502(oinstall),503(dba),504(oper),505(backupdba),506(dgdba),507(kmdba)


Step 5 

Creating the Oracle Base Directory

[root@oracledb1 /]# mkdir /u01/app/oracle -p
[root@oracledb1 /]# chown -R oracle:oinstall /u01/app/oracle
[root@oracledb1 /]# chmod -R g+w /u01/app/oracle

Step 6

Required Kernel settings for the 12c database

[root@oracledb1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.core_pattern = /root/core
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

Step 7

Required parameters in the limites.conf for 12c database

check the values in the /etc/security/limits.conf this values will be added by the 12c preinstall rpm if you are not using the pre install rpm add the values in the file

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

Download the 12c database software
For installing the database we need to download the database software from the www.edelivery.oracle.com or through the otn
once you download the zip files unzip the files to create the staging directory to start the run installer
[oracle@oracledb1 Downloads]$ ls
  V38500-01_1of2.zip  V38500-01_2of2.zip

INSTALLATION OF 12c DATABASE

Navigate to the database software staging directory and from there start the runInstaller to start the installation
Step 1



Step 2


Step 3
If we need to only install the software and create the database later using the dbca you can use this method or you can use the create and configure the database

Step 4

we can choose the different methods of installation of database
[1] single database installation -- only the database installation[with out grid]
[2] RAC Database installation --- installation of the rac database[prior we need to install the grid and asm]
[3]RAC one node database --- with the HAS services for the single node [prior we need to install grid ]


Step 5



Step 6



Step 7


Step 8



Step 9



Step 10


Step 11


Step 12


Step 13