Tuesday, June 27, 2017

You have Encountered an unexpected error .Please contact the System Administrator for Assistance.

You have Encountered an unexpected error .Please contact the System Administrator for Assistance.


Issue with the connection and java




Solution -

To implement the solution, please execute the following steps: 

1.Please set the Minimum Capacity to 0 in below path and monitor the logs to see if you still observe the same issue. this parameter doesn't need to bounce the WebLogic server to take affect. 

Services (Tree Link) -> Data Sources (Tree Link) -> EBSDataSource (Page Link) -> Configuration(tab)-> Connection Pool -> Advanced ->

2. Retest the issue.

3. Migrate the solution as appropriate to other environments.
 

Monday, June 26, 2017

ASM queries

To check ASM diskgroup usage details:
To check ASM diskgroup usage details:
-----------------------------------------------------

SET LINESIZE  145
SET PAGESIZE  9999
SET VERIFY    off
COLUMN group_name             FORMAT a20           HEAD 'Disk Group|Name'
COLUMN sector_size            FORMAT 99,999        HEAD 'Sector|Size'
COLUMN block_size             FORMAT 99,999        HEAD 'Block|Size'
COLUMN allocation_unit_size   FORMAT 999,999,999   HEAD 'Allocation|Unit Size'
COLUMN state                  FORMAT a11           HEAD 'State'
COLUMN type                   FORMAT a6            HEAD 'Type'
COLUMN total_gb               FORMAT 999,999,999   HEAD 'Total Size (GB)'
COLUMN free_gb                FORMAT 999,999,999   HEAD 'Free Size (GB)'
COLUMN used_gb                FORMAT 999,999,999   HEAD 'Used Size (GB)'
COLUMN pct_used               FORMAT 999.99        HEAD 'Pct. Used'
break on report on disk_group_name skip 1
compute sum label "Grand Total: " of total_gb used_gb on report
SELECT
 group_number                             group_number
 ,name                                     group_name
 , sector_size                              sector_size
  , block_size                               block_size
  , allocation_unit_size                     allocation_unit_size
  , state                                    state
  , type                                     type
  , total_mb/1024                                 total_gb
  ,free_mb/1024                                   free_gb
 , (total_mb - free_mb)/1024                     used_gb
  , ROUND((1- (free_mb / total_mb))*100, 2)  pct_used FROM
    v$asm_diskgroup
where total_mb > 0
order by name;

To Check ASM disk details of a particular diskgroup:
------------------------------------------------------------------------

col path for a45
set lines 300 pages 500
col NAME for a30
col HEADER_STATUS for a15
col STATE for a10
col MODE_STATUS for a11
col FAILGROUP for a10
col MOUNT_STATUS for a11
select GROUP_NUMBER,DISK_NUMBER,NAME,path,HEADER_STATUS,MOUNT_STATUS,MODE_STATUS,STATE,READ_ERRS,WRITE_ERRS,FAILGROUP
from V$asm_disk where GROUP_NUMBER='&n';

 To check offline disk details:
----------------------------------------

SQL> select count(*) from v$asm_disk where MODE_STATUS='OFFLINE' ;

col path for a45
set lines 300 pages 500
col NAME for a30
col HEADER_STATUS for a15
col STATE for a10
col MODE_STATUS for a11
col FAILGROUP for a10
col MOUNT_STATUS for a11
select GROUP_NUMBER,DISK_NUMBER,NAME,path,HEADER_STATUS,MOUNT_STATUS,MODE_STATUS,STATE,READ_ERRS,WRITE_ERRS,FAILGROUP
from V$asm_disk where MODE_STATUS='OFFLINE';

 To check CANDIDATE & FORMER ASM disk details:
---------------------------------------------

col path for a50
set lines 300 pages 300
col NAME for a30
col HEADER_STATUS for a15
select GROUP_NUMBER,DISK_NUMBER,NAME,path,HEADER_STATUS,MOUNT_STATUS,MODE_STATUS,STATE from V$asm_disk where HEADER_STATUS in ('CANDIDATE','FORMER');

Note:
----

CANDIDATE - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement

FORMER - Disk was once part of a disk group but has been dropped cleanly from the group. It may be added to a
new disk group with the ALTER DISKGROUP statement.






* To drop a disk from a diskgroup:
    --------------------------------------------

alter diskgroup DATA_DG drop disk DATA_DG_0000  REBALANCE POWER 5;

(Or)

ALTER DISKGROUP DATA_DG DROP DISK DATA_DG_0000;


Note: REBALANCE POWER is optional here.if u omit REBALANCE POWER option then rebalance power defaults to the value of the ASM_POWER_LIMIT initialization parameter.We can check existing power limit by using below command.

show parameter asm_power_limit

 To add a disk to a diskgroup:
------------------------------

alter DISKGOUP DATA_DG add disk '/dev/asm-disk3' REBALANCE POWER 5;

or

ALTER DISKGROUP DATA_DG ADD DISK '/dev/asm-disk3';


Note:We can get disk path details from v$asm_disk view.

* To start rebalance for a diskgroup manually:
-----------------------------------------------------
$ sqlplus / as sysasm
ALTER DISKGROUP DATA_DG REBALANCE POWER 4;

or

ALTER DISKGROUP DATA_DG REBALANCE POWER 4 WAIT;

Note:
The ALTER DISKGROUP...REBALANCE command by default returns immediately so that you can issue other commands while the rebalance operation takes place asynchronously
in the background. You can query the V$ASM_OPERATION view for the status of the rebalance operation.
If you want the ALTER DISKGROUP...REBALANCE command to wait until the rebalance operation is complete before returning, you can add the WAIT keyword to the REBALANCE clause.




To check rebalance operation.
------------------------------------

SELECT group_number, operation, state, power, est_minutes FROM gv$asm_operation;

set lines 300 pages 300
select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from GV$ASM_OPERATION where
GROUP_NUMBER=(select GROUP_NUMBER from v$asm_diskgroup where NAME='<Disk group name>');



* To increase rebalance power for an ongoing rebalance operation
-----------------------------------------------------------------------------------

alter diskgroup DATA_DG rebalance power 6;

Note: if the COMPATIBLE.ASM disk group attribute is set to 11.2.0.2 or higher,
then the range of values of asm_power_limit is 0 to 1024..Default value is 1.


* To halt ongoing ASM rebalance operation:
------------------------------------------

alter diskgroup DATA_DG rebalance power 0;

* To check Disk Group Attributes details:
---------------------------------------

COLUMN name FORMAT A40
COLUMN value FORMAT A50
set lines 300 pages 300

SELECT group_number, name, value FROM v$asm_attribute ORDER BY group_number, name;


(ex:disk_repair_time,compatible.asm)

* To change diskgroup attributes:
---------------------------------

alter DISKGROUP DATA_DG set ATTRIBUTE 'disk_repair_time'='24h';

ALTER DISKGROUP DATA_DG SET ATTRIBUTE 'compatible.asm' = '11.1';


* ASM views:
----------------------
V$ASM_DISKGROUP
V$ASM_DISK
V$ASM_OPERATION
V$ASM_ALIAS
V$ASM_ATTRIBUTE
V$ASM_CLIENT
V$ASM_DISK_IOSTAT
V$ASM_DISK_STAT
V$ASM_DISKGROUP_STAT
V$ASM_FILE
V$ASM_FILESYSTEM
V$ASM_TEMPLATE
V$ASM_USER
V$ASM_USERGROUP
V$ASM_USERGROUP_MEMBER
V$ASM_VOLUME
V$ASM_VOLUME_STAT



Sunday, June 25, 2017

R12.2 Log file locations

R12.2 Log file locations


Admin server
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/AdminServer/logs/AdminServer.log

Oacore logfile  -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oacore_server1/logs/oacore_server1.log

oacore out file  -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oacore_server1/logs/oacore_server1.out

oacore diagnostic log -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oacore_server1/logs/oacore_server1-diagnostic.log

oafm logfile -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oafm_server1/logs/oafm_server1.log

oafm outfile -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oafm_server1/logs/oafm_server1.out

oafm diagnostic log  - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/oafm_server1/logs/oafm_server1-diagnostic.log

form server log  - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms_server1/logs/forms_server1.log

form server access log  - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms_server1/logs/access.log

form server out file  - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms_server1/logs/forms_server1.out

form server diagnostic log  - $FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms_server1/logs/forms_server1-diagnostic.log

forms-c4ws_server1 log  - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms-c4ws_server1/logs/forms-c4ws_server1.log

forms-c4ws_server1 out file - 
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms-c4ws_server1/logs/forms-c4ws_server1.out

forms-c4ws_server1 diagnostic log  -  
$FMW_HOME/user_projects/domains/EBS_domain_$TWO_TASK/servers/forms-c4ws_server1/logs/forms-c4ws_server1-diagnostic.log

Friday, June 23, 2017

12.2 E-Business Suite - How To Enable FND: Debug / AF Logging When Login Is Not Possible


In this Document
Goal
Solution


APPLIES TO:

Oracle Applications Technology Stack - Version 12.2 to 12.2.3 [Release 12.2]
Information in this document applies to any platform.

GOAL

You may have a situation where you wish to enable FND Debug / AF Logging. The standard method to enable this type of debug is via profile options:
FND: Debug Log Enabled
FND: Debug Log Filename for Middle-Tier
FND: Debug Log Level
FND: Debug Log Module
However, in some circumstances you may be unable to login and set these profiles. This note explains the alternative method which is to enable the same level of debug via the Fusion Middleware configuration

SOLUTION

1/ Source the run file system environment file
2/ Backup file:
$INST_TOP/appl/admin/oacore_wls.properties
3/ Edit $INST_TOP/appl/admin/oacore_wls.properties and add the following lines. (adjust the variables accordingly)
AFLOG_ENABLED=true
AFLOG_LEVEL=statement
AFLOG_MODULE=%
AFLOG_FILENAME=/tmp/aflog.txt
4/ Re-start Middle tier services
5/ Reproduce the issue
6/ Collect the log file
7/ Disable logging by removing the lines which were addded to oacore_wls.properties and re-start services

Wednesday, June 14, 2017

Measure Throughput of RMAN

 I’m using 16 channels.  It seems to move along.   Every once in a while one of the channels finishes with one of the pieces.   Is there a way to measure how fast it is going?

The following query will serve this purpose:

set linesize 126
column Pct_Complete format 99.99
column client_info format a25
column sid format 999
column MB_PER_S format 999.99
select s.client_info,
l.sid,
l.serial#,
l.sofar,
l.totalwork,
round (l.sofar / l.totalwork*100,2) "Pct_Complete",
aio.MB_PER_S,
aio.LONG_WAIT_PCT
from v$session_longops l,
v$session s,
(select sid,
serial,
100* sum (long_waits) / sum (io_count) as "LONG_WAIT_PCT",
sum (effective_bytes_per_second)/1024/1024 as "MB_PER_S"
from v$backup_async_io
group by sid, serial) aio
where aio.sid = s.sid
and aio.serial = s.serial#
and l.opname like 'RMAN%'
and l.opname not like '%aggregate%'
and l.totalwork != 0
and l.sofar <> l.totalwork
and s.sid = l.sid
and s.serial# = l.serial#
order by 1;


CLIENT_INFO                SID    SERIAL#      SOFAR  TOTALWORK Pct_Complete MB_PER_S LONG_WAIT_PCT
------------------------- ---- ---------- ---------- ---------- ------------ -------- -------------
rman channel=ORA_DISK_11   150      22676     505343    1310720        38.55    112.23 7.17365149
rman channel=ORA_DISK_13   157      30929     297151    1310720        22.67    68.24       9.69663
rman channel=ORA_DISK_15   164      46354    1229631    1310720        93.81    59.56    9.87603869
rman channel=ORA_DISK_17   170      50562    1268543    1310720        96.78   118.82    9.07014682
rman channel=ORA_DISK_2    121       3182    1083775    1310720        82.69    72.77    9.04937857
rman channel=ORA_DISK_20   177       1125    1035135    1310720        78.97    64.06     9.5649286
rman channel=ORA_DISK_21   191      11483     883007    1310720        67.37    65.17    10.2629709
rman channel=ORA_DISK_23   198      43552     879807    1310720        67.12    58.13    10.7894355
rman channel=ORA_DISK_25   205      61706     478911    1310720        36.54   102.89    9.02772999
rman channel=ORA_DISK_27   212       6382     849279    1310720        64.79   113.14    9.22199866
rman channel=ORA_DISK_3    128      42605     399999    1310720        30.52    74.83    9.69133306
rman channel=ORA_DISK_31   226      62824     351679    1310720        26.83    68.14    9.70159909
rman channel=ORA_DISK_9    143       4726     388351    1310720        29.63   145.21 7.54851525

The fastest channel of any of them is pushing the blazing-fast speed of 145,21 MB per second.  

Wednesday, June 7, 2017

How to Determine the SQL_ID for a SQL Statement (Doc ID 1627387.1)

How to identify the SQL_ID of a statement

The SQL_ID of a statement can be found in an AWR or ASH report or by selecting it from the database data dictionary using the V$SQL view.

If the SQL can be identified with a particular identifiable string or by some kind of unique comment such as: /* TARGET SQL */ then this will make it easier to locate.

For example:

SELECT /* TARGET SQL */ * FROM dual;
SELECT sql_id, hash_value, substr(sql_text,1,40) sql_text  
FROM  v$sql 
WHERE sql_text like 'SELECT /* TARGET SQL */%'
SQL_ID SQL_TEXT ------------- ---------------------------------------- 0xzhrtn5gkpjs SELECT /* TARGET SQL */ * FROM dual




The hash_value is included here for convenience.
 You can also find the SQL_ID in the V$SQL view using a substitution variable:


SELECT sql_id, hash_value, SUBSTR(sql_text,1,40) Text
FROM v$sql
WHERE sql_text LIKE '%&An_Identifiable_String%';