Thursday, 20 June 2019

Listener Add & Register In Grid Infrastructure Standalone

Must shutdown/Down
Below mention all commands run on grid environment with grid user terminal. 
$ srvctl config listener
$ srvctl remov e listener
$ srvctl add listener -l listener -o /u01/oracle/PROD/db/tech_st/11.2.0
$ srvctl config listener
$ lsnrctl status
$ lsnrctl start
$ sqlplus / as sysdba
SQL> alter system register ;
Source: Internal R&D

How to Fix a Broken ASM SPFILE, held within ASM

My server rebooted itself and when it came back up, none of the databases or ASM had restarted. Everything is 11.2.0.3 or 11.2.0.1 with ASM being 11.2.0.3 – so Oracle Restart should have kicked in.
As usual, any identifying names, servers, domains, databases etc have been obfuscated to protect the innocent.

$srvctl start asm

PRCR-1079 : Failed to start resource ora.asm
CRS-5017: The resource action "ora.asm start" encountered the following error:
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'myserver.mydomain.net:1899'

The LOCAL_LISTENER parameter is incorrect, it should be ‘myserver.mydomain.com:1899’ with a ‘.com’ and not ‘.net’.
We have a problem in the spfile that needs to be fixed. Where is it located so that it can be converted to a pfile and corrected? The usual place to check is $ORACLE_HOME/dbs.

$cd $ORACLE_HOME/dbs

$ls spfile*

spfile* not found

It isn’t in the normal location, what does Oracle Restart know?
$srvctl config asm -a | grep -i spfile

Spfile: +DATA/asm/asmparameterfile/registry.123.123456789

The spfile name may also be listed in the alert.log as part of a startup. It is for me in this case:

$grep "^Using.*spfile" alert_+ASM.log | tail -1
Using parameter settings in server-side spfile +DATA/asm/asmparameterfile/registry.123.123456789
Now we have a “Catch 22 chickens and egg” problem. The spfile is located inside ASM and we can’t start ASM to extract and fix it, because we need the (broken) parameter file to start ASM.
There are numerous blog postings on the internet that explain how to start ASM, or extract the spfile, when the spfile it needs to start is in ASM, but due to a missing $GRID_HOME/gpnp/myserver/profiles/peer/profile.xml file, those were not an option here. (I think the problem is that the profile.xml is used by RAC only.)
On a normal database, you can create a pfile from the spfile even if the instance is not running. Will that work?
$sqlplus / as sysasm

Connected to an idle instance.

SQL> create pfile='/home/oracle/pfile.ora' from spfile='+DATA/asm/asmparameterfile/registry.123.123456789';
create pfile='/home/oracle/pfile.ora' from spfile='+DATA/asm/asmparameterfile/registry.123.123456789'
*
ERROR at line 1:
ORA-01565: error in identifying file '+DATA/asm/asmparameterfile/registry.123.123456789'
ORA-17503: ksfdopn:2 Failed to open file +DATA/asm/asmparameterfile/registry.123.123456789
ORA-01034: ORACLE not available

That was expected, but had to be tried!
Method 1
Maybe a default pfile can be created from the alert log’s listing of the non-default startup parameters from the last time it started?
$cd /app/oracle/diag/asm/+asm/+ASM/trace

$view alert_+ASM.log

...
Using parameter settings in server-side spfile +DATA/asm/asmparameterfile/registry.123.123456789
System parameters with non-default values:
  large_pool_size                                              = 12M
  instance_type                                                 = "asm"
  remote_login_passwordfile                      = "EXCLUSIVE"
  local_listener                                                  = "myserver.mydomain.com:1899"
  asm_diskstring                                               = "/dev/oracleasm/disks/disk*"
  asm_diskgroups                                            = "FRA"
  asm_power_limit                                                          = 1
  diagnostic_dest                                             = "/app/oracle"
USER (ospid: 9251): terminating the instance due to error 119
Instance terminated by USER, pid              = 9251

So that’s one way of extracting the non-default startup parameters into a temporary pfile, for those awkward times when you cannot get at the spfile to start ASM as the spfile is located within ASM itself. Extract the above settings from the alert.log and startup with that temporary pfile. Once started, create a new spfile, update Oracle Restart and Robert is your mother’s brother.
However, depending on how long ASM has been up, what’s to say that any of the listed parameters are still valid? After all, since startup, someone changed the LOCAL_LISTENER parameter and it was only when the instance next started up that the foul up became apparent.

Method 2

There is another way. Thinking, as they say outside the box (Yuk! I avoid cliches like the plague!) about how tnsnames.ora allows IFILEcommands, suggests that perhaps Oracle might allow me to create a pfile which specifies the existing spfile name and lets me set the correct LOCAL_LISTENER parameter to overwrite the broken setting in the spfile?
I confess, I also had a very vague recollection from way back when spfiles were first introduced, that I had seen/read/heard/tried something like this already, but as mentioned, it was a very vague recollection! Nevertheless, let’s create a plain vanilla pfile:

$vi /home/oracle/initASMtemp.ora

*.spfile="+DATA/asm/asmparameterfile/registry.123.123456789"
*.LOCAL_LISTENER='myserver.mydomain.com:1899'

The correction goes after the spfile, so that it takes effect rather than being overridden by the broken one in the spfile – assuming this trick works!

$sqlplus / as sysasm
Connected to an idle instance.

SQL> startup pfile='/home/oracle/initASMtemp.ora';
ASM instance started

Total System Global Area              283930624 bytes
Fixed Size                                           2181896 bytes
Variable Size                                     256582904 bytes
ASM Cache                                        25165824 bytes
ASM diskgroups mounted

We have a running ASM system!
Fix the broken parameter in the existing spfile:
SQL> alter system set local_listener='myserver.mydomain.com:1899' scope=spfile;
System altered.

SQL> show parameter local

NAME             TYPE        VALUE
---------------- ----------- -------------------------------
local_listener   string      myserver.mydomain.com:1899

A shutdown and restart later and the spfile is once more working correctly.


Source: Internet / Internal R&D

Upgrading timezone_file version manually during Oracle 12c upgrade

Some of us might have faced a situation to upgrade timezone_file version manually during Oracle 12c upgrade. Here are the steps to follow in Windows.
When you upgrade Oracle to 12102, you will have an option in DBUA to upgrade the timezone data.



If you don’t check it, then, when you run “post_upgrade_checks.sql”, it will give you the below warning message.


Remember that there will be no “upgrade_TSTZ.sql” script to upgrade the timezone data in Oracle 12102 under folder <ORACLE_HOME>\sap\ora-upgrade\post_upgrade”. We have this script only in 11g.
So the only option is to upgrade it manually.

Steps:

  • Confirm the current version


Check the latest version of the timezone_file in location “<ORACLE_HOME>\oracore\zoneinfo”, the file format will be “timezlrg_18.dat” (12c release time zone version)


  • Shutdown your database and startup in upgrade mode


  • execute SQL command “SQL>EXEC DBMS_DST.BEGIN_UPGRADE (18);



  • Shutdown and startup your database again and check for the new version is updated.



Then run “post_upgrade_checks.sql” script again and the warning will disappear now.


Source : Internet / Internal R&D

Wednesday, 19 June 2019

Upgrade 12.1.3: PO Document Approval Manager (POXCON), Receiving Transaction Manager (RCVOLTM) and INV Remote Procedure Manager (INCTM) Do Not Start / Die After Restart (Doc ID 1413393.1)




APPLIES TO:
Oracle Inventory Management - Version 12.1.3 and later
Oracle Purchasing - Version 12.1.3 and later
Oracle iProcurement - Version 12.1.3 and later
Information in this document applies to any platform.
Executable:POXCON - PO Document Approval Manager Program
Executable:RCVOLTM - Receiving Transaction Manager
Executable:INCTM - Inventory Remote Procedure Manager

SYMPTOMS
After upgrading to 12.1.3 the PO Document Approval Manager dies immediately after starting it up. The same behavior is observed with the Receiving Transaction Manager.
In the Administer Concurrent Manager form, the following is shown:
Manager
Actual
Target
INV Remote Procedure Manager
0
5
PO Document Approval Manager
0
3
Receiving Transaction Manager
0
3
The following sql can be used to check the managers:
Select CONCURRENT_QUEUE_ID, USER_CONCURRENT_QUEUE_NAME, DESCRIPTION, CONCURRENT_QUEUE_NAME, ENABLED_FLAG, RUNNING_PROCESSES, TARGET_PROCESSES
from FND_CONCURRENT_QUEUES_VL
where CONCURRENT_QUEUE_NAME in ('INVMGR','PODAMGR','RCVOLTM');

The issue can be reproduced at will with the following steps:
1. Using a System Administrator responsibility navigate to Concurrent > Manager > Administer.
2. Query up the PO Document Approval Manager and activate it.
3. The PO Document Approval Manager dies immediately.
IMPORTANT NOTE: The issue can also occur where only one of the transaction managers above (for example only Receiving Transaction Manager) does not start.  It is also possible to see the transaction manager status field with value 'System Hold Fix Manager before resetting counters'
NOTE: This can address issue where receiving related transactions in rcv_transaction_interface become stuck in ONLINE PENDING status
The following additional symptoms may be encountered:
The following error may be encountered:
Routine AFPEIM encountered an error while starting concurrent manager RCVOLTM.
The manager is not able to start properly.
The manager has been put on a SYSTEM HOLD to allow the system administrator to address the issue.
When addressed, the "Fixed" button on the Administer Managers screen can be pressed to restart the manager.

iProcurement may display an error like the following:

'The transaction could not be completed successfully. Please contact the system administrator for assistance.'  This can occur in iProcurement after patching, and after the executables are compiled and the receiving transaction manager is restarted.

In the  Inventory application the Inventory transaction worker is erring for Internal Orders. There is no information in the log file and the output is blank.

Error messages at mtl_transaction_interface is showing:
Error code : Transaction processor error
Error explanation: o concurrent manager is defined to process this request, so it cannot be processed.
Contact your system administrator to define a concurrent manager to process this request or to verify that exist

when the issue above happens, the receiving transaction manager shows:
Actual 0
Target - a given number, for example 20 or 30
Running  null 

The Oracle Application Manager (OAM) may show an error like the following:
Manager Name
Program RCVTPO
User       <USERNAME>
Action 1|Unable to remove timed-out m
Message ORA-25263: no message in queue APPLSYS.FND_CP_TM_AQ with message ID FBB4C77B44736383E04347001CAC78D3 ORA-25228: timeout or end-of-fetch during message dequeue from APPLSYS.FND_CP_TM_RET_AQ
Function fnd_trn_queue.send_message
Elapsed Time(1/100sec) 0
 Manager log may show:
+---------------------------------------------------------------------------+
Application Object Library: Concurrent Processing version 11.5
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
Server concurrent manager started (NODE=<NODE_ID>) : 13-MAY-2015 11:39:27
+---------------------------------------------------------------------------+
...
13-MAY-2015 11:40:28 : Transaction Manager has shutdown.

CAUSE
In afptm.lc, monitor_self_exit, a cursor "cursor" is defined static.  In R12.main, execution silently fails.
SOLUTION
To implement the solution, please execute the following steps:
1. Download and review the readme and prerequisites for Patch 19402657:R12.FND.B "THE INVENTORY REMOTE PROCEDURE MANAGER WON'T START".

2. Ensure that you have taken a backup of your system before applying the recommended patch.

3. Apply the patch in a test environment where the issue occurs.

4. Confirm the following file version:

       afptm.lc 120.6.12010000.5

You can use a Unix command like the following:
       strings $FND_TOP/bin/FNDTMTST | grep afptm.lc | grep Header
       OR
       adident Header $FND_TOP/lib/afptm.*

or Run Diagnostics: Apps Check report for Application =  Application Object Library
5. After the patch run adrelink:
cd $PO_TOP/bin
adrelink.sh force=y ranlib=y "PO RCVOLTM"
adrelink.sh force=y ranlib=y "PO POXCON"
6. Bounce the concurrent managers to instantiate the newly patched code.

7. Retest the issue.

8. Migrate the solution as appropriate to other environments.
Also the following query can be used to determine the file version:

select af.filename , afv.version_segment1
||'.'||afv.version_segment2
||'.'||max(to_number(substr(afv.version, decode(instr(afv.version, '.', 1, 2), 0, null, instr(afv.version, '.', 1, 2) + 1)
, instr(afv.version, '.', 1, 3) - 1 - instr(afv.version, '.', 1, 2))))
||'.'||max(to_number(substr(afv.version, decode(instr(afv.version, '.', 1, 3), 0, null, instr(afv.version, '.', 1, 3) + 1)))) version
from ad_files af, ad_file_versions afv
where af.file_id = afv.file_id
and (afv.version_segment1+afv.version_segment2/power(10,length(afv.version_segment2))) =
(select max(afv1.version_segment1+afv1.version_segment2/power(10,length(afv1.version_segment2)))
from ad_files af1, ad_file_versions afv1
where af1.app_short_name = af.app_short_name
and af1.subdir = af.subdir
and af1.filename = af.filename
and af1.file_id = afv1.file_id)
and af.filename in ('afptm.o')
group by af.filename, afv.version_segment1, afv.version_segment2;



Source : Oracle Metalink

What To Do When Receiving A Signal 11 For One or All Oracle Alerts? (Doc ID 1354644.1)


APPLIES TO:
Oracle Alert - Version 11.5.10.2 to 12.2 [Release 11.5 to 12.2]
Information in this document applies to any platform.
ALECDC 
ALECTC 
ALPPNR
ALRALERT.fmb 
alssmn.lc
aluapp.lc
GOAL
Why does Oracle Alert fail with Signal 11 error and what can be done?

<ALR_TOP>/bin/ALECDC
<ALR_TOP>/bin/ALECTC
<ALR_TOP>/bin/ALPPNR
Program was terminated by signal 11
SOLUTION
ATTENTION!
With the implementation of the 11G Database (and later) Case Sensitivity Project (Bug 10138986) in Release 12.1.X, ALL Alerts may fail with Signal 11 and therefore would need to apply the following:
Patch 13728376 - Alert fails with signal 11 error after password case sensitivity fix
delivering file: aluapp.lc  120.1.12010000.4.
Signal 11 is a generic error message that is caused by lack of Operating System Resources (Memory).
Oracle Alerts has never been known to process large amounts of data.

The following are some methods that have been known to resolve or alleviate generating Signal 11 errors in Oracle Alerts.
* Upgrade to the latest Alert code.
To check the file versions, run
adident Header $ALR_TOP/bin/ALECDC
adident Header $ALR_TOP/bin/ALPPWF  
or
strings $ALR_TOP/bin/ALECDC | grep Header | grep alssmn.lc
strings $ALR_TOP/bin/ALPPWF | grep Header | grep aluapp.lc

To date, the following patches are available:
11.5.10: 
Patch 5839356 Email body was getting truncated early for a message exceeding 64k (alssmn.lc 115.48)

12.0: 
Patch 8715092 CC AND BCC RECIPIENTS SHOWN IN TO FIELD IN ALERT MAILS (alssmn.lc 120.7.12000000.21)
12.0: 
Patch 7592660 RELEASE 12 BUG FOR SIGNAL 11 WITH ALPPWF (alpiwf.lc 120.0.12000000.5)

12.1: 
Patch 13728376 - Alert fails with signal 11 error after password case sensitivity fix (aluapp.lc  120.1.12010000.4)
12.1: 
Patch 9908378 - RELEASE 12 BUG FOR SIGNAL 11 WITH ALPPWF  (alppwf.lc  120.0.12010000.3)
12.1: 
Patch 9817770 POST-R12.ATG_PF.B.DELTA.3 CONSOLIDATED PATCH (alssmn.lc 120.22.12010000.9)
12.2: Fix included in 12.2.2 and later releases, via unpublished defect 10090649 - TST122: ALECTC IS GETTING FAILED WITH SIGNAL 11 ERROR

* Setup a dedicated concurrent manager for Oracle Alert executables. By default, Alerts run under the Standard manager.
Using System Administrator Responsibility, navigate to Concurrent : Manager > Define
Add new: Alert Concurrent Manager (name may vary; model from Standard manager)
Add specialization rules. Include Program Alert :
ALECDC (Check Periodic Alert)
ALECTC (Check Event Alert)
ALEPPE (Periodic Alert Scheduler)
Save this and now query the Standard manager.
From the specialization rules here, Exclude the same three executables.
Bounce all the concurrent managers.

* Run the Alert during non-peak processing times.

* Evaluate the Select Statement. 
How many records are being retrieved? If the following clause is added to reduce the number of records retrieved, does the Alert still error:
and rownum < 10
How efficient is the SQL? Can it be improved? Use tools like SQLTXPLAIN.SQL for analysis. See "Troubleshooting Oracle Applications Performance Issues" (Doc ID 169935.1)
Are there any non-text characters being selected?
Are there any fields being selected that are of data type Long or Blob? Use the DESCRIBE command to check table columns.

* Is the Alert Action defined as Detail or Summary Level? Try a different Level. If using Summary Level, make sure the Template position is not changed (starting in column 1)
=**= Enter summary template below this line =**=
**
=**= Enter summary template above this line =**=

* Consider using another tool besides Alerts. Write a concurrent report
REFERENCES
NOTE:271367.1 - 11i : Oracle Alert Alert Check Setup Test
NOTE:471672.1 - R12.0.6+ : Oracle Alert Check Alert Setup Test

NOTE:1438919.1 - After Upgrade R12.1.3 All Alerts Are Completing With Signal 11
NOTE:1162153.1:1174735.1 
BUG:13728376 - OEL5.7: ALECDC PROGRAM WAS TERMINATED BY SIGNAL 11


Source: Oracle Metalink

How to Manage Default Parameter Audit_sys_operations=True and Manage Audit log Size

This article is depending on database parameter audit_sys_operations. This parameter by default is true in 12cR1 to onward in this article we are managing the log file size and we can see that how can we change the value of this parameter.

[furqandb@ebstest ~]$ sqlplus sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue May 28 10:05:23 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>
SQL> show parameter audit

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------------------------
audit_file_dest                          string          /u01/test/db/tech_st/12.1.0/rdbms/audit
audit_sys_operations                boolean       TRUE
audit_syslog_level                    string
audit_trail                                 string            NONE
unified_audit_sga_queue_size integer         1048576

SQL>  alter system set audit_sys_operations=false scope=spfile;

System altered.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup;
ORACLE instance started.
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
Total System Global Area 3221225472 bytes
Fixed Size                   2929552 bytes
Variable Size               905972848 bytes
Database Buffers         2298478592 bytes
Redo Buffers               13844480 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter audit

NAME                                      TYPE      VALUE
------------------------------------ ----------- ---------------------------------------
audit_file_dest                          string       /u01/test/db/tech_st/12.1.0/rdbms/audit
audit_sys_operations                 boolean   FALSE
audit_syslog_level                     string
audit_trail                                   string      NONE
unified_audit_sga_queue_size   integer    1048576
SQL>

Five Days
==========
[furqandb@ebstest audit]$ find /u01/test/db/tech_st/12.1.0/rdbms/audit/ -type f -name '*.aud' -mtime +5 -exec rm {} \;

Three Days
==========
[furqandb@ebstest audit]$ find /u01/test/db/tech_st/12.1.0/rdbms/audit/ -type f -name '*.aud' -mtime +3 -exec rm {} \;

Source: Internal R&D

Tuesday, 18 June 2019

How to Increase Java Heap Size in Oracle EBS R12


SELECT DEVELOPER_PARAMETERS from FND_CP_SERVICES
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');

J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m
OR
J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx1024

Before update ebs application down.
-----------------------------------------------

update FND_CP_SERVICES
set DEVELOPER_PARAMETERS =
'J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx2048m'
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');

After this autoconfig execute on both tier.
------------------------------------------------------

SQL> select DEVELOPER_PARAMETERS from FND_CP_SERVICES
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');
  2    3
DEVELOPER_PARAMETERS
--------------------------------------------------------------------------------
J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Ap