Text box

Please note that the problems that i face may not be the same that exist on your environment so please test before applying the same steps i followed to solve the problem .

Sunday, 30 December 2012

Unable to create font cache directory in Apps 11i

The below error appeared in 11i Apps and we solved it as follows:


 

1. Navigation Path:

(Responsibility) XML Publisher Administrator > (Menu) Home > (Tab) Administration > (SubTab) Configuration > Properties > General > Temporary directory

2. Provide a valid value to 'Temporary directory', and click button 'Save'.

3. Re-test the issue.

The issue:

 
Error Page


Exception Details.

 oracle.apps.fnd.framework.OAException: oracle.apps.xdo.XDOException: Unable to create font cache directory:
 /appltop1/proderpcomn/temp/xdofonts/STAGERP
        at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:975)
        at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
        at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
        at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:785)
        at oracle.apps.per.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:238)
        at oracle.apps.per.irc.offers.webui.OfferReviewCO.processFormRequest(OfferReviewCO.java:152)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
        at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2676)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
        at _oa__html._OA._jspService(_OA.java:84)
        at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
        at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
        at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
        at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
        at oracle.jsp.JspServlet.service(JspServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
        at org.apache.jserv.JServConnection.run(JServConnection.java:294)
        at java.lang.Thread.run(Thread.java:662)
## Detail 0 ##

Sunday, 30 September 2012

11g Cluster Architecture


1-Cluster Architecture:
The oracle cluster-ware is started by OS init daemon as shown below:



During the installation of Oracle Clusterware, the init.ohasd startup script is copied to /etc/init.d. This script is responsible for setting up environment variables and then starting the Oracle Clusterware daemons and processes.
The Oracle High Availability Services daemon (ohasd) is responsible for starting in proper order, monitoring, and restarting other local Oracle daemons, up through the crsd daemon,which manages clusterwide resources. When init starts ohasd on Clusterware startup,ohasd starts orarootagent, cssdagent, and oraagent. These processes then carry out the following tasks:
• orarootagent starts crsd.
- crsd starts another orarootagent process responsible for root-owned CRS
resources including the SCAN VIPS.
• cssdagent starts cssd (ocssd).
• oraagent starts mdnsd, evmd, ASM, ctssd, and gpnpd. oraagent also starts
gsd, Oracle Notification Service (ONS), and the listeners.

Some of the high availability daemons will be running under the root user with real-time
priority, and others will be running under the Clusterware owner with user-mode priorities
after they are started. When a command is used to stop Oracle Clusterware, the daemons will
be stopped, but the ohasd process will remain running.

2-Cluster Processes:
Oracle Clusterware comprises several processes that facilitate cluster operations. The Cluster
Ready Service (CRS), Cluster Synchronization Service (CSS), Event Management (EVM),
and Oracle Notification Service (ONS) components communicate with other cluster
component layers in the same cluster database environment. These components are also the
main communication links between Oracle Database, applications, and the Oracle Clusterware
high availability components. In addition, these background processes monitor and manage
database operations. The following list describes some major Oracle Clusterware background
processes. The list includes components that are processes on Linux and UNIX, or services on
Windows.
• Cluster Ready Service (CRS): Is the primary program for managing high availability
operations in a cluster. The CRS process manages two types of CRS resources:
- Cluster resources: A cluster resource is an Oracle Clusterware resource. Cluster
resources are viewed, added, modified, or removed using the crsctl command.
- Local resources: A local resource runs on every node in the cluster (no failover)
and can be, for example, a listener, ASM, a disk group, or Oracle Notification
Service (ONS).
• The CRS daemon (crsd) manages cluster resources based on configuration information
that is stored in Oracle Cluster Registry (OCR) for each resource. This includes start,
stop, monitor, and failover operations. The crsd process generates events when the
status of a resource changes.
When you have Oracle RAC installed, the crsd process monitors the Oracle database
instance, listener, and so on, and automatically restarts these components when a failure
occurs. When a CRS resource fails, the CRS daemon attempts to restart it, if the resource
is so configured. CRS fails the resource over to another node (again, if it is configured to
do so) after exhausting restart attempts.
• Cluster Synchronization Service (CSS): Manages the cluster configuration by
controlling which nodes are members of the cluster and by notifying members when a
node joins or leaves the cluster. If you are using certified third-party clusterware, then
CSS processes interfaces with your clusterware to manage node membership
information. CSS has three separate processes: the CSS daemon (ocssd), the CSS
Agent (cssdagent), and the CSS Monitor (cssdmonitor). The cssdagent
process monitors the cluster and provides input/output fencing. This service formerly
was provided by Oracle Process Monitor daemon (oprocd), also known as
OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware
restarting the node.
• Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for
Oracle Exadata Storage Server. As Exadata storage can be added to any Oracle RAC
node at any point in time, the diskmon daemon is always started when ocssd is
started.
• Event Manager (EVM): Is a background process that publishes Oracle Clusterware
events
• Multicast domain name service (mDNS): Allows DNS requests. The mDNS process is
a background process on Linux and UNIX, and a service on Windows.
• Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and
external DNS servers. The GNS process performs name resolution within the cluster.
• Oracle Notification Service (ONS): Is a publish-and-subscribe service for
communicating Fast Application Notification (FAN) events
• oraagent: Extends clusterware to support Oracle-specific requirements and complex
resources. It runs server callout scripts when FAN events occur. This process was known
as RACG in Oracle Clusterware 11g Release 1 (11.1).
• Oracle root agent (orarootagent): Is a specialized oraagent process that helps
CRSD manage resources owned by root, such as the network, and the Grid virtual IP
address
• Cluster kill daemon (oclskd): Handles instance/node evictions requests that have
been escalated to CSS
• Grid IPC daemon (gipcd): Is a helper daemon for the communications infrastructure



Component
Processes
Owner
Cluster Ready Service (CRS)
crsd
Root
Cluster Synchronization Service (CSS)
ocssd,cssdmonitor, cssdagent
grid owner,root,root
Event Manager (EVM)
evmd, evmlogger
grid owner
Cluster Time Synchronization Service
(CTSS)
octssd
root
Oracle Notification Service (ONS)
ons, eons
grid owner
Oracle Agent
oraagent
grid owner
Oracle Root Agent
orarootagent
root
Grid Naming Service (GNS)
gnsd
root
Grid Plug and Play (GPnP)
gpnpd
grid owner
Multicast domain name service (mDNS)
mdnsd
grid owner

Thursday, 27 September 2012

Monitoring Rman

In this section i want to discuss how to monitor the RMAN sessions:

Query V$SESSION and V$PROCESS to identify the relationship between server sessions and RMAN

channels.

 COLUMN CLIENT_INFO FORMAT a30
 COLUMN SID FORMAT 999
 COLUMN SPID FORMAT 9999
 SELECT s.sid, p.spid, s.client_info,s.event
 FROM v$process p, v$session s
 WHERE p.addr = s.paddr
 AND CLIENT_INFO LIKE 'rman%';


We can Monitor the progress of backup and restore operations by querying V$SESSION_LONGOPS as shown below:

SQL> SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK; SID SERIAL# CONTEXT SOFAR TOTALWORK %_COMPLETE --- ------- ------- ------- --------- ---------- 20 90 1 9470 15360 61.65 39 100 1 15871 28160 56.36
I wish those sample examples help you out.

Regards
Mohamed ELAzab




Thursday, 20 September 2012

Using data Pump to export and import in case of characterset conversion and in case of no characterset conversion

I want to share 2 cases where we want to export and import into the same character set and export and import into different character set.

NO Character set Conversion:

We export the data from production as follows:
1-Create a parfile and name it ADAPTER.PAR

=================================
Contents of the file:
=================================
schemas=ADAPTER
dumpfile=ADAPTER-20-9-2012.dmp
directory=DPUMP_DIR3
logfile=USG-20-09-12.log
FLASHBACK_SCN=7890710186518

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

Then export  from the database as follows:
C:\expdp mazab@CCDB parfile='ADAPTER.PAR'

transfer the file using scp command:

scp /filepath/ADAPTER-20-09-2012.dmp oracle@Your_IP:/data/DB/TIMDB/DPUMP
=======================================================
=======================================================
Then import the dump as follows:
========================================================
login to TIMDB:
export ORACLE_SID=TIMDB

impdp directory=TIM_DATA_PUMP dumpfile=ADAPTER-9-5-2011.dmp logfile=ADAPTER-9-5-2011.log schemas=adapter REMAP_SCHEMA=adapter:adapters_ea4 remap_tablespace=ADAPTER:TIM_EA3

Please consider the tablespaces on production and remap them in testing.

 Characterset Conversion:


We export the data from production as follows:
1-Create a parfile and name it SUB.PAR
2-Get scn from the production database to avoid parent child constraints error when importing into TIMDB.
=================================
Contents of the file:
=================================
schemas=SUB
dumpfile=SUB-20-09-2012.dmp
directory=DPUMP_DIR3
logfile=SUB20-09-12.log
QUERY =SUB.SMS_ARCHIVE:"where 1=2"
QUERY =SUB.REQUEST_PARAMETER_ARCHIVE:"where 1=2"
QUERY =SUB.REQUEST_ARCHIVE:"where 1=2"
QUERY =SUB.MOBILE_TRADER_STG:"where 1=2"
QUERY =SUB.TRANSACTION:"where 1=2"
QUERY =SUB.TRANSACTION_PARAMETERS:"where 1=2"
QUERY =SUB.Transaction_Archive:"where 1=2"
QUERY =SUB.Request:"where 1=2"
QUERY =SUB.SMS:"where 1=2"
QUERY =SUB.Transaction_Parameters_Archive:"where 1=2"
QUERY =Mobile_trader:"where 1=2"
FLASHBACK_SCN=7882306652406

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

Then export  from the database as follows:
C:\expdp mazab@RSDSDB parfile='SUB.PAR'

transfer the file using scp command:

scp /filepath/SUB-20-09-2012.dmp oracle@Your_IP:/data/DB/TIMDB/DPUMP
=======================================================
=======================================================
Then import the dump as follows:
========================================================
login to TIMDB:
export ORACLE_SID=TIMDB

impdp directory=TIM_DATA_PUMP dumpfile=SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=sub:SUB_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=metadata_only exclude=index exclude=constraint exclude=statistics exclude=trigger exclude=grant
==============================================
==============================================
SQL> drop table semantics$;
SQL>create table semantics$(s_owner varchar2(40),
                       s_table_name varchar2(40),
                       s_column_name varchar2(40),
                       s_data_type varchar2(40),
                       s_char_length number)
===================================================
@insert.sql
@cursor.sql
drop table semantics$;
==================================================
impdp directory=TIM_DATA_PUMP dumpfile=SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=SUB:sub_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=data_only
=====================================================
impdp directory=TIM_DATA_PUMP dumpfile=SUB-SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=SUB:sub_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=metadata_only include=index include=constraint include=statistics include=trigger transform=storage:n
============================================
Contents of the cursors:
==========
@insert.sql
============
insert into semantics$
  select C.owner, C.table_name, C.column_name, C.data_type, C.char_length
    from all_tab_columns C, all_tables T
  where C.owner = T.owner
    and T.owner = upper('&&schema')
    and C.table_name = T.table_name
    and C.char_used = 'B'
-- only need to look for tables who are not yet CHAR semantics.
--  and T.partitioned != 'YES'
-- exclude partitioned tables  (removed condition!)
    and C.table_name not in (select table_name from all_external_tables where owner = upper('&&schema'))
    and C.data_type in ('VARCHAR2', 'CHAR')
  -- You can exclude or include tables or schemas as you wish, by adjusting
  -- "and T.owner not in" as per your requirements
/
===========
@cursor.sql
===========
declare
  cursor c1 is select * from semantics$;
  v_statement varchar2(255);
  v_nc number(10);
  v_nt number(10);
begin
  execute immediate
    'select count(*) from semantics$' into v_nc;
  execute immediate
    'select count(distinct s_table_name) from semantics$' into v_nt;
  dbms_output.put_line
    ('ALTERing ' || v_nc || ' columns in ' || v_nt || ' tables');
  for r1 in c1 loop
    v_statement := 'ALTER TABLE ' || r1.s_owner || '.' || r1.s_table_name;
    v_statement := v_statement || ' modify (' || r1.s_column_name || ' ';
    v_statement := v_statement || r1.s_data_type || '(' || r1.s_char_length;
    v_statement := v_statement || ' CHAR))';
    --dbms_output.put_line(v_statement);
    execute immediate v_statement;
  end loop;
  dbms_output.put_line('Done');
end;
/
=========================================
Please consider the tablespaces on production and remap them in testing.