Thursday, July 24, 2014

crsctl command to start and stop crs in Oracle RAC Database


Hi DBAs,

We basically have the below command to stop/start crs in Oracle RAC Database.

crsctl command to stop and start the cluster on a specific node noderac1 & noderac2:


We need to login with 'root' or specific sudo user having permissions to run the crs commands.

/u01/app/11.2.0.3/grid/bin/crsctl stop crs
/u01/app/11.2.0.3/grid/bin/crsctl disable crs

/u01/app/11.2.0.3/grid/bin/crsctl enable crs
/u01/app/11.2.0.3/grid/bin/crsctl start crs

where /u01/app/11.2.0.3/grid =$GRID_HOME
 
crsctl command to stop and start on the Clusterware(noderac1 &noderac2) will be

/u01/app/11.2.0.3/grid/bin/crsctl stop cluster -all
 /u01/app/11.2.0.3/grid/bin/crsctl disable crs

/u01/app/11.2.0.3/grid/bin/crsctl enable crs
/u01/app/11.2.0.3/grid/bin/crsctl start resource -all

where /u01/app/11.2.0.3/grid =$GRID_HOME


Enjoy doing RAC tasks...

Thanks,

Rafi

How to check Pre-requistics Patches while applying Database Patch using opatch

Hi DBAs,

Lot of time we apply Database patches using the opatch,It is mandatory to know the Pre-requistics patches for applying the Patch.We can find it out with the below steps.


Step 1:Go to the Directory where patch is copied(PATCH TOP)
>cd /home/oracle/patch/18308717

Step 2:Execute below command
>$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0.3/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.3/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/opatch2014-07-24_17-52-50PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
node1(TESTDB1)  /home/oracle/patch/18308717
>ls -altr
total 24
-rw-rw-r-- 1 oracle oinstall 5905 May 14 03:35 README.txt
drwxr-xr-x 3 oracle oinstall 4096 May 14 03:35 files
drwxr-xr-x 4 oracle oinstall 4096 May 14 03:35 etc
drwxrw-rw- 3 oracle oinstall 4096 Jul 24 11:30 ..
drwxrwxr-x 4 oracle oinstall 4096 Jul 24 11:30 .
node1(TESTDB1)  /home/oracle/patch/18308717


Step 3:Verify the Log

>vi /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/opatch2014-07-24_17-52-50PM_1.log

[Jul 24, 2014 5:52:50 PM]    PREREQ session
[Jul 24, 2014 5:52:50 PM]    OPatch invoked as follows: 'prereq CheckConflictAgainstOHWithDetail -ph ./ -invPtrLoc /u01/app/oracle/product/11.2.0.3/dbhome_1/oraInst.loc '
[Jul 24, 2014 5:52:50 PM]    OUI-67077:
                             Oracle Home       : /u01/app/oracle/product/11.2.0.3/dbhome_1
                             Central Inventory : /u01/app/oraInventory
                                from           : /u01/app/oracle/product/11.2.0.3/dbhome_1/oraInst.loc
                             OPatch version    : 11.2.0.3.6
                             OUI version       : 11.2.0.3.0
                             OUI location      : /u01/app/oracle/product/11.2.0.3/dbhome_1/oui
                             Log file location : /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/opatch2014-07-24_17-52-50PM_1.log
[Jul 24, 2014 5:52:50 PM]    Patch history file: /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/opatch_history.txt
[Jul 24, 2014 5:52:50 PM]    Invoking prereq "checkconflictagainstohwithdetail"
[Jul 24, 2014 5:52:51 PM]    Patch 18308717 is not subset of any other patch processed till now
[Jul 24, 2014 5:52:51 PM]    Patch ID  18308717
[Jul 24, 2014 5:52:51 PM]    Patches that conflict: [  ]
[Jul 24, 2014 5:52:51 PM]    Checking conflicts for patch: 18308717
[Jul 24, 2014 5:52:51 PM]    Checking conflicts/supersets for patch: 18308717 with patch:18308717
[Jul 24, 2014 5:52:51 PM]    Checking conflicts/supersets for patch: 18308717 with patch:17076717
[Jul 24, 2014 5:52:51 PM]    Checking conflicts/supersets for patch: 18308717 with patch:17296419
[Jul 24, 2014 5:52:51 PM]    Checking conflicts/supersets for patch: 18308717 with patch:16475860
[Jul 24, 2014 5:52:51 PM]    Prereq "checkConflictAgainstOHWithDetail" passed.
[Jul 24, 2014 5:52:51 PM]    Finishing PrereqSession at Thu Jul 24 17:52:51 IST 2014 

Message:Patch 18308717 is not subset of any other patch processed till now 
From the above logs we can confirm that there are no-prerequistics patches to be applied before applying 18308717.


Enjoy doing DBA tasks...

Happy DBA tasks..

Thanks,

Rafi











Friday, July 4, 2014

How to activate Periodic Alert Scheduler in Oracle EBS Application


Hi Apps DBAs,

 We can activate Periodic Alert Scheduler in Oracle EBS Application

Step 1:Login to ORACLE EBS Application HOME PAGE with Alert Manager Responsibility

We need to Login the Oracle EBS Application HOME PAGE with Alert Manager Responsibility or else assign the responsibility to the User

In the Database we can login with 'Apps' user and check the user exists

SQL> SELECT USER_NAME from fnd_user where  USER_NAME like '%RAFI%';

USER_NAME
--------------------------------------------------------------------------------
RAFI

How to check responsibilities assigned to a user:

SQL> SELECT B.RESPONSIBILITY_NAME
     FROM FND_USER_RESP_GROUPS A,
     FND_RESPONSIBILITY_VL B,
     FND_USER C
     WHERE A.responsibility_id = B.responsibility_id AND
     C.user_id = A.user_id AND
     (to_char(A.end_date) IS NULL
     OR A.end_date > sysdate)
     AND C.user_name like '%RAFI%';


RESPONSIBILITY_NAME
--------------------------------------------------------------------------------
TL System Administrator (Read Only)
TL System Administrator
Alert Manager

Step 2: We need to have alert Manager Responsibily to do this task.

We need to Navigate to Alert Manager Responsibility

Navigate to alert ->Define ;Go to Request->Schedule

there we can see periodic Alert Scheduler =>Active it (Click on Activate button)

Screenshot below for reference.





Enjoy Apps DBA tasks....


Thanks,

Rafi