23 June, 2017

ORA-01102: cannot mount database in EXCLUSIVE mode

I have encountered ORA-01102: cannot mount database in EXCLUSIVE mode error while starting new database.


SQL> startup;
ORACLE instance started.
Total System Global Area 3355443200 bytes
Fixed Size                  2929936 bytes
Variable Size            1929382640 bytes
Database Buffers         1409286144 bytes
Redo Buffers               13844480 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode



Cause : Some other instance has the database mounted exclusive or shared.


Action: Shut down other instance or mount in a compatible mode 


ORA-01102 occurs when you are mounting(opening) database , typically because another instance is already opened in parallel (exclusive) mode.

I have noticed 2 instances are running


[oracle@rsvmsb075 ~]$ ps -ef | grep pmon
oracle    1154     1  0 Jun21 ?        00:00:06 ora_pmon_test1
oracle   15652     1  0 21:17 ?        00:00:00 ora_pmon_TEST1
oracle   15759 15626  0 21:20 pts/0    00:00:00 grep pmon

Stopped 2 instances and modified .bash_profile correctly.


Now i am able to start the database without any issues .

SQL> startup;
ORACLE instance started.

Total System Global Area 3355443200 bytes
Fixed Size                  2929936 bytes
Variable Size            1929382640 bytes
Database Buffers         1409286144 bytes
Redo Buffers               13844480 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
TEST1     READ WRITE


28 May, 2017

How to check RMAN backup channels

set lines 200
set pages 200


select s.sid,p.spid,s.client_info
from v$process p, v$session s
where p.addr = s.paddr and client_info like '%rman%';



       SID SPID                     CLIENT_INFO
---------- ------------------------ ---------------------------
      1187 20672                    rman channel=ORA_DISK_5
      1224 20673                    rman channel=ORA_DISK_6
      1628 20674                    rman channel=ORA_DISK_7
       268 20667                    rman channel=ORA_DISK_1
       656 20668                    rman channel=ORA_DISK_2
       844 20669                    rman channel=ORA_DISK_3
       962 20671                    rman channel=ORA_DISK_4
      1665 20685                    rman channel=ORA_DISK_8
      2087 20731                    rman channel=ORA_DISK_13
      2386 20692                    rman channel=ORA_DISK_9
      2536 20705                    rman channel=ORA_DISK_10
      2723 20710                    rman channel=ORA_DISK_11
       875 20719                    rman channel=ORA_DISK_12
      2220 20732                    rman channel=ORA_DISK_14
      2625 20733                    rman channel=ORA_DISK_15
      2667 20738                    rman channel=ORA_DISK_16

16 rows selected.


22 April, 2017

Script to gather the Apache, WLS and Apps log files

#####################################################################################
#### Start of script for EBS 12.1.x
#####################################################################################
(
# pick up files which have been modified
HowManyDaysOld=3
echo "Picking up files which have been modified in the last ${HowManyDaysOld} days"
set -x
find $LOG_HOME/ora/10.1.3 -type f -mtime -${HowManyDaysOld} > m.tmp
find $LOG_HOME/appl/admin -type f -mtime -${HowManyDaysOld} >> m.tmp
find $LOG_HOME/appl/rgf -type f -mtime -${HowManyDaysOld} >> m.tmp
zip -r AppsLogFiles_`hostname`_`date '+%m%d%y'`.zip -@ < m.tmp
rm m.tmp
) 2>&1 | tee mzLogZip.out
#####################################################################################
#### End of script
#####################################################################################

18 April, 2017

Script to List Materialized Views Dependent on Specific Tables

This script will report on any materialized views that are dependent on a specific table.

REM LOCATION:   Object Management\Materialized Views and Materialized View Logs
REM FUNCTION:   Find dependent tables for a given MView
REM TESTED ON:  10.2.0.3, 11.1.0.6
REM PLATFORM:   non-specific
REM REQUIRES:   dbms_metadata
REM
REM  This is a part of the Knowledge Xpert for Oracle Administration library.
REM  Copyright (C) 2008 Quest Software
REM  All rights reserved.
REM
REM ******************** Knowledge Xpert for Oracle Administration ********************
UNDEF ENTER_OWNER_NAME
UNDEF ENTER_TABLE_NAME
SET serveroutput on
SET feedback off

DECLARE
   v_output   VARCHAR2 (2000);
   v_owner    VARCHAR2 (30);
   v_table    VARCHAR2 (30);
BEGIN
   v_owner := UPPER ('&&ENTER_OWNER_NAME');
   v_table := UPPER ('&&ENTER_TABLE_NAME');
   dbms_mview.get_mv_dependencies (v_owner || '.' || v_table, v_output);
   DBMS_OUTPUT.put_line (CHR (13));
   DBMS_OUTPUT.put_line
      ('Materialized Views Dependent on table      &&ENTER_OWNER_NAME..&&ENTER_TABLE_NAME'
      );
   DBMS_OUTPUT.put_line (CHR (13));
   DBMS_OUTPUT.put_line (v_output);
END;
/
 
 

Sample Output

 

Materialized Views Dependent on table      SCOTT.EMP

"SCOTT"."MV_TEST","SCOTT"."MV_EMP" 
 
 
 
or
 
 
 
select * from dba_dependencies where referenced_name='MSC_TRADING_PARTNERS' and TYPE='MATERIALIZED VIEW'; 

 

09 March, 2017

Refresh Snapshot Process Doesn't Start Because of Concurrent Manager Unavailability

When launching Collections, the Planning Data Pull fails with the following error: "Refresh Snapshot process could not get started after waiting for X minutes because of Concurrent Manager Unavailability". This can happen in a centralized instance when dblink information has been populated in msc_apps_instances inadvertently. When dblink information is populated, the Planning Data Pull tries to launch the refresh collection snapshot using the dblink information available, but it fails to find a connected instance, and finally times out.
To resolve, run the following sql:


SELECT instance_id,instance_code, 
nvl(a2m_dblink,'Null'),nvl(m2a_dblink,'Null') 
FROM msc_apps_instances ;

If the above sql returns a value for a2mdbling and m2adblink other than the value 'Null', then the setup is wrong, and you need to do the following:
  1. Delete the records from the table MRP_AP_APPS_INSTANCES_ALL as follows:
     
    DELETE
    FROM mrp_ap_apps_instances_all
    WHERE instance_code = '&instance_code'; 
     
    Commit;
     
     
  2. Go into the Advanced Supply Chain Planning Administrator responsibility.
  3. Navigate to Admin > Instances.
  4. Remove the dblink information. This will change the record in msc_apps_instances, mrp_ap_apps_instances_all and mrp_ap_apps_instance.
  5. Confirm whether the dblink information has correctly populated as Null in the msc_apps_instances using the following sql:
     
     
    SELECT instance_id,instance_code,
    nvl (a2m_dblink,'Null'),nvl (m2a_dblink,'Null')
    FROM msc_apps_instances;

28 February, 2017

How to identify if a port is listening on a unix server

We often get into a situation wherein we have to check if a particular port is being used by some process.
 
Command

netstat -an | grep [port number] | grep LISTEN

Command to identify the OS process associated with a port

lsof -i tcp:[port number]

26 January, 2017

How You Can Reset The Sequence Number For The REQUEST_ID


  • goal: How You Can Reset The Sequence Number For The REQUEST_ID
  • fact: Oracle Application Object Library
fix: A-Please ensure that you have a current system backup prior to performing this process. 1-Log in to SQLPLUS as apps/'apps password'.(If it doesn't work Use with SYSTEM user from DB node)
 2-SQL> drop sequence fnd_concurrent_requests_s; 

3-SQL> create sequence fnd_concurrent_requests_s 
  start with xxxx; 
 
4-Check the sequences again. 
    
     SQL> select max(request_id) from fnd_concurrent_requests;  
     from system.dual;    
                     
B-The value from step 4 should be bigger than value from step 3.

Finding OPP Manager log for a concurrent request

=> Use below query to find the OPP manager log for a concurrent request.  SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.lo...