Friday, December 7, 2012

Production DBA Support scripts



To select the invalid objects

Select object_name, object_type,status from all_objects
   where status ='INVALID' and object_name like 'JA%';

                (or)

SELECT OWNER,object_name,object_type,status FROM DBA_OBJECTS  WHERE STATUS = 'INVALID'
order by owner,object_type


You can use adadmin utility to compile or you can use utlrp.sql script shipped with Oracle Database to compile Invalid Database Objects
 You can use ojspCompile.pl perl script shipped with Oracle apps to compile JSP files. This script is under $JTF_TOP/admin/scripts.
 Sample compilation method is

perl ojspCompile.pl --compile --quiet


To create user oracle and apps
 
    groupadd dba
    useradd -d /ora/oracle/9.2.3 -s /bin/sh -c "Oracle home" -g dba cmwora
    useradd -d /ora/apps/prodcomn -s /bin/sh -c "Oracle Application" -g dba cmwapps

    passwd cmwora
          enter passwd

TO start and stop

/etc/init.d/volmgt start/stop
 eject  or eject cdrom

TO be added in profile

PS1='ORACLE>/$ '
PATH="/usr/bin/zip-23:$PATH"
export PATH
. /oradb/oracle/9.2.1/DAT_projdevel.env


TO ENTER IN TO SQL Prompt  (env)
ORACLE_SID=TESTORA
export TESTORA

ORACLE_HOME=/oracle/9.2.1
export ORACLE_HOME

PATH=$ORACLE_HOME/bin:/usr/bin
export PATH

To create a NFS mount point
 Go to source node ( Ex .where the space is available (Projdevel)
      # Cd  /etc/dfs
      # more fstypes
      #more dfstab     (to view all  the sharable mountpoint)

create a backup directory where the space is available
example
root@projdevel # cd ..
root@projdevel # ls -ls
total 226
   6 drwxr-xr-x  77 oracle   dba         2560 Feb 15 11:42 9.2.3
   2 drwxr-xr-x   5 oratrg   dba          512 Nov 20 13:53 admin
   2 drwxr-xr-x   5 appltest dba          512 Nov 23 00:35 apps
 178 drwxr-xr-x   2 oratrg   dba        90624 Feb 15 14:42 archive
   2 drwxrwxrwx   2 oracle   dba         1024 Feb 17 07:50 backup
   2 drwxr-xr-x   2 root     other        512 Nov 21 15:42 rcp_scripts
  16 drwxr-xr-x   2 oracle   dba         7680 Jan 29 21:36 testdata
root@projdevel # cd backup
root@projdevel # pwd
/oracle/backup

        make the entry in dfstab
        share –F nfs –o rw /oracle/backup
example
root@projdevel # more dfstab
#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d ""] [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share -F nfs -o ro /ravi
share -F nfs -o rw /oracle/backup
# /etc/init.d/nfs.server start
#share    (to view the sharable paths)
create a mount point (dir) in root ( ex   rmanback)
#  mount –F nfs 172.16.1.203:/oracle/backup /rmanback
#df –h     (to verify the mount point)
   GOTO THE TARGET SERVER  ( Ex Production)
# mount –F nfs 172.16.1.203:/oracle/backup /rmanback

make the necessary changes in RMAN configuration




To create a new datafile in production (create first in SUN)

Step1)
vxassist -g racdg -U gen make 2048m layout=mirror SUN35100_0 SUN351001_0
                   (or)
vxassist -g racdg -U gen make 2048m layout=mirror SUN35100_1 SUN351001_2
Step 2)
            vxedit -g racdg set user=oracle group=dba  

Step 3)
          To verify the file name status

          vxprint –Aht| grep
                         
                    (reference
                                         vxdisk list
                                         vxprint –Aht|more  )
========================================================
to be included in system file ( /etc/system)

set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=500
set shmsys:shminfo_shmseg=50
set semsys:seminfo_semmsl=1024
set semsys:seminfo_semmns=1400
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767
To selecte all invalid database objects in a schema

       Note : SGA size can be increaced upto (4294967295  ie 4 GB). If more space is needed for SGA increase the size in the above parameter
        set shmsys:shminfo_shmmax=4294967295


To select the invalid objects

select 'alter ' || decode(object_type,'PACKAGE
BODY','PACKAGE',object_type)
|| ' ' || object_name || ' compile '  ||
decode(object_type,'PACKAGE BODY',' body;',';')  from user_objects
where object_type in ('FUNCTION','PACKAGE','PACKAGE
BODY','PROCEDURE','TRIGGER','VIEW')
and status = 'INVALID'
order by object_type , object_name;

set heading off;
set pagesize 500;
spool c:\dba\compile.sql;
select 'alter ' || object_type ||' '|| OBJECT_NAME  || ' compile ' || ';'
 from dba_objects where object_type in ('FUNCTION','PACKAGE','PROCEDURE','TRIGGER','PACKAGE BODY','VIEW')
AND STATUS ='INVALID';
spool off;

for running the script
@c:\dba\compile.sql

TO KILL THE  INACTIVE  FORMS AND SESSIONS

SELECT p.spid,s.process,s.status,s.machine,
to_char(s.logon_time,'mm-dd-yy hh24:mi:ss') Logon_Time,
s.last_call_et/3600 Last_Call_ET,
s.action,s.module,s.sid,s.serial#
FROM
V$SESSION s, V$PROCESS p
WHERE
s.paddr = p.addr
AND s.username IS NOT NULL
AND s.username = 'APPS'
AND s.osuser = 'applprod'
AND s.last_call_et/3600 > 1
and s.action like 'FRM%'
and s.status='INACTIVE' order by logon_time;


           database

Select
'alter system kill session '''||s.sid||','||s.serial#||''';',s.action
FROM
V$SESSION s, V$PROCESS p
WHERE
s.paddr = p.addr
AND s.username IS NOT NULL
AND s.username = 'APPS'
AND s.osuser = 'applprod'
AND s.last_call_et/3600 > 1
and s.action like 'FRM%'
and s.status='INACTIVE';

          Forms

SELECT
' '||s.machine||' kill -9 '||s.process, s.action
FROM
V$SESSION s, V$PROCESS p
WHERE
s.paddr = p.addr
AND s.username IS NOT NULL
AND s.username = 'APPS'
AND s.osuser = 'applprod'
AND s.last_call_et/3600 > 1
and s.action like 'FRM%'
and s.status='INACTIVE';


To Compile all invalid database objects in a schema
EXEC DBMS_UTILITY.COMPILE_SCHEMA( 'schema-name' );

To Compile all invalid database objects

declare
   sql_statement varchar2(200);
   cursor_id     number;
   ret_val       number;
begin
   dbms_output.put_line(chr(0));
   dbms_output.put_line('Re-compilation of Invalid Objects');
   dbms_output.put_line('---------------------------------');
   dbms_output.put_line(chr(0));
   for invalid in (select object_type, owner, object_name
                   from   sys.dba_objects o,
                          sys.order_object_by_dependency d
                   where  o.object_id    = d.object_id(+)
                     and  o.status       = 'INVALID'
                     and  o.object_type in ('PACKAGE', 'PACKAGE BODY',
                                            'FUNCTION',
                                            'PROCEDURE', 'TRIGGER',
                                            'VIEW')
                   order  by d.dlevel desc, o.object_type) loop
      if invalid.object_type = 'PACKAGE BODY' then
         sql_statement := 'alter package '||invalid.owner||'.'||invalid.object_name||
                          ' compile body';
      else
         sql_statement := 'alter '||invalid.object_type||' '||invalid.owner||'.'||
                          invalid.object_name||' compile';
      end if;
      /* now parse and execute the alter table statement */
      cursor_id := dbms_sql.open_cursor;
      dbms_sql.parse(cursor_id, sql_statement, dbms_sql.native);
      ret_val := dbms_sql.execute(cursor_id);
      dbms_sql.close_cursor(cursor_id);
      dbms_output.put_line(rpad(initcap(invalid.object_type)||' '||
                                invalid.object_name, 32)||' : compiled');
   end loop;
end;



User's Status in the ICX_SESSIONS Table

select
  disabled_flag,
  to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
  to_char(sysdate,'HH:MI:SS') Current_Time,
  USER_NAME,
  session_id,
  (SYSDATE-last_connect)*24*60 Mins_Idle,
  fnd_profile.value_specific
    ('ICX_SESSION_TIMEOUT',
     a.user_id,
     a.responsibility_id,
     a.responsibility_application_id,
     a.org_id,
     NULL
    ) TimeOut
from
  ICX_SESSIONS a, fnd_User b
where
  a.user_id=b.user_id
  and last_connect > sysdate-1/24;


To select the username and the process status
select a.requested_start_date,a.last_update_date,a.status_code,b.user_name
from fnd_concurrent_requests a,fnd_user b where a.requested_by = b.user_id and a.request_id = 677224


select a.requested_start_date,a.last_update_date,a.status_code,b.user_name ,a.argument_text
from fnd_concurrent_requests a,fnd_user b where a.requested_by = b.user_id and a.request_id = 677224


Steps to release the stuck for PO entry

Su – applprod
Cd $FND_TOP
Cd sql
Sqlplus apps/apps

SQL>
    Select org_id,release_num,wf_item_type,wf_item_key
From po_releases_all
Where po_header_id
In(select po_header_id from po_headers_all where segment1=’&PO_NUMBER’);

SQL>
select po_header_id,wf_item_type,wf_item_key
from po_headers_all
where segment1='168/2005'

SQL>@wfstatus.sql
 Enter value for 1:  POAPPRV
 Enter value for  2:  3319-4115


SQL>@wfretry.sql
 Enter value for 1:  POAPPRV
 Enter value for  2:  3319-4115
 Lable :  POAPPRV_TOP
Command  :RETRY
Result        :NULL

INVENTORY (STORES) COSTED ERROR

     Stop the COST manager or CONCURRENT manager

1)select * from   mtl_material_transactions where costed_flag='E'
     Confirm the error and find the organization_id and transaction_id

2)SELECT organization_id,
  default_cost_group_id
  FROM mtl_parameters
  WHERE organization_id = '155'  
   (place organization id from the step 1)

2) UPDATE mtl_material_transactions
   SET transfer_cost_group_id = &dcgi
   WHERE tranasction_id = &txn_id;

    (&dcgi = default_cost_group_id and &txn_id = from step1)

3) UPDATE mtl_material_transactions
     SET costed_flag = 'N',
     transaction_group_id = null,
     error_code = null,
     error_explanation = null
    WHERE transaction_id = &txn_id;

     (&txn_id= from step1)

update mtl_material_transactions
      set request_id = null,
          costed_flag = 'N',
          transaction_group_id = null,
          transaction_set_id = null,
          cost_group_id = transfer_cost_group_id
    where costed_flag = 'E'
    and   transaction_id  = '3392889'

Start the COST manager or CONCURRENT manager



To select the username,process,status,Terminal name using SID

select a.status,p.spid, a.sid, a.serial#, a.username, a.terminal,
       a.osuser, c.Consistent_Gets, c.Block_Gets, c.Physical_Reads,
       (100*(c.Consistent_Gets+c.Block_Gets-c.Physical_Reads)/
       (c.Consistent_Gets+c.Block_Gets)) HitRatio, c.Physical_Reads, b.sql_text
from v$session a, v$sqlarea b, V$SESS_IO c,v$process p
where a.sql_hash_value = b.hash_value
  and a.SID = c.SID
  and p.addr = a.paddr
  and (c.Consistent_Gets+c.Block_Gets)>0
  and a.Username is not null
  Order By a.status asc, c.Consistent_Gets desc , c.Physical_Reads desc;
                                 
                                 
To see the currently updated archive log files
          SQL> select name from v$archived_log
            where trunc(completion_time) >= trunc(sysdate)-5;
To find the BDUMP,UDUMP directory
select value from v$parameter where name = 'background_dump_dest'
select value from v$parameter where name = 'user_dump_dest'
select value from v$parameter where name in ('background_dump_dest','user_dump_dest', 'log_archive_dest')

To enable archive log
log_archive_start             = true    
log_archive_format = arch_%s_%t.arc
log_archive_dest = '/oracle/archive'

Tracing an Oracle session by SID
This code accepts an Oracle session ID [SID] as a parameter and will show you what SQL statement is running in that session and what event the session is waiting for. You simply create a SQL file of the code and run it from the SQL prompt.

prompt Showing running sql statements ...........................

select a.sid Current_SID, a.last_call_et ,b.sql_text
from v$session a
,v$sqltext b
where a.sid = 14
and a.username is not null
and a.status = 'ACTIVE'
and a.sql_address = b.address
order by a.last_call_et,a.sid,b.piece;

prompt Showing what sql statement is doing.....................

select a.sid, a.value session_cpu, c.physical_reads,
c.consistent_gets,d.event,
d.seconds_in_wait
from v$sesstat a,v$statname b, v$sess_io c, v$session_wait d
where a.sid= 14
and b.name = 'CPU used by this session'
and a.statistic# = b.statistic#
and a.sid=c.sid
and a.sid=d.sid;

Check all active processes, the latest SQL, and the SQL hit ratio

select a.status, a.sid, a.serial#, a.username, a.terminal,
       a.osuser, c.Consistent_Gets, c.Block_Gets, c.Physical_Reads,
       (100*(c.Consistent_Gets+c.Block_Gets-c.Physical_Reads)/
       (c.Consistent_Gets+c.Block_Gets)) HitRatio, c.Physical_Reads, b.sql_text
from v$session a, v$sqlarea b, V$SESS_IO c
where a.sql_hash_value = b.hash_value
  and a.SID = c.SID
  and (c.Consistent_Gets+c.Block_Gets)>0
  and a.Username is not null
  and a.status = 'ACTIVE'
 Order By a.status asc, c.Consistent_Gets desc , c.Physical_Reads desc;
    3278532


Monitoring Oracle processes

select p.spid "Thread ID", b.name "Background Process", s.username
"User Name",
            s.osuser "OS User", s.status "STATUS", s.sid "Session ID",
s.serial# "Serial No.",
            s.program "OS Program"
     from v$process p, v$bgprocess b, v$session s  
     where s.paddr = p.addr and b.paddr(+) = p.addr
order by s.status,1;

TO FIND OUT USER NAME AND PROCESS STATUS

SELECT REQUEST_ID,
       TO_CHAR(a.ACTUAL_START_DATE,'MM/DD/YY HH:MI:SS') starttime,
       TO_CHAR(a.ACTUAL_COMPLETION_DATE,'MM/DD/YY HH:MI:SS') endtime,
       ROUND((a.ACTUAL_COMPLETION_DATE - a.ACTUAL_START_DATE)*(60*24),2) rtime,
       b.user_name,a.phase_code,a.status_code,
  a.printer,a.print_style,a.description,
       SUBSTR(a.completion_text,1,20) compl_txt
  FROM fnd_concurrent_requests a,fnd_user b
 WHERE to_date(ACTUAL_START_DATE,'DD-MON-RRRR') = to_date(sysdate,'DD-MON-RRRR') and a.requested_by = b.user_id
And a.phase_code = ‘R’
 ORDER BY 1 desc,2


TO FIND OUT UGA and PGA STATUS FOR ALL SID

SELECT V.sid,
 P.SPID     "OS_PID",
       P.USERNAME "OS_USERNAME",
       U.USERNAME "USERNAME",
       P.PROGRAM  "PROGRAM",
       B.NAME,
       TO_CHAR(V.VALUE,'999,999,999.99')
FROM V$SESSTAT V, V$STATNAME B, V$SESSION U, V$PROCESS P
WHERE V.STATISTIC# = B.STATISTIC# AND
      U.SID = V.SID AND
      (B.NAME LIKE '%pga%' OR B.NAME LIKE '%uga%') AND
      U.USERNAME <> ' ' AND
      U.PADDR = P.ADDR
ORDER BY V.SID,B.NAME;

Displays concurrent requests that have run times longer than one hour (3600 seconds)

SELECT REQUEST_ID,
       TO_CHAR(ACTUAL_START_DATE,'MM/DD/YY HH:MI:SS') starttime,
       TO_CHAR(ACTUAL_COMPLETION_DATE,'MM/DD/YY HH:MI:SS') endtime,
       ROUND((ACTUAL_COMPLETION_DATE - ACTUAL_START_DATE)*(60*24),2) rtime,
       OUTCOME_CODE,phase_code,status_code,
  printer,print_style,description,
       SUBSTR(completion_text,1,20) compl_txt
  FROM fnd_concurrent_requests
 WHERE to_date(ACTUAL_START_DATE,'DD-MON-RRRR') = to_date(sysdate,'DD-          
                        MON-RRRR')
 ORDER BY 2 desc

This script will map concurrent manager process information about current concurrent managers.
SELECT proc.concurrent_process_id concproc,
       SUBSTR(proc.os_process_id,1,6) clproc,
       SUBSTR(LTRIM(proc.oracle_process_id),1,15) opid,
       SUBSTR(vproc.spid,1,10) svrproc,
       DECODE(proc.process_status_code,'A','Active',
              proc.process_status_code) cstat,
       SUBSTR(concq.concurrent_queue_name,1,30) qnam,
--       SUBSTR(proc.logfile_name,1,20) lnam,
       SUBSTR(proc.node_name,1,10) nnam,
       SUBSTR(proc.db_name,1,8) dbnam,
       SUBSTR(proc.db_instance,1,8) dbinst,
       SUBSTR(vsess.username,1,10) dbuser
  FROM fnd_concurrent_processes proc,
       fnd_concurrent_queues concq,
       v$process vproc,
       v$session vsess
 WHERE proc.process_status_code = 'A'
   AND proc.queue_application_id = concq.application_id
   AND proc.concurrent_queue_id = concq.concurrent_queue_id
   AND proc.oracle_process_id = vproc.pid(+)
   AND vproc.addr = vsess.paddr(+)
 ORDER BY proc.queue_application_id,
       proc.concurrent_queue_id

Show currently running concurrent requests
SELECT SUBSTR(LTRIM(req.request_id),1,15) concreq,
       SUBSTR(proc.os_process_id,1,15) clproc,
       SUBSTR(LTRIM(proc.oracle_process_id),1,15) opid,
       SUBSTR(look.meaning,1,10) reqph,
       SUBSTR(look1.meaning,1,10) reqst,
       SUBSTR(vsess.username,1,10) dbuser,
       SUBSTR(vproc.spid,1,10) svrproc,
       vsess.sid sid,
       vsess.serial# serial#
FROM   fnd_concurrent_requests req,
       fnd_concurrent_processes proc,
       fnd_lookups look,
       fnd_lookups look1,
       v$process vproc,
       v$session vsess
WHERE  req.controlling_manager = proc.concurrent_process_id(+)
AND    req.status_code = look.lookup_code
AND    look.lookup_type = 'CP_STATUS_CODE'
AND    req.phase_code = look1.lookup_code
AND    look1.lookup_type = 'CP_PHASE_CODE'
AND    look1.meaning = 'Running'
AND    proc.oracle_process_id = vproc.pid(+)
AND    vproc.addr = vsess.paddr(+);

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

Production DBA support Scripts


To find out the locked objects

If a table used by an user A is locked by User B then A needs to wait until B unlocks it. By issuing this query, User A can find which tables in his schema are locked and which session has locked it.

select a.sid,a.serial#,c.object_name
 from V$session a,
 V$locked_object b,
 user_objects c
 where a.sid=b.session_id
 and b.object_id=c.object_id;

Output:
 SID SERIAL# OBJECT_NAME
 ---- ------- ------------
 7 36 emp
 9 58 dept

 2 rows selected.
Now you can release the lock:
 SQL>alter system kill session '7,36';
      System Altered.
 SQL>alter system kill session '9,58';
      System Altered.

To find the CPU consumption

select ss.sid,w.event,command,ss.value CPU ,se.username,se.program, wait_time, w.seq#, q.sql_text,command
from
v$sesstat ss, v$session se,v$session_wait w,v$process p, v$sqlarea q
where ss.statistic# in
(select statistic#
from v$statname
where name = 'CPU used by this session')
and se.sid=ss.sid
and ss.sid>6
and se.paddr=p.addr
and se.sql_address=q.address
order by ss.value desc,ss.sid

Script to show problem tablespaces

SELECT space.tablespace_name, space.total_space, free.total_free,
ROUND(free.total_free/space.total_space*100) as pct_free,
ROUND((space.total_space-free.total_free),2) as total_used,
ROUND((space.total_space-free.total_free)/space.total_space*100) as pct_used,
free.max_free, next.max_next_extent
FROM
(SELECT tablespace_name, SUM(bytes)/1024/1024 total_space
FROM dba_data_files
GROUP BY tablespace_name) space,
(SELECT tablespace_name, ROUND(SUM(bytes)/1024/1024,2) total_free, ROUND(MAX(bytes)/1024/1024,2) max_free
FROM dba_free_space
GROUP BY tablespace_name) free,
(SELECT tablespace_name, ROUND(MAX(next_extent)/1024/1024,2) max_next_extent FROM dba_segments
GROUP BY tablespace_name) NEXT
WHERE space.tablespace_name = free.tablespace_name (+)
AND space.tablespace_name = next.tablespace_name (+)
AND (ROUND(free.total_free/space.total_space*100)< 10
OR next.max_next_extent > free.max_free)
order by pct_used desc

Oracle space monitoring scripts (grand total table space)

select
        sum(tot.bytes/(1024*1024*1024))”Total size”,
        sum(tot.bytes/(1024*1024*1024)-sum(nvl(fre.bytes,0))/(1024*1024*1024)) Used,
        sum(sum(nvl(fre.bytes,0))/(1024*1024*1024)) Free,
        sum((1-sum(nvl(fre.bytes,0))/tot.bytes)*100) Pct
from    dba_free_space fre,
        (select tablespace_name, sum(bytes) bytes
        from    dba_data_files
        group by tablespace_name) tot,
        dba_tablespaces tbs
where   tot.tablespace_name    = tbs.tablespace_name
and     fre.tablespace_name(+) = tbs.tablespace_name
group by tbs.tablespace_name, tot.bytes/(1024*1024*1024), tot.bytes




What's holding up the system?

Poorly written SQL is another big problem. Use the following SQL to determine the UNIX pid:

Select
   p.pid, s.sid, s.serial#,s.status, s.machine,s.osuser,  p.spid, t.sql_text
  From
    v$session s,
    v$sqltext t,
    v$process p
  Where
    s.sql_address = t.address and
    s.paddr = p.addr and
    s.sql_hash_value = t.hash_value and
    s.sid > 7 and
    s.audsid != userenv ('SESSIONID')
  Order By s.status,s.sid, s.osuser, s.process, t.piece ;

Script to display status of all the Concurrent Managers  
select distinct Concurrent_Process_Id CpId, PID Opid,
       Os_Process_ID Osid, Q.Concurrent_Queue_Name Manager,
       P.process_status_code Status,
       To_Char(P.Process_Start_Date, 'MM-DD-YYYY HH:MI:SSAM') Started_At
from   Fnd_Concurrent_Processes P, Fnd_Concurrent_Queues Q, FND_V$Process
where  Q.Application_Id = Queue_Application_ID
  and  Q.Concurrent_Queue_ID = P.Concurrent_Queue_ID
  and  Spid = Os_Process_ID
  and  Process_Status_Code not in ('K','S')
order  by Concurrent_Process_ID, Os_Process_Id, Q.Concurrent_Queue_Name


Get current SQL from SGA

select sql_text
from V$session s , V$sqltext t
where s.sql_address=t.address
and sid=
order by piece;

You can find the SID from V$session.

Monitoring and Tuning the Shared Pool

select
  sum(a.bytes)/(1024*1024) shared_pool_used,
  max(b.value)/(1024*1024) shared_pool_size,
  (max(b.value)/(1024*1024))-(sum(a.bytes)/(1024*1024)) shared_pool_avail,
  (sum(a.bytes)/max(b.value))*100 shared_pool_pct
   from v$sgastat a, v$parameter b
where a.name in (
'reserved stopper',            
'table definiti',                
'dictionary cache',          
'library cache',            
'sql area',
'PL/SQL DIANA',
'SEQ S.O.') and
b.name='shared_pool_size';


What SQL is running and who is running it?

select a.sid,a.serial#,a.username,b.sql_text
from v$session a,v$sqltext b
where a.username is not null
and a.status = 'ACTIVE'
and a.sql_address = b.address
order by 1,2,b.piece;

                   ---
select decode(sum(decode(s.serial#,l.serial#,1,0)),0,'No','Yes') " ",
          s.sid "Session ID",s.status "Status",
          s.username "Username", RTRIM(s.osuser) "OS User",
          b.spid "OS Process ID",s.machine "Machine Name",
          s.program  "Program",c.sql_text "SQL text"
   from v$session s, v$session_longops l,v$process b,
        (select address,sql_text from v$sqltext where piece=0) c
 where (s.sid = l.sid(+)) and s.paddr=b.addr and s.sql_address = c.address
 group by s.sid,s.status,s.username,s.osuser,s.machine,
          s.program,b.spid, b.pid, c.sql_text order by s.status,s.sid

 TO FIND THE SORTING DETAILS
SELECT a.sid,a.value,b.name from
         V$SESSTAT a, V$STATNAME b
         WHERE a.statistic#=b.statistic#
         AND b.name LIKE 'sort%'
         ORDER BY 1;
       


Long running SQL statements

SELECT s.rows_processed, s.loads, s.executions, s.buffer_gets,
       s.disk_reads, t.sql_text,s.module, s.ACTION
 FROM v$sql /*area*/                        s,
      v$sqltext                         t
 WHERE s.address = t.address
   AND ((buffer_gets > 10000000) or
        (disk_reads > 1000000) or
        (executions > 1000000))
 ORDER BY ((s.disk_reads * 100) + s.buffer_gets) desc, t.address, t.piece

V$session_longops



SELECT * FROM (select
username,opname,sid,serial#,context,sofar,totalwork
,round(sofar/totalwork*100,2) "% Complete"
from v$session_longops)
WHERE "% Complete" != 100

Identify an object's locks in the database
Here are two simple scripts to identify an object's locks in the database. Whenever a user complains that there's a session locked, I use these scripts to find out if there are object locks.

# To find locks objects in the database
select c.Owner,c.Object_Name,c.Object_Type,
       b.Sid,b.Serial#,b.Status,b.Osuser,b.Machine
 from v$locked_object a ,v$session b,dba_objects c
 where b.Sid = a.Session_Id
   and a.Object_Id = c.Object_Id;
To find the locks and latches
select s.sid, s.serial#,
       decode(s.process, null,
          decode(substr(p.username,1,1), '?',   upper(s.osuser), p.username),
          decode(       p.username, 'ORACUSR ', upper(s.osuser), s.process)
       ) process,
       nvl(s.username, 'SYS ('||substr(p.username,1,4)||')') username,
       decode(s.terminal, null, rtrim(p.terminal, chr(0)),
              upper(s.terminal)) terminal,
       decode(l.type,
          -- Long locks
                      'TM', 'DML/DATA ENQ',   'TX', 'TRANSAC ENQ',
                      'UL', 'PLS USR LOCK',
          -- Short locks
                      'BL', 'BUF HASH TBL',  'CF', 'CONTROL FILE',
                      'CI', 'CROSS INST F',  'DF', 'DATA FILE   ',
                      'CU', 'CURSOR BIND ',
                      'DL', 'DIRECT LOAD ',  'DM', 'MOUNT/STRTUP',
                      'DR', 'RECO LOCK   ',  'DX', 'DISTRIB TRAN',
                      'FS', 'FILE SET    ',  'IN', 'INSTANCE NUM',
                      'FI', 'SGA OPN FILE',
                      'IR', 'INSTCE RECVR',  'IS', 'GET STATE   ',
                      'IV', 'LIBCACHE INV',  'KK', 'LOG SW KICK ',
                      'LS', 'LOG SWITCH  ',
                      'MM', 'MOUNT DEF   ',  'MR', 'MEDIA RECVRY',
                      'PF', 'PWFILE ENQ  ',  'PR', 'PROCESS STRT',
                      'RT', 'REDO THREAD ',  'SC', 'SCN ENQ     ',
                      'RW', 'ROW WAIT    ',
                      'SM', 'SMON LOCK   ',  'SN', 'SEQNO INSTCE',
                      'SQ', 'SEQNO ENQ   ',  'ST', 'SPACE TRANSC',
                      'SV', 'SEQNO VALUE ',  'TA', 'GENERIC ENQ ',
                      'TD', 'DLL ENQ     ',  'TE', 'EXTEND SEG  ',
                      'TS', 'TEMP SEGMENT',  'TT', 'TEMP TABLE  ',
                      'UN', 'USER NAME   ',  'WL', 'WRITE REDO  ',
                      'TYPE='||l.type) type,
       decode(l.lmode, 0, 'NONE', 1, 'NULL', 2, 'RS', 3, 'RX',
                       4, 'S',    5, 'RSX',  6, 'X',
                       to_char(l.lmode) ) lmode,
       decode(l.request, 0, 'NONE', 1, 'NULL', 2, 'RS', 3, 'RX',
                         4, 'S', 5, 'RSX', 6, 'X',
                         to_char(l.request) ) lrequest,
       decode(l.type, 'MR', decode(u.name, null,
                            'DICTIONARY OBJECT', u.name||'.'||o.name),
                      'TD', u.name||'.'||o.name,
                      'TM', u.name||'.'||o.name,
                      'RW', 'FILE#='||substr(l.id1,1,3)||
                      ' BLOCK#='||substr(l.id1,4,5)||' ROW='||l.id2,
                      'TX', 'RS+SLOT#'||l.id1||' WRP#'||l.id2,
                      'WL', 'REDO LOG FILE#='||l.id1,
                      'RT', 'THREAD='||l.id1,
                      'TS', decode(l.id2, 0, 'ENQUEUE',
                                             'NEW BLOCK ALLOCATION'),
                      'ID1='||l.id1||' ID2='||l.id2) object
from   sys.v_$lock l, sys.v_$session s, sys.obj$ o, sys.user$ u,
       sys.v_$process p
where  s.paddr  = p.addr(+)
  and  l.sid    = s.sid
  and  l.id1    = o.obj#(+)
  and  o.owner# = u.user#(+)
  and  l.type   <> 'MR'
UNION ALL                          /*** LATCH HOLDERS ***/
select s.sid, s.serial#, s.process, s.username, s.terminal,
       'LATCH', 'X', 'NONE', h.name||' ADDR='||rawtohex(laddr)
from   sys.v_$process p, sys.v_$session s, sys.v_$latchholder h
where  h.pid  = p.pid
  and  p.addr = s.paddr
UNION ALL                         /*** LATCH WAITERS ***/
select s.sid, s.serial#, s.process, s.username, s.terminal,
       'LATCH', 'NONE', 'X', name||' LATCH='||p.latchwait
from   sys.v_$session s, sys.v_$process p, sys.v_$latch l
where  latchwait is not null
  and  p.addr      = s.paddr
  and  p.latchwait = l.addr



To clear the log files:

1) move the alert log file and recreate one dummy alert log file
    using touch command
      path     $ORACLE_HOME/admin/bdump

2) move network log file and recreate one dummy file
location  $ORACLE_HOME/network/admin

3) move the Apache log files (access_log and error_log) and recreate one dummy file
Location $iAS_ORACLE_HOME/Apache/Apache/logs
  4) move the Jserv log file and create one dummy file
 Location $iAS_ORACLE_HOME/Apache/Jserv/logs


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

Move a table from one tablespace to another

There are many ways to move a table from one tablespace to another. For example, you can create a duplicate table with dup_tab as select * from original_tab; drop the original table and rename the duplicate table as the original one.

The second option is exp table, drop it from the database and import it back. The third option (which is the one I am most interested in) is as follows.

Suppose you have a dept table in owner scott in the system tablespace and you want to move in Test tablespace.

connect as sys
SQL :> select table_name,tablespace_name from dba_tables where table_name='DEPT' and owner='SCOTT';

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
DEPT                           SYSTEM

Elapsed: 00:00:00.50

You want to move DEPT table from system to say test tablespace.
SQL :> connect scott/tiger
Connected.
SQL :> alter table DEPT move tablespace TEST;

Table altered.

Elapsed: 00:00:00.71

SQL :> connect
Enter user-name: sys
Enter password:
Connected.
SQL :> select table_name,tablespace_name from dba_tables where table_name='DEPT' and owner='SCOTT';

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
DEPT                           TEST


TKPROF    Command

ALTER SESSION SET sql_trace = TRUE

ALTER SYSTEM SET TIMED_STATISTICS = TRUE
   Session level
ALTER SESSION SET sql_trace = TRUE  (or) ALTER SYSTEM SET sql_trace =  
                                                                                                                             TRUE  
EXECUTE SYS.dbms_system.set_sql_trace_in_session (, , TRUE|FALSE);


TKPROF explain=user/password@service table=sys.plan_table


To find the location of Dump files
    select c.value || '/' || instance || '_ora_' ||
       ltrim(to_char(a.spid,'fm99999')) || '.trc'
  from v$process a, v$session b, v$parameter c, v$thread c
  where a.addr = b.paddr
   and b.audsid = userenv('sessionid')
   and c.name = 'user_dump_dest'


TO find the patch set level
Please follow the note 120638.1

select patch_level
     from fnd_product_installations
     where application_id = 200;
To compile the procedure
Alter  PROCEDURE  JA_IN_BULK_PO_QUOTATION_TAXES compile

To compile the form

         F60gen userid=apps/metroapps@dev module=
.fmb 

         output_file=/forms/US/
.fmx 

         module_type=form batch=no compile_all=special

Compiling DFFs
cd $JA_TOP/4239736

fdfcmp apps/metroapps@dev 0 Y R "INV" "JAF23A_2"

Move all log files to the patch log directory

Find . –name “XXXX” –type f –mtime +90 –exec rm {} \;
Find . –name “XXXX” –type f –mtime +90 –print | sargs cp –R /vasu

find . -name "*.log" | grep -v "/log/" | xargs -i mv {} $JA_TOP/$APPLLOG/4239736


cd %AU_TOP%\resource
ifcmp60 module="JAINTAX.pll" userid=apps\%1 output_file="%AU_TOP%\resource\JAINTAX.plx" module_type=library batch=yes


@REM Forms
echo "Generating forms."

cd %AU_TOP%\forms\US
ifcmp60 module="JAIN57F4.fmb" userid=apps/%1 output_file="%JA_TOP%\forms\US\JAIN57F4.fmx" batch=yes


ifcmp60 module="JAIRGMST.fmb" userid=apps/%1 output_file="%JA_TOP%\forms\US\JAIRGMST.fmx" batch=yes




How to find versions
*************************************************************
This article is being delivered in Draft form and may contain
errors.  Please use the MetaLink "Feedback" button to advise
Oracle of any issues related to this article.
*************************************************************

PURPOSE
-------

The purpose of this note is to bring together methods to get version of
programs, executables, forms, reports, database objects and other files
involved in Oracle Applications v. 11.x.

SCOPE & APPLICATION
-------------------

All audience. Version of objects are often needed by support.

CONTENTS
--------
1. Oracle Applications
2. Forms
3. Reports
4. SQL or PL/SQL scripts
5. Executables
6. Other files
7. RDMBS
8. Database objects
9. Operating System

select release_name from fnd_product_groups
select organization_id org_id, name from hr_operating_units;]


Get the JDK version
 [JDK_TOP]/bin/java -version


Example run of adjkey
-------------------------------
cd $APPL_TOP/admin
$ adjkey -initialize

Regenerate Application Jar Files
----------------------------------

Run ADADMIN to Regenerate (sign) the JAR files on each middle tier


1. Launch ADADMIN (Ensure you are APPLMGR with permissions to write to adadmin.log)
2. Choose option number 2 to Maintain Files, then 10 to regenerate JAR Files making sure to select FORCE = Y which will resign every JAR file using the new digital certificate that you just copied over from your original instance.


1. ORACLE APPLICATIONS

a. from any forms you can get Oracle Applications version by this menu option :
Main Menu => Help => About Oracle Applications ...

A pop-up window displays, among other things, version of :

 Oracle Applications
 current used module
 Oracle Forms
 RDBMS
 current open form

b. you can also run the following command :
 sqlplus applsys/
  select release_name from fnd_product_groups;
  select * from fnd_product_installations;

2. FORMS

 a. if the form is displayed, see §1 above to get current open form version
 b. in case of the form doesn't appear you must :

  - retreive the form name from an other environment without the problem
    (i.d. NLS, test or production, etc.) or from WEB IV, Metalink, ARU...
  - go to /forms (/ eventually) directory, you
    should find the corresponding file with .fmx extension
  - see §6 below to get the file version

3. REPORTS

- you need first to note the report name on top of it's log file
- go to /reports(/ eventually) directory
  you should find the corresponding file with .rdf extension
- see §6 below to get the file version

4. SQL OR PL/SQL SCRIPTS

- go to /admin/sql or /patch/110/sql for last version.
  You should find the corresponding file with .sql, .pls, .pkh, or .pkb
  extension
- see §6 below to get the file version

5. EXECUTABLES

- binary or executable names have often no extension on unix systems
  or present .exe or .dll extension on MS-Windows.
- most of them are located under
/bin

- there are many ways to get the version of an executable,
  you can try the following methods :

   a. if an interface is displayed, go to the menu => Help => About ...

      e.g. Oracle Applications, internet browsers, tools (Oracle Forms,
           Oracle Reports, Enterprise Manager, SQL*Plus)
           'Help => About Plug-ins' give JInitiator version

   b. run the file without parameter

      e.g. f45gen, f60gen (for Oracle Forms)
           r25convm, rwcon60 (for Oracle Reports)
           sqlplus (for SQL*Plus)
           tnsping (TNS Ping Utility)
           jre (Java Runtime Loader)
 
   c. see properties of the file with MS-Windows Explorer
      e.g. *.exe, *.dll files
 
   d. find 'Header' string, see §6 to proceed
      e.g. ad utilities (adpatch, adrelink, etc.), fnd executables,
           binaries under /bin directories

   e. run specific command

      e.g. Appletviewer :
             java -version
           Oracle Workflow in Oracle Applications :
             sqlplus apps/ 
             @$FND_TOP/sql/wfver.sql
             or
             select TEXT from WF_RESOURCES where NAME='WF_VERSION';

   f. launch Oracle Installer
 
      Several Oracle products (like RDBMS, Tools) need orainst to be installed,
      below is the way to launch it and get version of products:

      - login with Oracle account
      - run Oracle Installer by :
         .  $ORACLE_HOME/orainst/orainst
        or under MS-Windows :
         $ORACLE_HOME\bin\orainst.exe
      - answer by default to reach 'Software Asset Manager' screen
      - right column shows you installed products and versions

      Same informations are in these files :
       $ORACLE_HOME/orainst/unix.rgs (Unix)
       $ORACLE_HOME\orainst\nt.rgs , windows.rgs (Win NT, MS-Windows)



6. OTHER FILES

- other files could be:
 
 driver files (*.drv)
 object description files (*.odf)
 data files (*.dat)
 library and object files (*.a, *.o)
 Oracle Forms libraries (*.pll, *.plx)
 Oracle Forms menu files (*.mmb, *.mmx)
 form source files (*.fmb)
 jar file (*.jar)
 java class file (*.class)
 html, xlm files (*.htm, *.xlm)

- go to the corresponding directory
- execute one of the following commands to get the version of the file
  on all platforms (beginning with Oracle Applications v. 11.x) :
     adident Header
  on Unix :
     strings -a | grep Header
  on Windows (DOS box) :
     find "Header"


7. RDMBS

 a. See §1.a to get easily the version of your Oracle Server installed

 b. You can also execute sqlplus, it displays SQL*Plus and RDBMS version

   e.g. Oracle8 Enterprise Edition Release 8.0.6.1.

 c. see $5.f if you prefer to use Oracle Installer which displays also
    version of several installed products.

8. DATABASE OBJECTS

 a. run this sql statement to get package version :

   select text from user_source where name='&package_name'
   and text like '%$Header%';

 prompt asks you the package name, in return it gives you two lines
 corresponding to specifications and body creation files

 You can also get pls version on database by running:

 select name , text
 from dba_source
 where text like '%.pls%'
 and line < 10;

 b. views

 Sometimes version information is available in view definition.
 Try the following sql statement :

   col TEXT for a40 head "TEXT"
   select VIEW_NAME, TEXT
   from USER_VIEWS
   where VIEW_NAME = '&VIEW_NAME';

 c. workflow

 Run wfver.sql (see §5.e) to get version of workflow packages and views.

9. OPERATING SYSTEM

 a. for most Unix platforms run command :
     uname -a

 b. for MS-WINDOWS 95/98/2000
   Start => Parameters => Control Panel => System

 c. for WIN/NT, execute command :
   winver

 or menu :
   Start => Programs => Admin Tools => WIN NT Diagnostic

RELATED DOCUMENTS
-----------------

Note 106767.1 How To Determine The Version Of An Applications Form In Rele


ROLL BACK SEGMENTS
dba_rollback_segs
v$transaction
v$rollname
v$undostat
alter index gl_interface_n1 coalesce;
alter index gl_interface_n1 rebuild nologging;




Monitoring Pending Requests in the Concurrent Managers
FND_CONCURRENT_PROCESSES
FND_CONCURRENT_PROGRAMS
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_QUEUES
Select *
From   Fnd_Concurrent_Requests R, Fnd_Lookups L
Where  R.Status_Code = L.Lookup_Code
  And  L.Lookup_Type = 'CP_STATUS_CODE'
  And  Phase_Code = 'C'
--  And  Actual_Completion_Date - &DaysPrior
  and meaning in ('Error','Warning')
--  and request_date = '6/13/2006'
--Group BY Meaning;







Tables that are updated when Oracle Applications Concurrent Program is started

FND_CONCURRENT_REQUESTS    This table contains a complete history of  
                           all concurrent requests.

FND_RUN_REQUESTS           When a user submits a report set, this table
                           stores information about the reports in the
                           report set and the parameter values for each
                           report.

FND_CONC_REQUEST_ARGUMENTS This table records arguments passed by the
                           concurrent manager to each program it starts
                           running.

FND_DUAL                   This table records when requests do not
                           update database tables.

FND_CONCURRENT_PROCESSES   This table records information about Oracle
                           Applications and operating system processes.

FND_CONC_STAT_LIST         This table collects runtime performance
                           statistics for concurrent requests.

FND_CONC_STAT_SUMMARY      This table contains the concurrent program
                           performance statistics generated by the
                           Purge.


The lookup for the  output would be:
PHASE CODE:
Value  Meaning
  I     Inactive
  P     Pending
  R     Running
  C     Completed

STATUS CODE:
Value  Meaning
  U     Disabled
  W     Paused
  X     Terminated
  Z     Waiting
  M     No Manager
  Q     Standby
  R     Normal
  S     Suspended
  T     Terminating
  D     Cancelled
  E     Error
  F     Scheduled
  G     Warning
  H     On Hold
  I     Normal
  A     Waiting
  B     Resuming
  C     Normal
For long running requests.
Log onto SQLPLUS as user APPS.  Enter the following command:
update fnd_concurrent_requests set phase_code=‘C’, status_code=’D’  where request_id=reqid;
commit;


su  - applprod
cd  $FND_TOP
cd sql


afcmstat.sql Displays all the defined managers, their maximum capacity, pids, and their status.
afimchk.sql Displays the status of ICM and PMON method in effect, the ICM's log file, and determines if the concurrent manger monitor is running.

afcmcreq.sql Displays the concurrent manager and the name of its log file that processed a request.
afrqwait.sql Displays the requests that are pending, held, and scheduled.
afrqstat.sql Displays of summary of concurrent request execution time and status since a particular date.
afqpmrid.sql Displays the operating system process id of the FNDLIBR process based on a concurrent request id. The process id can then be used with the ORADEBUG utility.
afimlock.sql Displays the process id, terminal, and process id that may be causing locks that the ICM and CRM are waiting to get. You should run this script if there are long delays when submitting jobs, or if you suspect the ICM is in a gridlock with another oracle process.

Occasionally, you may find that requests are stacking up in the concurrent managers with a status of "pending". This can be caused by any of these conditions:
1. The concurrent managers were brought down will a request was running.
2. The database was shutdown before shutting down the concurrent managers.
3. There is a shortage of RAM memory or CPU resources.
When you get a backlog of pending requests, you can first allocate more processes to the manager that is having the problem in order to allow most of the requests to process, and then make a list of the requests that will not complete so they can be resubmitted, and cancel them.
To allocate more processes to a manager, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Manager -> Define. Increase the number in the Processes column. Also, you may not need all the concurrent managers that Oracle supplies with an Oracle Applications install, so you can save resources by identifying the unneeded managers and disabling them.

However, you can still have problems. If the request remains in a phase of RUNNING and a status of TERMINATING after allocating more processes to the manager, then shutdown the concurrent managers, kill any processes from the operating system that won't terminate, and execute the following sqlplus statement as the APPLSYS user to reset the managers in the FND_CONCURRENT_REQUESTS table:
update fnd_concurrent_requests
set status_code='X', phase_code='C'
where status_code='T';
conc_stat.sql
set echo off
set feedback off
set linesize 97
set verify off
col request_id format 9999999999    heading "Request ID"
     col exec_time format 999999999 heading "Exec Time|(Minutes)"
    col start_date format a10       heading "Start Date"
     col conc_prog format a20       heading "Conc Program Name"
col user_conc_prog format a40 trunc heading "User Program Name"
spool long_running_cr.lst
SELECT
   fcr.request_id request_id,
   TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) exec_time,
   fcr.actual_start_date start_date,
   fcp.concurrent_program_name conc_prog,
   fcpt.user_concurrent_program_name user_conc_prog
FROM
  fnd_concurrent_programs fcp,
  fnd_concurrent_programs_tl fcpt,
  fnd_concurrent_requests fcr
WHERE
   TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) > NVL('&min',45)
and
   fcr.concurrent_program_id = fcp.concurrent_program_id
and
   fcr.program_application_id = fcp.application_id
and
   fcr.concurrent_program_id = fcpt.concurrent_program_id
and
   fcr.program_application_id = fcpt.application_id
and
   fcpt.language = USERENV('Lang')
ORDER BY
   TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) desc;
         
spool off
Note that this script prompts you for the number of minutes. The output from this query with a value of 60 produced the following output on my database. Here we can see important details about currently-running requests, including the request ID, the execution time, the user who submitted the program and the name of the program.
Enter          value for min: 60






Thursday, December 6, 2012

Locations of Major Configuration Information in EPM 11.1.2.1







Applies to:

Hyperion Essbase Administration Services - Version 11.1.2.1.000 and later
Hyperion Financial Management - Version 11.1.2.1.000 and later
Information in this document applies to any platform.
Access to Hyperion Registry configuration information is usually undertaken via epmsys_registry.bat|.sh or via Metadata in Hyperion Shared Services.


Purpose

This article points to the few remaining configuration files that are still used in Enterprise Performance Management 11.1.2.1.This is presumably not a complete list, however.

It is useful to relate findings in logs to configuration settings elsewhere in the products. It is also very helpful to increase the logging levels against specific servlets or servers by adjustments to the matching logging.xml files

Troubleshooting Steps

Oracle Hyperion Enterprise Performance Management 11.1.2.1
No.FilenameLocationDescription
1.reg.properties/Oracle/Middleware/user_projects/epmsystem1/config/foundation/11.1.2.0/jdbc.url, username accessing database repository
2.registry.xml\Oracle\MiddlewareProvides precise version of WebLogic application server.
3..product.properties\Oracle\Middleware\wlserver_10.3Hidden file contains: WLS_JAVA_HOME, MW_HOME, EPM_ORACLE_HOME, WLS_PRODUCT_VERSION, JAVA_MEM_ARGS
4.epmsys_registry.sh|.bat/Oracle/Middleware/user_projects/epmsystem1/binThis may be used to display or modify Hyperion registry settings. Run on its own it generates an HTML dump of the Hyperion registry in /Middleware/user_projects/epmsystem1/diagnostics/reports/registry.html
5.startconfigtool.bat
startconfigtool-manual.bat
\Oracle\Middleware\EPMSystem11R1\common\config\11.1.2.0Configuration Utility
6.Essbase.properties
datasources.xml, AnalyticProviderServices.properties, BPMS_bpms1_Server.properties. CalcMgr.properties, EisServer.properties, EpmaDataSync.properties, EpmaWebReports.properties, EssbaseAdminServices.properties, FinancialReporting.properties, FoundationServices.properties, ocm.properties, OHS.properties, Planning.properties, RaFrameworkAgent.properties, RaFramework.properties, RMI.properties
\Oracle\Middleware\user_projects\epmsystem1\aps\bin
\Oracle\Middleware\user_projects\epmsystem1\config\starter
Essbase configuration file; system.session.timeout, smartview properties
7.BpmServer.properties\Oracle\Middleware\user_projects\domains\EPMSystem\servers\FoundationServices0 or RaFramework0\tmp\servers\Foundation or RaFramework\ {etc}Temporary files indicating localization settings.
8.RMService8.properties\Oracle\Middleware\EPMSystem11R1\products\biplus\common\configCHECK_SERVICE_STARTUP for startup dependencies.
9.BPMA_Server_Config.xmlC:\Oracle\Middleware\EPMSystem11R1\products\Foundation\BPMA\AppServer\DimensionServer\ServerEngine\binDimensionServerPort
10.web.configC:\Oracle\Middleware\EPMSystem11R1\products\Foundation\BPMA\AppServer\DimensionServer\WebServiceDimensionServerPort
11.ADM.properties\Oracle\Middleware\EPMSystem11R1\common\ADM\11.1.2.0\libADM_RMI_PORT=8299 port number; MAX_PROPERTY_VALUE_LENGTH=4; LOAD_MDX_METADATA.
12.httpd.conf\Oracle\Middleware\user_projects\epmsystem1\httpConfig\ohs\config\OHS\ohs_componentOracle HTTP Server configuration: Aliases, ODL logging settings, timeout, Listen {port}, LoadModule, et cetera
13.mod_wl_ohs.conf, ssl.conf\Oracle\Middleware\user_projects\epmsystem1\httpConfig\ohs\config\OHS\ohs_componentLocationMatch, WLIOTimeoutSecs, Idempotent, WeblogicCluster, port; Listen, ProxyPreserveHost
14.logging.xml\Oracle\Middleware\user_projects\epmsystem1\config (\FoundationServices or ReportingAnalysis\Converter or ReportingAnalysis\MigrationUtility or \SDK or \syncCSSId or \validation)
\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin
\oracle\Middleware\user_projects\epmsystem1\BPMS\bpms1\bin
Oracle Diagnostic Logging is configured in \Oracle\Middleware\user_projects\epmsystem1\config\*\logging.xml files for servers
15.logging.xml\Oracle\Middleware\user_projects\domains\EPMSyem\config\fmwconfig\servers\WebAnalysis0 or \Oracle\Middleware\user_projects\domains\EPMSystem\config\fmwconfig\servers\(AdminServer or AdminServer\jboss or AdminServer\was\AnalyticProviderServices0 or EssbaseAdminServices0, FinancialReporting0, FMWebServices0, FoundationServices0 or Planning0 or RaFramework0 or WebAnalysis0)Oracle Diagnostic Logging Configuration files for servlets
16.web.config\Oracle\Middleware\EPMSystem11R1\products\FinancialManagement\Web\HFMOfficeProvider or HFMLCMService or HFMServices or HFMApplicationServiceappSettings, diagnostics
17.oraInst.locWindows: C:\Program Files\Oracle\Inventory\logs.

Unix: oraInst.loc file is generally in the /etc folder
 Central Inventory location is specified in theoraInst.loc
18.upgrade.properties/Oracle/Middleware/EPMSystem11R1/upgrades/raframework/upgrade.properties 
On Microsoft Windows, configuration information is kept in Windows Registry. HKEY_LOCAL_MACHINE\SOFTWARE\*Oracle Corporation, Hyperion Java Service or Hyperion Solutions,
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Services
The former CMC functionality shifted to the Hyperion Shared Services User Interface.

Wednesday, December 5, 2012

Preparing a Microsoft Windows Server for Installation of EPM 11.1.2.x


Hyperion Essbase - Version 11.1.2.1.000 to 11.1.2.2.000 [Release 11.1]
Hyperion BI+ - Version 11.1.2.0.00 to 11.1.2.2.000 [Release 11.1]
Hyperion Planning - Version 11.1.2.0.00 to 11.1.2.2.000 [Release 11.1]
Microsoft Windows x64 (64-bit) - Version: 2008 R2
The compression/decompression utility should be capable of handling long file paths (a free utility which fulfills this requirement may be downloaded from http://www.7-zip.org)

Database clients (in a preferred 64-bit environment) should be installed in the order of 32-bit then 64-bit. Products which require 32-bit clients include Interactive Reporting and Financial Data Quality Management.


Goal

Many applications can be installed in EPM 11.1.2.0 and EPM 11.1.2.1 environments. These require careful preparation to prevent installation and configuration failures. This article makes some best practice recommendations that will allow a new installation to be robust. The EPM 11.1.2.0 release did not offer upgrade or migration features, so many customers are expected to move up to and take advantage of the new features of EPM 11.1.2.1. In most cases customers who have production environments containing earlier versions of the Hyperion System 9 or Oracle EPM 11 families will need to and want to move to higher specification environments to meet the certification requirements of the environment of this set of products. 

Fix

(1) GREENFIELD/CLEAN INSTALL
It is safest to do a clean install. An install on top of a pre-existing Hyperion System 9.2.1, 9.3.3, or 11.1.1.3 installation would lead to the loss of prior data and configuration files and lead to a new environment. That is supported, but ensure all files and repository data are preserved if the EPM 11.1.2.x install is unsuccessful and one needed to revert to the prior install.

(2) MICROSOFT WINDOWS VERSION
Earlier versions of Hyperion System 9 and Oracle Hyperion EPM 11.1.1.x were not certified against currently supported operating systems and databases so it is unlikely that they were installed in environments certified to work with EPM 11.1.2.1.

Since many of the applications of EPM 11.1.2.1 are 64-bit savvy and could benefit from the optimization features of Microsoft Windows 2008 R2 64-bit...that would be recommended.

(3) COMPRESSION/DECOMPRESSION
As mentioned above, ensure that your compression/decompression utility will handle long file path names (greater than the 260 character Microsoft Windows path limitation). 

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath
(4) TURN OFF MICROSOFT'S USER ACCOUNT CONTROL
UAC (Microsoft User Account Control) is a feature of Microsoft Vista and Windows 2008.



When the hyperlink is clicked, the next window should NOT have a check box checked.



The screen layout for Microsoft Windows 2008 R2 is:
(5) ENSURE MEMORY AND CPU NUMBERS ARE ADEQUATE
If all Hyperion products that can be accessed via Oracle EPM Foundation 11.1.2.x were installed and activated it could easily require around 14 gigabytes or more of RAM. This pretty much eliminates consideration of a 32-bit install (where each machine can access at best 4 gigabytes of memory...and no less than 1 gigabyte of that would be for the operating system). The processing load for many separate Java virtual machines would also make it practical to have four or more CPUs. The memory and CPU requirements might be reduced somewhat if fewer applications or JVMs were run, but it would not be advisable to run even a test and development install with fewer than two CPUs and 8 gigabytes of RAM as there are around two dozen processes to support. Technical support is not equipped to estimate the actual production capacity of an environment...there are too many variables involved. It would be best to ramp up the system with actual processes and loads and project from that.
(6) PREPARING DATABASE CLIENTS
The following applications require the installation of a full Oracle database client on the machines where they will be installed.

Performance Management Architect Dimension server
Financial Management application server
FDM Application Server and any machine that has FDM Workbench
Strategic Finance
If an Oracle database is used, a full database client with Oracle Call Interface (Oracle 11.1.0.6 or later) must be installed. Ensure a Net Service Name/tnsnames.ora is configured for remote databases.

(7) PREPARING DATABASE REPOSITORIES
A number of different relational database repositories must be prepared if their matching applications will be configured, preferably with different schema owners. Ideally the database will be on a separate stand alone server behind a firewall.
  • CalcManager
  • DisclosureManagement
  • EnterprisePerformanceManagementArchitect
  • ERPIntegrator
  • Essbase
  • FDM
  • FinancialClose
  • FinancialManagement
  • PerformanceScorecard
  • PlanningApplication
  • PlanningSystem
  • ProfitabilityAndCostManagement
  • ReportingAndAnalysis
  • SharedServices
ORACLE DATABASE REPOSITORY:
Server versions supported include: Oracle 10.2.0.4+, 11.1.0.7+, or 11.2.0.1+
HFM, HSS, and/or EPMA instances require at least 1GB of RAM and Automatic Memory Management.
The database encoding should preferably be AL32UTF8 (UTF8 is fallback option) and NLS_NUMERIC_CHARACTERS should be in order ',.' (confirm by running: SELECT * FROM NLS_DATABASE_PARAMETERS;)
Each EPM user must have the RESOURCE role and the CREATE SESSION and
CREATE VIEW privileges.

Note that Oracle recommends a separate Oracle database instance and other specific adjustments to work with FDM.

Oracle Data Provider (ODP) for .NET 2.0 (from the Oracle Data Access Component (ODAC) package) is required and must be installed by a user with Windows administrator rights for the following products: FDM or Performance Management Architect Dimension Server.

MICROSOFT SQL SERVER DATABASE REPOSITORY
Microsoft SQL Server 2008 R2 is certified.
Run the following two commands against each database used by EPM:
alter database set READ_COMMITTED_SNAPSHOT ON
alter database set ALLOW_SNAPSHOT_ISOLATION ON

IBM DB2 DATABASE REPOSITORY
IBM DB2 9.7 FP3a+ is certified.
(8) MICROSOFT INTERNET INFORMATION SERVER
For Microsoft Windows 2008 servers, ensure that IIS 7 is installed with IIS 6 compatibility features (needed for HFM). Ensure that ASP.NET has been installed as well. In Windows 2008: Start > All Programs > Administrative Tools > Server Manager (or use icon in tool-bar) > Roles Summary > click Add Roles > ...complete verifications... > On Select Server Roles screen select Web Server (IIS) > et cetera.
(9) PREPARE A DOMAIN USER FOR INSTALL
The Microsoft Windows Services control panel should have a domain user with rights to start a service as the owner of each Oracle EPM service, so that user should be determined before installation.
(10) CONFIGURE INTERNET EXPLORER 8 (if not using Firefox)
Internet Options > Security Settings tab > Custom level...
Allow script-initiated windows without size or position constraints (Enable)
Allow websites to open windows without address or status bar (Enable)

Internet Options > Security tab > Enable Protected Mode (Uncheck)

If multiple open windows are needed: http://forums.oracle.com/forums/thread.jspa?messageID=9391075
(11) INSTALL A 32-BIT GNU (7.06) or AFPL (8.5.4 or 8.51or 8.14 ) GHOSTSCRIPT OR ADOBE ACROBAT DISTILLER (6.0 or 8.0) FOR VERSIONS BEFORE 11.1.2.2.0
This is needed for Oracle Hyperion Financial Report PDF output.

Enhanced display of charts (via Adobe SVG Viewer) is only possible when using Adobe Acrobat Distiller.
These PDF generation tools are no longer required from version 11.1.2.2.0 and later.
(12) ENSURE THERE ARE NO SPACES IN THE INSTALL PATH
(13) REMOTE DIAGNOSTIC AGENT 4.28 AND LATER MAY BE USED FOR PREINSTALL CHECK OF EPM SERVER OR CLIENT: rda.cmd -T hcve (case sensitive)
RDA 4.27 supports EPM CLIENT preinstall and RDA 4.28 support EPM SERVER preinstall. CLIENT hcve (health check validation engine) is only valid on Microsoft Windows platforms. SERVER hcve is valid on all platforms certified for EPM 11.1.2.x installs.