Wednesday 17 August 2016

How to Disable Login Assistance Link In Oracle ERP R12


Solution:
 =========================================================================

The system profile 'Local Login Mask' has been obsoleted in R12 and cannot be used to disable Login Assistance link.  Please follow the steps below to disable this link:
1. Logon with Functional Administrator responsibility.
2. Click on 'Personalization' Tab.
3. Enter /oracle/apps/fnd/sso/login/webui in document path and click on 'Go' button.
4. Click on 'Pencil' icon under 'Personalize Page' for oracle/apps/fnd/sso/login/webui/MainLoginPG.
5. Make sure that 'Include' for Site is checked and click on 'apply'
6. Look for (LoginRN.MainLoginRN.ForgotPasswordUrlRowLayoutRN1) and click on 'Pencil' icon in
'Personalize' column.
7. Change 'rendered' property value to 'false' at Site level from LOV and click on Apply.
8. This will disable the link and users logging in after the change will not see the link.
 

==========================================================================
 

How to check Long running Request in Oracle ERP R12

======================================================================
SELECT a.request_id
,a.oracle_process_id "SPID"
,frt.responsibility_name
,c.concurrent_program_name || ': ' || ctl.user_concurrent_program_name
,a.description
,a.ARGUMENT_TEXT
,b.node_name
,b.db_instance
,a.logfile_name
,a.logfile_node_name
,a.outfile_name
,q.concurrent_queue_name
,a.phase_code,a.status_code, a.completion_text
, actual_start_date
, actual_completion_date
, fu.user_name
,(nvl(actual_completion_date,sysdate)-actual_start_date)*1440 mins
,(SELECT avg(nvl(a2.actual_completion_date-a2.actual_start_date,0))*1440 avg_run_time
FROM APPLSYS.fnd_Concurrent_requests a2,
APPLSYS.fnd_concurrent_programs c2
WHERE c2.concurrent_program_id = c.concurrent_program_id
AND a2.concurrent_program_id = c2.concurrent_program_id
AND a2.program_application_id = c2.application_id
AND a2.phase_code || '' = 'C') avg_mins
,round((actual_completion_date - requested_start_date),2) * 24 duration_in_hours
FROM APPLSYS.fnd_Concurrent_requests a,APPLSYS.fnd_concurrent_processes b
,applsys.fnd_concurrent_queues q
,APPLSYS.fnd_concurrent_programs c
,APPLSYS.fnd_concurrent_programs_tl ctl
,apps.fnd_user fu
,apps.FND_RESPONSIBILITY_TL frt
WHERE a.controlling_manager = b.concurrent_process_id
AND a.concurrent_program_id = c.concurrent_program_id
AND a.program_application_id = c.application_id
AND a.phase_code = 'R'
AND a.status_code = 'R'
AND b.queue_application_id = q.application_id
AND b.concurrent_queue_id = q.concurrent_queue_id
AND ctl.concurrent_program_id = c.concurrent_program_id
AND a.requested_by = fu.user_id
AND a.responsibility_id = frt.responsibility_id
ORDER BY a.actual_start_date DESC
======================================

How to check tablespace and Datafile free size in oracle



How to check Datafile size for the single tablespace.
-------------------------------------------------------------------------------------------------------------------------
 SELECT B.TABLESPACE_NAME,
         B.FILE_NAME,
         ROUND (B.BYTES / 1024 / 1024 / 1024, 2) "SIZE GB",
         ROUND (B.MAXBYTES / 1024 / 1024 / 1024, 2) "MAX SIZE GB",
         ROUND (SUM (A.BYTES) / 1024 / 1024 / 1024, 2) "FREE SPACE GB",
         CASE
            WHEN MAXBYTES = 0
            THEN
               ROUND (SUM (A.BYTES) / 1024 / 1024 / 1024, 2)
            ELSE
               ROUND (
                    ( (B.MAXBYTES - B.BYTES) + SUM (A.BYTES)) / 1024 / 1024 / 1024, 2)
         END
            "TOTAL FREE SPACE GB"
    FROM DBA_FREE_SPACE A, DBA_DATA_FILES B
   WHERE A.FILE_ID = B.FILE_ID AND B.TABLESPACE_NAME IN ('APPS_TS_MEDIA')
GROUP BY B.TABLESPACE_NAME,
         B.FILE_NAME,
         B.BYTES,
         B.MAXBYTES
ORDER BY 1, 2;


---------------------------------------------------------------------------------------------------------------

2.  How to check tablespace Total size, used and free

---------------------------------------------------
select
   fs.tablespace_name                          "Tablespace",
   (df.totalspace - fs.freespace)              "Used MB",
   fs.freespace                                "Free MB",
   df.totalspace                               "Total MB",
   round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
   (select
      tablespace_name,
      round(sum(bytes) / 1048576) TotalSpace
   from
      dba_data_files
   group by
      tablespace_name
   ) df,
   (select
      tablespace_name,
      round(sum(bytes) / 1048576) FreeSpace
   from
      dba_free_space
   group by
      tablespace_name
   ) fs
where
   df.tablespace_name = fs.tablespace_name;

UNIX Useful Commands - FIND




1).Find files modified within specific time
Find files that have been modified less than 3 days ago.
find . -mtime -3
To be more specific and just check for the file change time, use:
find . -ctime -3
To be even more specific you can set a date range by using: Find all files changed, and thus modified, at least one day ago but within three days ago.
find . -ctime +1 -a -ctime -3
2).Find and Replace text in Multiple Files
Use,
                                find . -type f | xargs grep -l 'IBM' | xargs sed -i '' -e 's/IBM/ORACLE/g'
The first part of the command is find, which finds all files and excludes directories. That result is then piped to grep, which lists all files that contain IBM. The results of is then sent to sed, which replaces all occurances of IBM with ORACLE.
3).Find and Move files to a specific location
Use,
                              find . -newer *lmd.trc -exec cp '{}' /tmp/ \ ;
Above command find the file newer than the *lmd.trc and then copies all the files to the tmp directory

How to find PSU Version.




Patch Set Updates are referenced by their 5-place version number. You may use the below commands depending on hte ORACLE_HOME.
Database PSU:
$opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU' 
CRS (Cluster Ready Services) PSU:
$opatch lsinventory -bugs_fixed | grep -i 'TRACKING BUG' | grep -i 'PSU'
GI (Grid Infrastructure) PSU:
$opatch lsinventory -bugs_fixed | grep -i 'GI PSU' 
Enterprise Manager Agent PSU:
$ opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER AGENT' | grep -i 'PSU'
Enterprise Manager OMS PSU:
$opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER OMS' | grep -i 'PSU'
WebLogic Server PSU:
Enter the following commands, where WL_HOME is the path of the WebLogic home:
$ . $WL_HOME/server/bin/SetWLSEnv.sh  
$ java weblogic.version 

How to Start and Stop Local Listener and SCAN Listener (RAC Basic Command)

                      There are following RAC basic commands

How to Start and Stop Local Listener and SCAN Listener

First check which services are running from which nodes.

oragrid$ps -eaf|grep tns

---------How to set environment if environment is not set---------

bash-4.3$ which srvctl
/u02/grid/product/11.2.0/bin/srvctl

bash-4.3$ export PATH=$ORACLE_HOME/bin:$PATH

/u02/grid/product/11.2.0/bin/lsnrctl
--How to STOP Local Listener:- Run this command from one by one all nodes

oragrid$srvctl stop LISTENER -n adupgdb1
oragrid$srvctl stop LISTENER -n oracledb1
oragrid$srvctl stop LISTENER -n oracledb2

--How to STOP SCAN Listener  ---- Run only from any one node

oragrid$srvctl stop scan_listener

----- How to START Local Listener ------


oragrid$srvctl start LISTENER -n adupgdb1
oragrid$srvctl start LISTENER -n oracledb1

oragrid$srvctl start LISTENER -n oracledb2


-----How to start SCAN Listener ------

oragrid$srvctl start scan_listener

-----------------------------------------------------------------------

How to bounced Single SCAN Listener one by one on nodes


Run from the grid user.

bash-4.3$ srvctl status scan_listener -i 3
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node adupgdb1
bash-4.3$ srvctl stop scan_listener -i 3
bash-4.3$ srvctl status scan_listener -i 3
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
bash-4.3$ srvctl start scan_listener -i 3
bash-4.3$ srvctl status scan_listener -i 3
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node adupgdb1
------------------------------------------------------------------





11gR2 Clusterware and Grid Home – What you need to know [ID 1053147.1] [ POST VIEWS : 15323 ]

1.
Clusterware Resource Status Check
bash-4.3# ./crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.TESTARCH.dg
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.TESTDATA.dg
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.TESTDATA1.dg
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.TEST_VOTE.dg
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.asm
               ONLINE  ONLINE       testdb1                  Started
               ONLINE  ONLINE       testdb2                  Started
ora.gsd
               OFFLINE OFFLINE      testdb1
               OFFLINE OFFLINE      testdb2
ora.net1.network
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
ora.ons
               ONLINE  ONLINE       testdb1
               ONLINE  ONLINE       testdb2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       testdb1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       testdb2
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       testdb2
ora.cvu
      1        ONLINE  ONLINE       testdb2
ora.oc4j
      1        OFFLINE OFFLINE
ora.scan1.vip
      1        ONLINE  ONLINE       testdb1
ora.scan2.vip
      1        ONLINE  ONLINE       testdb2
ora.scan3.vip
      1        ONLINE  ONLINE       testdb2
ora.test.db
      1        ONLINE  ONLINE       testdb1                  Open
      2        ONLINE  ONLINE       testdb2                  Open
ora.testdb1.vip
      1        ONLINE  ONLINE       testdb1
ora.testdb2.vip
      1        ONLINE  ONLINE       testdb2
2. STOP A and START A LISTENER
bash-4.3$ srvctl status listener -l LISTENER
Listener LISTENER is enabled
Listener LISTENER is running on node(s): testdb2,testdb1
bash-4.3$ srvctl stop listener -l LISTENER
bash-4.3$ srvctl status listener -l LISTENER
Listener LISTENER is enabled
Listener LISTENER is not running
bash-4.3$ srvctl start listener -l LISTENER
bash-4.3$ srvctl status listener -l LISTENER
Listener LISTENER is enabled
Listener LISTENER is running on node(s): testdb2,testdb1
3. stop all the clusterware services/ resources on specific node (including DB and listener) (run as root)
bash-4.3# ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'testdb1'
CRS-2673: Attempting to stop 'ora.crsd' on 'testdb1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'testdb1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'testdb1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'testdb1'
CRS-2673: Attempting to stop 'ora.TESTARCH.dg' on 'testdb1'
CRS-2673: Attempting to stop 'ora.TEST_VOTE.dg' on 'testdb1'
CRS-2673: Attempting to stop 'ora.test.db' on 'testdb1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.testdb1.vip' on 'testdb1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'testdb1'
CRS-2677: Stop of 'ora.testdb1.vip' on 'testdb1' succeeded
CRS-2672: Attempting to start 'ora.testdb1.vip' on 'testdb2'
CRS-2677: Stop of 'ora.scan1.vip' on 'testdb1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'testdb2'
CRS-2677: Stop of 'ora.TESTARCH.dg' on 'testdb1' succeeded
CRS-2676: Start of 'ora.testdb1.vip' on 'testdb2' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'testdb2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'testdb2'
CRS-2677: Stop of 'ora.test.db' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.TESTDATA.dg' on 'testdb1'
CRS-2673: Attempting to stop 'ora.TESTDATA1.dg' on 'testdb1'
CRS-2677: Stop of 'ora.TESTDATA1.dg' on 'testdb1' succeeded
CRS-2677: Stop of 'ora.TESTDATA.dg' on 'testdb1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'testdb2' succeeded
CRS-2677: Stop of 'ora.TEST_VOTE.dg' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'testdb1'
CRS-2677: Stop of 'ora.asm' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'testdb1'
CRS-2677: Stop of 'ora.ons' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'testdb1'
CRS-2677: Stop of 'ora.net1.network' on 'testdb1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'testdb1' has completed
CRS-2677: Stop of 'ora.crsd' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'testdb1'
CRS-2673: Attempting to stop 'ora.evmd' on 'testdb1'
CRS-2673: Attempting to stop 'ora.asm' on 'testdb1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'testdb1'
CRS-2677: Stop of 'ora.ctssd' on 'testdb1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'testdb1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'testdb1' succeeded
CRS-2677: Stop of 'ora.asm' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'testdb1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'testdb1'
CRS-2677: Stop of 'ora.cssd' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'testdb1'
CRS-2677: Stop of 'ora.gipcd' on 'testdb1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'testdb1'
CRS-2677: Stop of 'ora.gpnpd' on 'testdb1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'testdb1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

4. Start all the clusterware services/ resources on specific node (including DB and listener) (run as root)
bash-4.3# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.
5. to stop csr services on all nodes of clusterware (run as root)
bash-4.3# ./crsctl stop cluster –all
6. to start crs services on all nodes of clusterware (run as root)
bash-4.3# ./crsctl start cluster -all
7. to check if ohasd is running/ stopped (run as root)
bash-4.3# ./crsctl check has
CRS-4638: Oracle High Availability Services is online
8.  enable Oracle High Availability Services autostart (run as root)
bash-4.3# ./crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.
9.  disable Oracle High Availability Services autostart (run as root)
bash-4.3# ./crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.
10. check if Oracle High Availability Services autostart is enabled/ disabled (run
bash-4.3# ./crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
11.
Verifying scan status scan_listener
Run this through grid user.
bash-4.3$ ./cluvfy comp scan -verbose
Verifying scan
Checking Single Client Access Name (SCAN)...
  SCAN Name         Node          Running?      ListenerName  Port          Running?
  ----------------  ------------  ------------  ------------  ------------  ------------
  scan-test.seha.ae  testdb1       true          LISTENER_SCAN1  1521          true
  scan-test.seha.ae  testdb2       true          LISTENER_SCAN2  1521          true
  scan-test.seha.ae  testdb2       true          LISTENER_SCAN3  1521          true

Checking TCP connectivity to SCAN Listeners...
  Node          ListenerName              TCP connectivity?
  ------------  ------------------------  ------------------------
  testdb1       LISTENER_SCAN1            yes
  testdb1       LISTENER_SCAN2            yes
  testdb1       LISTENER_SCAN3            yes
TCP connectivity to SCAN Listeners exists on all cluster nodes

Checking name resolution setup for "scan-test.seha.ae"...
  SCAN Name     IP Address                Status                    Comment
  ------------  ------------------------  ------------------------  ----------
  scan-test.seha.ae  10.105.22.133             passed
  scan-test.seha.ae  10.105.22.132             passed
  scan-test.seha.ae  10.105.22.131             passed

Verification of SCAN VIP and Listener setup passed

Verification of scan was successful.
12. Verifying scan port
bash-4.3$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
13. To check the status of services on all nodes
bash-4.3$ srvctl status nodeapps
VIP testdb1_vip is enabled
VIP testdb1_vip is running on node: testdb1
VIP 10.104.21.56 is enabled
VIP 10.104.21.57 is running on node: testdb2
Network is enabled
Network is running on node: testdb1
Network is running on node: testdb2
GSD is disabled
GSD is not running on node: testdb1
GSD is not running on node: testdb2
ONS is enabled
ONS daemon is running on node: testdb1
ONS daemon is running on node: testdb2
14. stop all the clusterware services/ resources ON THAT NODE! (run as root)
bash-4.3# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
15.  Check if Oracle High Availability Services autostart is enabled/ disabled (run as root)
bash-4.3# ./crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.


How to Check Clusterware Version and Name

By JAGORACLE on Dec 14, 2011

To check the software versions on a single node. Software version is the lastest version installed in on an cluster.
You would use this option,When you do the rolling upgrade.
$ crsctl query crs softwareversion [hostname]
Active version is lowest version anywhere in the cluster. This is the command you would normally need to use
$ crsctl query crs activeversion
The version of oracle Clusterware must be always greater than the oracle products installed in the clusters
Permanently operating oracle Clusterware (software version vs active version) is not supported.
To check the cluster name use,
   $ORA_CRS_HOME/bin/cemutlo -n


bash-4.3# ./crsctl query crs softwareversion testdb1
Oracle Clusterware version on node [testdb1] is [11.2.0.3.0]
bash-4.3# ./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]
/u02/appl/product/grid/11.2.0/bin
bash-4.3# ./cemutlo -n
scan-test

How to Start 11g R2 RAC Cluster

There are 2 methods.
Method 1:
1).Start the HAS (High Availability Service) on each node.
$ crsctl start has
2).To Start the Cluster on both the nodes.
$ crsctl start cluster –all
If OHASD is already running, you can start the Clusterware stack on any node from local node
Method 2:
1).Run the below command on each node. Starts both HAS and CRS
$ crsctl start crs
Noticed that just starting has also starts up the whole stack.

How to START and STOP Database services in Mount and Nomount mode.

oratest@srvctl start database -d TEST -o mount
oratest@srvctl start database -d TEST -o nomount

OS Watcher Installation in RAC

 Step:1 Download and untar the oswbb812.tar under the grid user in RAC on the both nodes. Follow the OS Watcher User's Guide (Doc ID 153...