Wednesday, 28 June 2017

Siebel - The SCBroker listening port may already be in use by another process

SBL-SCB-00016: Inherited socket (0) is invalid. The SCBroker listening port may already be in use by another process


STEPS
-----------------------

The issue can be reproduced at will with the following steps:
1. Login to siebel server box.
2. Run siebenv.sh
3. Run start_server all
4. Server is not coming up and throwing error.

BUSINESS IMPACT
-----------------------

The issue has the following business impact:
Customer has schedule a downtime to restart the siebel servers.As the siebel server is not come up all the Siebel Marketing users will affect,it will impact their production.


CAUSE
-----------------------

Issue is caused due to SCBroker component port is used by some other process in the System.


SOLUTION
------------------------

1)Open a command prompt in siebel server.
2)Run netstat -a
3)verify and kill if any process using  port 2321 or reboot the OS to release the 2321 port.
4)Bring up the Siebel server and verify the status.

Monday, 12 June 2017

Killing Session using alter session Command

ALTER SYSTEM KILL SESSION


For Single Instance Database:


SELECT S.SID, S.SERIAL#, S.OSUSER, S.PROGRAM FROM V$SESSION S;

ALTER SYSTEM KILL SESSION 'sid,serial#';


For RAC Instances:


SQL> select inst_id,sid,serial# from gv$session where username='SCOTT';

   INST_ID        SID    SERIAL# 
---------- ---------- ---------- 
         1        252 45632

SQL>  alter system kill session '252,45632,1'; 
 alter system kill session '252,45632,1' 
ERROR at line 1: 
ORA-00026: missing or invalid session ID

Now, it works:

SQL>  alter system kill session '252,45632,@1';

System altered.

Tuesday, 6 June 2017

Query to find Scheduled Concurrent Request in Oracle E - Business Suite

Query to find Oracle E - Business Suite scheduled concurrent requests:

select r.request_id,
       p.user_concurrent_program_name ||
       case
          when p.user_concurrent_program_name = 'Report Set' then
            (select ' - ' || s.user_request_set_name
              from apps.fnd_request_sets_tl s
             where s.application_id = r.argument1
               and s.request_set_id = r.argument2
               and language = 'US'
            )
          when p.user_concurrent_program_name = 'Check Periodic Alert' then
            (select ' - ' || a.alert_name
              from apps.alr_alerts a
             where a.application_id = r.argument1
               and a.alert_id = r.argument2
               and language = 'US'
            )
       end concurrent_program_name,
       decode(c.class_type,
              'P', 'Periodic',
              'S', 'On Specific Days',
              'X', 'Advanced',
              c.class_type
             ) schedule_type,  
       case
          when c.class_type = 'P' then
            'Repeat every ' ||
            substr(c.class_info, 1, instr(c.class_info, ':') - 1) ||
            decode(substr(c.class_info, instr(c.class_info, ':', 1, 1) + 1, 1),
                   'N', ' minutes',
                   'M', ' months',
                   'H', ' hours',
                   'D', ' days') ||
            decode(substr(c.class_info, instr(c.class_info, ':', 1, 2) + 1, 1),
                  'S', ' from the start of the prior run',
                  'C', ' from the completion of the prior run')
          when c.class_type = 'S' then
             nvl2(dates.dates, 'Dates: ' || dates.dates || '. ', null) ||
             decode(substr(c.class_info, 32, 1), '1', 'Last day of month ') ||
             decode(sign(to_number(substr(c.class_info, 33))),
                    '1',  'Days of week: ' ||
                    decode(substr(c.class_info, 33, 1), '1', 'Su ') ||
                    decode(substr(c.class_info, 34, 1), '1', 'Mo ') ||
                    decode(substr(c.class_info, 35, 1), '1', 'Tu ') ||
                    decode(substr(c.class_info, 36, 1), '1', 'We ') ||
                    decode(substr(c.class_info, 37, 1), '1', 'Th ') ||
                    decode(substr(c.class_info, 38, 1), '1', 'Fr ') ||
                    decode(substr(c.class_info, 39, 1), '1', 'Sa '))
       end schedule,
    r.requested_start_date next_run,
       case
          when p.user_concurrent_program_name != 'Report Set' and
               p.user_concurrent_program_name != 'Check Periodic Alert' then
               r.argument_text
       end argument_text,
       r.hold_flag on_hold,
       c.date1 start_date,
       c.date2 end_date,
       c.class_info, user_name
  from apps.fnd_concurrent_requests r,
       applsys.fnd_conc_release_classes c,
       apps.fnd_concurrent_programs_tl p,
       apps.fnd_user                    usr,
       (SELECT release_class_id,
               substr(max(SYS_CONNECT_BY_PATH(s, ' ')), 2) dates  ,a
          FROM (select release_class_id,
                       rank() over(partition by release_class_id order by s) a,
                       s
                  from (select c.class_info,
                               l,
                               c.release_class_id,
                               decode(substr(c.class_info, l, 1), '1', to_char(l)) s
                          from (select level l
                                  from dual
                               connect by level <= 31),
                               apps.fnd_conc_release_classes c
                         where c.class_type = 'S')
                  where s is not null)
         CONNECT BY PRIOR
                     (a || release_class_id) = (a - 1) || release_class_id
        group by release_class_id,a) dates
  where r.phase_code = 'P'
    and c.application_id = r.release_class_app_id
    and c.release_class_id = r.release_class_id
    and nvl(c.date2, sysdate + 1) > sysdate
    and c.class_type is not null
    and p.concurrent_program_id = r.concurrent_program_id
    and p.application_id = r.program_application_id
    and p.language = 'US'
    and dates.release_class_id(+) = r.release_class_id
    and usr.user_id = requested_by
  order by requested_by,on_hold, next_run;

Tuesday, 25 April 2017

ORA-16024: parameter log_archive_dest_1 cannot be parsed

ORA-16024 Referencing LOG_ARCHIVE_DEST_n Parameter


SYMPTOMS


You are using the log_archive_dest_n parameter in your pfile:

log_archive_dest_1 = 'location = /u01/oracle/arc' 

and are receiving an:
ORA-16024: parameter log_archive_dest_1 cannot be parsed

SOLUTION


Ensure that /u01/oracle/arc is a valid directory and that Oracle has write permissions there.

Remove the spaces on either side of the '=' sign.
You cannot have as space on either side on the '=' sign after 'location'.
Note that the word 'location' can be in either upper or lower case.
log_archive_dest_1 = 'location=/u01/oracle/arc'

Make sure that there is no trailing /.

Make sure that LOG_ARCHIVE_DEST is not set in the init.ora.
These 2 parameters are not compatible with each other.

NOTE

The error ORA-16024 could also be encountered when an SPFILE is used, for instance when upgrading a database.

To prevent that, you can remove the log_archive_dest from spfile by issuing

SQL> alter system reset log_archive_dest scope=spfile;

If still not working set the LOG_ARCHIVE_DEST_n parameter to a null value:

LOG_ARCHIVE_DEST_n=''

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

Sunday, 23 April 2017

How to change EBS R12 Database and Application Port Number

Execute the below in Application Tier:

Run adpreclone on Application Tier
   $ perl ./adpreclone.pl appsTier

Execute the following on the Database Tier:

Logon as oracle database user and source the env file for R12 RDBMS ORACLE_HOME

Start the database instance for which you want to change R12 port

Backup contextfile

Change as below in the contextfile

        dbport  : Change database port from 1521 to 1531
        cmanport : 1521 to 1531

Run adautocfg.sh

Execute the following in Application Tier:

Logon as application user and source the env for R12

Backup contextfile

Run adcfgclone and choose new port pool
   $ cd $COMMON_TOP/clone/bin
   $ perl ./adcfgclone.pl appsTier

Check new application URL

SQL> select home_url from icx_parameters;

HOME_URL
------------------------------------------------------------
http://<hostname.domainname>:8010/OA_HTML/AppsLogin

Run adpreclone on both apps and database tier

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

Wednesday, 19 April 2017

weblogic.store.PersistentStoreFatalException: [Store:280105]The persistent file store "WLS_DIAGNOSTICS" cannot open file WLS_DIAGNOSTICS000000.DAT

The persistent file store "WLS_DIAGNOSTICS" cannot open file WLS_DIAGNOSTICS000000.DAT

I examined $EBS_DOMAIN_HOME/servers/AdminServer/logs/AdminServer.log and found this error:

BEA-280060 - The persistent store "WLS_DIAGNOSTICS" encountered a fatal error, and it must be shut down: weblogic.store.PersistentStoreFatalException: [Store:280105]The persistent file store "WLS_DIAGNOSTICS" cannot open file WLS_DIAGNOSTICS000000.DAT.
weblogic.store.PersistentStoreFatalException: [Store:280105]The persistent file store "WLS_DIAGNOSTICS" cannot open file WLS_DIAGNOSTICS000000.DAT.
        at weblogic.store.io.file.FileStoreIO.open(FileStoreIO.java:128)
        at weblogic.store.internal.PersistentStoreImpl.recoverStoreConnections(PersistentStoreImpl.java:435)
        at weblogic.store.internal.PersistentStoreImpl.open(PersistentStoreImpl.java:423)
        at weblogic.store.xa.PersistentStoreManagerXA.createFileStore(PersistentStoreManagerXA.java:117)
        at weblogic.diagnostics.archive.DiagnosticStoreRepository.getStore(DiagnosticStoreRepository.java:91)
        at weblogic.diagnostics.lifecycle.ArchiveLifecycleImpl.initialize(ArchiveLifecycleImpl.java:94)
        at weblogic.diagnostics.lifecycle.DiagnosticFoundationService.start(DiagnosticFoundationService.java:108)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.io.IOException: Error from fcntl() for file locking, Resource temporarily unavailable, errno=11
        at weblogic.store.io.file.direct.DirectIONative.openConsiderLock(Native Method)
        at weblogic.store.io.file.direct.DirectFileChannel.(DirectFileChannel.java:54)
        at weblogic.store.io.file.direct.DirectIOManager.open(DirectIOManager.java:179)
        at weblogic.store.io.file.StoreFile.openInternal(StoreFile.java:138)
        at weblogic.store.io.file.StoreFile.open(StoreFile.java:161)
        at weblogic.store.io.file.Heap.openStoreFile(Heap.java:401)
        at weblogic.store.io.file.Heap.open(Heap.java:325)
        at weblogic.store.io.file.FileStoreIO.open(FileStoreIO.java:117)
        at weblogic.store.internal.PersistentStoreImpl.recoverStoreConnections(PersistentStoreImpl.java:435)
        at weblogic.store.internal.PersistentStoreImpl.open(PersistentStoreImpl.java:423)
        at weblogic.store.xa.PersistentStoreManagerXA.createFileStore(PersistentStoreManagerXA.java:117)
        at weblogic.diagnostics.archive.DiagnosticStoreRepository.getStore(DiagnosticStoreRepository.java:91)
        at weblogic.diagnostics.lifecycle.ArchiveLifecycleImpl.initialize(ArchiveLifecycleImpl.java:94)
        at weblogic.diagnostics.lifecycle.DiagnosticFoundationService.start(DiagnosticFoundationService.java:108)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

A search on support.oracle.com for keywords resulted in this hit:

WebLogic Fails to Start with Error: “The persistent store "WLS_DIAGNOSTICS" encountered a fatal error, and it must be shut down: weblogic.store.PersistentStoreFatalException" (Doc ID 859622.1)

WORKAROUNDS:

This is a recurrent workaround. This workaround has to be applied every time the server(s) will be restarted. 

Go to DOMAIN_HOME/servers/<SERVERNAME>/data/ldap/ldapfiles and remove the EmbeddedLDAP.lok lock file
Delete the *.dat file under  DOMAIN_HOME/servers/<SERVERNAME>/data /store/default and DOMAIN_HOME/servers/<SERVERNAME>/data /store/diagnostics/
Remove the contents under  DOMAIN_HOME/servers/<SERVERNAME>/ tmp and DOMAIN_HOME/servers/<SERVERNAME>/ cache

Now start the server
./startWebLogic.sh

Monday, 20 March 2017

How to modify resource dependencies in CRS


I wanted to change the diskgroup used for flash recovery area. So I created a new diskgroup and updated the parameters

SQL> show parameter db_recovery_file_dest 

db_recovery_file_dest string +RACFRA

SQL> alter system set db_recovery_file_dest=’+FRA’

System altered.

SQL> show parameter db_recovery_file_dest

db_recovery_file_dest string +FRA

Also removed the old diskgroup

SQL> drop diskgroup RACFRA

Diskgroup dropped.

After that shutdown the database for some maintenance. But when I tried starting it back, it started throwing
following error
oragrid@node-20> srvctl start database -d mydb
PRCR-1079 : Failed to start resource ora.mydb.db
CRS-2640: Required resource ‘ora.RACFRA.dg’ is missing.
I was not sure, what exactly happened. As I already dropped this diskgroup, database & ASM diskgroup
dependency should have been removed. But error message was indicating something else
So my first check, was to see if the resource was still present


oragrid@node-20> crsctl stat res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–


ora.FRA.dg
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.LISTENER.lsnr
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.DG.dg
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.DG2.dg
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.DG3.dg
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.DG4.dg
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.asm
ONLINE ONLINE node-20 Started
ONLINE ONLINE node-21 Started
ora.eons
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.gsd
OFFLINE OFFLINE node-20
OFFLINE OFFLINE node-21
ora.net1.network
ONLINE ONLINE node-20
ONLINE ONLINE node-21
ora.ons
ONLINE ONLINE node-20
ONLINE ONLINE node-21
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE node-21
ora.oc4j
1 OFFLINE OFFLINE
ora.node-20.vip
1 ONLINE ONLINE node-20
ora.node-21.vip
1 ONLINE ONLINE node-21
ora.scan1.vip
1 ONLINE ONLINE node-21
ora.mydb.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown


crsctl output did not show this diskgroup. So checked the dependency for the database resource
# crsctl status resource ora.mydb.db -f
Where I found, that START_DEPENDENCIES still have reference to old diskgroup. So removed, re-added the


database & associated instances
oragrid@node-21> srvctl remove database -d mydb
oragrid@node-21> srvctl add database -d mydb -o /oracle/11gr2
ora11gr2@node-21> srvctl add instance -d mydb -i mydb1 -n node-20
ora11gr2@node-21> srvctl add instance -d mydb -i mydb2 -n node-21
Again checked the dependency for the database resource
# crsctl status resource ora.mydb.db -f
This time START_DEPENDENCIES was having correct set of ASM diskgroups & the old DG reference was
removed.

Now started the database, all was fine.
oragrid@node-21> srvctl start database -d mydb
So to avoid this problem, we should be using srvctl remove diskgroup, instead of using sqlplus.