Saturday 10 December 2022

 

Adop patching AutoPatch error :- Error running SQL and EXEC commands in parallel in Oracle E-Business Suite R12.2.X


1.. Adop patching  AutoPatch error :- Error running SQL and EXEC commands in parallel



2.. As given above patch failed and worker has quited . Navigate to  $AD_TOP/bin and check worker status by using adrctl utility. You can try restarting worker but it will not start.

201

2.. When checked worker log its errored due to below error

ORA-12516, TNS:listener could not find available handler with matching protocol stack

3. So increased processes and processes by 500 and restarted db



4.. Rerun adctrl and enter option 2 to restart a failed job by using adrctl utility.

205

5.. Once worker is started for failed job, status will change as given below.

206

6… Now to apply patch again append previous patching syntax with restart=yes and abandon=no

207Restart=yes and abandon=no is appended because partial patch was applied and not to start patching process from the beginning.

Happy Learning !!!!

Saturday 3 December 2022

Retrieve context value from context file

Compile java code like below

$ javac GetContext.java
$ cp –p GetContext.class $JAVA_TOP/oracle/apps/ad/context/
$ java oracle.apps.ad.context.GetContext
[you will see the usage syntax]

-bash-5.1$ java oracle.apps.ad.context.GetContext $CONTEXT_FILE s_ohs_instance

EBS_web_OHS1

Here is the java code:
package oracle.apps.ad.context;
import java.io.File;
import java.io.PrintStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
import oracle.apps.ad.util.SystemCheck;
public class GetContext
{
public GetContext() {
}
public GetContext(String param) throws Exception {
if (param == null)
throw new IllegalArgumentException("sVars cannot be null/empty");
OAVars oavars = new OAVars(param);
AppsContext appscontext = new AppsContext(param);
String s4 = oavars.getVal("s_at");
System.out.println("Appl Top = " + s4);
}
public GetContext(String ctxFile, String param) {
if (param == null)
throw new IllegalArgumentException("sVars cannot be null/empty");
if (ctxFile == null)
throw new IllegalArgumentException("sVars cannot be null/empty");
OAVars oavars = new OAVars(ctxFile);
AppsContext appscontext = new AppsContext(ctxFile);
String s4 = oavars.getVal(param);
System.out.println(param + " = " + s4);
}
public static void main(String args[])
{
if(args.length == 2)
{
try
{
new GetContext(args[0], args[1]);
}
catch(Exception exception)
{
exception.printStackTrace();
}
System.exit(0);
return;
}
else if(args.length == 1)
{
try
{
new GetContext(args[0]);
}
catch(Exception exception)
{
exception.printStackTrace();
}
System.exit(0);
return;
}
else
{
exitWithUsage();
return;
}
}
public static void exitWithUsage()
{
System.out.println("nnusage:n");
System.out.println(" java oracle.apps.ad.context.GetContext");
System.out.println(" CONTEXT NAME n");
System.out.println(" where:");
System.out.println(" CONTEXT = the path to the Oracle Applications Context file");
System.out.println(" NAME = the name of the variable whose value is required");
System.exit(1);
}
}

 

Rolling back an autoconfig session in EBS R12

Each execution of AutoConfig creates a roll back script in case you want to revert back to
the previous configuration settings. For this we perform the following steps:
 
Step 1: Shut down all services: -
$ cd $ADMIN_SCRIPTS_HOME
sh adstpall.sh APPS/<APPS password>
 
Step 2: Restore AutoConfig session: -
$ cd INST_TOP/admin/log/MMDDhhmm
sh restore.sh
 
Step 3 : Restart all services: -
$ ADMIN_SCRIPTS_HOME/adstrtal.sh APPS/<APPS password>
Restoring the AutoConfig updated files and restarting the services allows you to log on to
OAM.

 

Update Context File command line


For Shell script  this could be useful for you.


Context file can be updated with 


 oracle.apps.ad.context.UpdateContext class.


Usage:


java  oracle.apps.ad.context.UpdateContext {CONTEXT_FILE_FULL_PATH}

 {CONTEXT_VARIABLE_NAME} {DESIRED VALUE}



Example


applmgr>

 java oracle.apps.ad.context.UpdateContext $CONTEXT_FILE s_dbport 1522

Friday 2 December 2022

 

How to change APPLSYSPUB password in EBS R 12.2

 

After implementing PASSWORD_LIFE_TIME TO 30 DAYS for default profile, 

applsyspub user’s password was expired after 30 days.

Following error is observed after logging in to application,

 





Solution:-

We altered the profile of APPLSYSPUB user from default to EBS_APPS and rested the password of APPLSYSPUB user.

SQL> SELECT USERNAME,ACCOUNT_STATUS,EXPIRY_DATE,PROFILE FROM DBA_USERS WHERE USERNAME='APPLSYSPUB';


USERNAME             ACCOUNT_STATUS       EXPIRY_DATE     PROFILE


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



APPLSYSPUB           EXPIRED              27-MAR-21       DEFAULT

 

SQL>  ALTER USER APPlSYSPUB PROFILE EBS_APPS;

 

User altered.

 

 

·       Shutdown application service.

 

[appltest@server scripts]$ cd $ADMIN_SCRIPTS_HOME

[appltest@server scripts]$ adstpal.sh

 

 

·       Reset APPLSYSPUB password using FNDCPASS OR AFPASSWD .

 FNDCPASS APPS/apps 0 Y SYSTEM/manager ORACLE APPLSYSPUB PUB

·       Make following changes in application context file.

Take a backup of application context file.

 

[appltest@server scripts]$ cp $CONTEXT_FILE  TEST_vm1test.xml_bkp

[appltest@server scripts]$ vi $CONTEXT_FILE

Look for following parameter s_gwyuid and s_gwyuid_pass

 

Make changes like this

From

<GWYUID oa_var="s_gwyuid">APPLSYSPUB/PUB</GWYUID>

 

To

<GWYUID oa_var="s_gwyuid">APPLSYSPUB/NEWAPPLSYSPUBPASSWD</GWYUID>

 

From

 

<password oa_var="s_gwyuid_pass">PUB</password>

 

To

<password oa_var="s_gwyuid_pass"> NEWAPPLSYSPUBPASSWD </password>

 

·       Run autoconfig on application tier

[appltest@server scripts]$ sh adautocfg.sh

 

 

·       Start application  and now error should be resolved