Monday, March 30, 2015

How do I recover the Applications context file if it is lost or deleted accidentally?

The Applications context file can be retrieved by running the adclonectx.pl script.
To retrieve the applications tier context file,
  • Execute the following command on the applications tier. 
perl <COMMON_TOP>/clone/bin/adclonectx.pl retrieve
  • On being prompted for the context file to be retrieved, select the option of retrieving the applications tier context file that has been lost and retrieve it to the default location specified by the script.
The above command can be used only when the <INST_TOP> is still intact. In case the <INST_TOP> has also been lost accidentally, the applications tier context file may be retrieved as follows:
  • Execute the following command on the database tier:
perl <ORACLE_HOME>/appsutil/clone/bin/adclonectx.pl retrieve
  • On being prompted for the context file to be retrieved, select the option of retrieving the applications tier context file that has been lost.
  • While confirming the location for the context file, set it to any existing directory with write permission.
  • Once the context file has been generated in the specified location, move it to the location specified for the context file in the context variable 's_contextfile'.
To retrieve the database tier context file,
  • Execute the following command on the database tier:
perl <ORACLE_HOME>/appsutil/clone/bin/adclonectx.pl retrieve

  • On being prompted for the context file to be retrieved, select the database tier context file and retrieve it to the default location specified by the script.
++++++++++++++++++++++++++++++++
svrhrsuas2:[SVRSUPT]:/u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin:>
# perl adclonectx.pl retrieve

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adclonectx Version 120.23.12010000.1

Running:
/u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/../jlib/ojdbc14.jar:/u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/../jlib/xmlparserv2.jar:/u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/../jlib/java oracle.apps.ad.context.RetrieveContext

Log file located at /u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/RetrieveContext_03301309.log

Database Host [svrhrsuas2]:cgvmhrsudb2

Database Host Domain [singiri.com]:

Database Port [1521]:1525

Database SID:SVRSUPT

APPS Schema Name [APPS]: apps

APPS Schema Password: apps

The following context files are available:

[1] SVRSUPT_svrhrsuas2 (APPL_TOP Context)
[2] SVRSUPT_ svrhrsuas 1 (APPL_TOP Context)
[3] SVRSUPT_ svrhrsudb (Database Context)

Select the context to retrieve [1]:1

Destination file path [/home/SVRSUPT/apps/SVRSUPT_svrhrsuas2/appl/admin/SVRSUPT_svrhrsuas2.xml]:

Retrieved context file to /home/SVRSUPT/apps/SVRSUPT_svrhrsuas2/appl/admin/SVRSUPT_svrhrsuas2.xml

Log file location: /u401/app/oracle/SVRSUPT/apps/apps_st/comn/clone/bin/RetrieveContext_03301309.log

++++++++
Using AutoConfig to Manage System Configurations in Oracle E-Business Suite Release 12 (Doc ID 387859.1)
++++++++

Wednesday, March 18, 2015

SQL*Loader-643: error executing INSERT statement for table ...

ERROR :-

“SQL*Loader-643: error executing INSERT statement for table “SVR_STG"."STG_XML_FILES"
ORA-03113: end-of-file on communication channel
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.”

Reason : XML - EVENT :
Solution :-

 $ connect / as sysdba
 SQL>  alter system set events '31156 trace name context forever, level 0x400';
           System altered.

SQL> exit
   
 
Following syntax works -

SQL> alter system set events '31156 trace name context forever, level 0x400';

System altered.

Correct method to set the event in the SPFILE is to use the below SQL syntax:

SQL> alter system set event='31156 trace name context forever, level 0x400' scope=spfile;

or

SQL> alter system set event='31150 trace name context forever, level 0x400' scope=spfile;

The instance must be restarted for the events to take effect.

Other way to set the event at database level is to set it in parameter file using the syntax below -

event="31150 trace name context forever, level 0x400"

or

event="31156 trace name context forever, level 0x400"

If you are using SPFILE then you may have to generate the pfile from SPFILE using the steps from below note-

How to Modify the Content of an SPFILE Parameter File (Doc ID 137483.1)

Modify the PFILE parameter value with a text editor and save the file, e.g. -

*.event='31150 trace name context forever, level 0x4000'


Recreate the SPFILE from the modified PFILE.

++++++++++++++++++++++++++++