Wednesday 24 September 2014

LINUX : Split and join the files

split -b 3072m "MySegment" "MYSegment"

cat MySegmentab >> MySegmentaa
cat MySegmentac >> MySegmentaa
cat MySegmentad >> MySegmentaa

Tuesday 23 September 2014

EBS : Workflow mailer status

1. Check workflow mailer service current status

select running_processes from apps.fnd_concurrent_queues where concurrent_queue_name = 'WFMLRSVC';


2. Find current mailer status

SELECT component_name as Component, component_status as Status FROM fnd_svc_components where component_name = 'Workflow Notification Mailer';

select component_status from apps.fnd_svc_components where component_id = (select component_id from apps.fnd_svc_components where component_name = 'Workflow Notification Mailer');

  Possible values:
  ****************
  RUNNING
  STARTING
  STOPPED_ERROR
  DEACTIVATED_USER
  DEACTIVATED_SYSTEM

DB : Who is using the temp tablespace

SELECT b.tablespace,
          ROUND(((b.blocks*p.value)/1024/1024),2)||'M' "SIZE",
          a.sid||','||a.serial# SID_SERIAL,
          a.username,
          a.program
     FROM sys.v_$session a,
          sys.v_$sort_usage b,
          sys.v_$parameter p
    WHERE p.name  = 'db_block_size'
      AND a.saddr = b.session_addr
   ORDER BY b.tablespace, b.blocks; 

DB : Database start time

select TO_CHAR(startup_time, 'Dy DD-Mon-YYYY HH24:MI:SS') as "START_TIME" FROM sys.v_$instance;

EBS : Adding SYSADMIN responsibility at backend

BEGIN
FND_USER_PKG.AddResp('<username>', 'SYSADMIN', 'SYSTEM_ADMINISTRATOR','STANDARD', 'Auto Assignment by Daily Refresh Script', sysdate, SYSDATE + 100);
commit;
END;
/

EBS : Change the Oracle Forms color at back end

REM Change Java Scheme Color - Site Level
REM update fnd_profile_option_values set PROFILE_OPTION_VALUE='PURPLE' where PROFILE_OPTION_ID = 1002097 and level_id = 10001;
DECLARE
        stat boolean;
BEGIN
        dbms_output.disable;
        dbms_output.enable(100000);
        stat := FND_PROFILE.SAVE('FND_COLOR_SCHEME', 'PURPLE', 'SITE');
        IF stat THEN
                dbms_output.put_line( 'Stat = TRUE - profile updated' );
        ELSE
                dbms_output.put_line( 'Stat = FALSE - profile NOT updated' );
        END IF;
        commit;
END;
/

DB : Archive log generation query

SQL to Generate the DAILY Archive Log Generation:

set pages 1000
select trunc(COMPLETION_TIME,'DD') Day, thread#, round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives_Generated from v$archived_log
group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;


SQL to Generate the HOURLY Archive Log Generation:

set pages 1000
select trunc(COMPLETION_TIME,'HH') Hour,thread# , round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives from v$archived_log
group by trunc(COMPLETION_TIME,'HH'),thread#  order by 1 ;


SELECT to_date(first_time) DAY,
to_char(sum(decode(to_char(first_time,'HH24'),'00',1,0)),'99') "00",
to_char(sum(decode(to_char(first_time,'HH24'),'01',1,0)),'99') "01",
to_char(sum(decode(to_char(first_time,'HH24'),'02',1,0)),'99') "02",
to_char(sum(decode(to_char(first_time,'HH24'),'03',1,0)),'99') "03",
to_char(sum(decode(to_char(first_time,'HH24'),'04',1,0)),'99') "04",
to_char(sum(decode(to_char(first_time,'HH24'),'05',1,0)),'99') "05",
to_char(sum(decode(to_char(first_time,'HH24'),'06',1,0)),'99') "06",
to_char(sum(decode(to_char(first_time,'HH24'),'07',1,0)),'99') "07",
to_char(sum(decode(to_char(first_time,'HH24'),'08',1,0)),'99') "08",
to_char(sum(decode(to_char(first_time,'HH24'),'09',1,0)),'99') "09",
to_char(sum(decode(to_char(first_time,'HH24'),'10',1,0)),'99') "10",
to_char(sum(decode(to_char(first_time,'HH24'),'11',1,0)),'99') "11",
to_char(sum(decode(to_char(first_time,'HH24'),'12',1,0)),'99') "12",
to_char(sum(decode(to_char(first_time,'HH24'),'13',1,0)),'99') "13",
to_char(sum(decode(to_char(first_time,'HH24'),'14',1,0)),'99') "14",
to_char(sum(decode(to_char(first_time,'HH24'),'15',1,0)),'99') "15",
to_char(sum(decode(to_char(first_time,'HH24'),'16',1,0)),'99') "16",
to_char(sum(decode(to_char(first_time,'HH24'),'17',1,0)),'99') "17",
to_char(sum(decode(to_char(first_time,'HH24'),'18',1,0)),'99') "18",
to_char(sum(decode(to_char(first_time,'HH24'),'19',1,0)),'99') "19",
to_char(sum(decode(to_char(first_time,'HH24'),'20',1,0)),'99') "20",
to_char(sum(decode(to_char(first_time,'HH24'),'21',1,0)),'99') "21",
to_char(sum(decode(to_char(first_time,'HH24'),'22',1,0)),'99') "22",
to_char(sum(decode(to_char(first_time,'HH24'),'23',1,0)),'99') "23"
from
v$log_history
where to_date(first_time) > sysdate -8
GROUP by
to_char(first_time,'YYYY-MON-DD'), to_date(first_time)
order by to_date(first_time)
/

EBS : ORA-04031: unable to allocate 3896 bytes of shared memory

Error:

04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"
    *Cause:  More shared memory is needed than was allocated in the shared
         pool.
    *Action: If the shared pool is out of memory, either use the
         DBMS_SHARED_POOL package to pin large packages,
         reduce your use of shared memory, or increase the amount of
         available shared memory by increasing the value of the
         initialization parameters SHARED_POOL_RESERVED_SIZE and
         SHARED_POOL_SIZE.
         If the large pool is out of memory, increase the initialization
         parameter LARGE_POOL_SIZE.

Solution:

1 . Stop the application services
     adstpal.sh apps/apps
     CCM will not stop kill all the application Tier services

2. Bounce the database
    alter system switch logfile;
    alter system switch logfile;
    alter system switch logfile;
    shut immediate [if shut immediate does not bring down the database use shut abort]

3. Increase the shared_pool_size value in init.ora file

4. Start the database
     Startup

5. Start the application services
    adstrtal.sh apps/apps


Monday 22 September 2014

EBS : ICX Authentication cookie


Steps:
  1. Open IE
  2. Provide the link to access EBS R12.
  3. Logged to EBS
  4. In same Tab & in the address bar paste : javascript:document.writeln(document.cookie);

EBS : Workflow mailer Startup problem (System Deactivated):

Error:

at oracle.apps.fnd.wf.mailer.MailerUtils.isSocketConnectableNew(MailerUtils.java:300)
 at oracle.apps.fnd.wf.mailer.SMTPUtils.isValidOutbound(SMTPUtils.java:522)
 at oracle.apps.fnd.wf.mailer.Mailer.validateParameterValues(Mailer.java:1238)
 at oracle.apps.fnd.cp.gsc.SvcComponent.performValidateParameterValues(SvcComponent.java:233)
 at oracle.apps.fnd.cp.gsc.SvcComponent.start(SvcComponent.java:314)
 at oracle.apps.fnd.cp.gsc.SvcComponentContainer.handleComponentEvent(SvcComponentContainer.java:2212)
 at oracle.apps.fnd.cp.gsc.SvcComponentContainer.onBusinessEvent(SvcComponentContainer.java:301)
 at oracle.apps.fnd.wf.bes.DispatchThread.run(DispatchThread.java:57)



Solution:

Check for the inbound and outbound server name in the WF_mailer configuration both the name must be same.

Start the workflow mailer


SQL Developer displaying Junk characters (??????)

Change the Encoding in SQL Developer Preferences as below Tools --> Preferences --> Environment --> Encoding --> UTF...