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

Wednesday 30 November 2022

 

Apache does not start due to bad group name

When I logged onto a server to clone an EBS instance from production, it gave a message

/app/PROD/inst/apps/PROD_xxxxxxxxxxx/ora/10.1.3/Apache/Apache/bin/apachectl start: execing httpd
httpd: bad group name applprod

-bash-5.1$ adopmnctl.sh startall

You are running adopmnctl.sh version 120.6.12010000.5

Starting Apache...
EXIT CODE is 204. Please check the log file for more details.


Starting OACORE oc4j...
OACORE oc4j started successfully.


Starting FORMS oc4j...
FORMS oc4j started successfully.


Starting OAFM oc4j...
OAFM oc4j started successfully.

 The only error is in $LOG_HOME/ora/10.1.3/opmn/HTTP_Server~1.log :

apachectl startssl: execing httpd
httpd: bad group name applprod

Then I verified group inside 


-bash-5.1$ grep -i group /app/PROD/inst/apps/xxxxxxxxxxxx/ora/10.1.3/Apache/Apache/conf/httpd.conf
# The configuration directives are grouped into three basic sections:
# If you wish httpd to run as a different user or group, you must run
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group nobody on these systems!
Group applprod

---> So changed group here to oinstall which fixed the issue

-bash-5.1$ adapcctl.sh status

You are running adapcctl.sh version 120.7.12010000.4

Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...

Processes in Instance: PROD_xxxxxxxxxx
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group          | OC4J:oafm          |   13758 | Alive
OC4JGroup:default_group          | OC4J:forms         |   13713 | Alive
OC4JGroup:default_group          | OC4J:oacore        |   13608 | Alive
HTTP_Server                      | HTTP_Server        |   22077 | Alive




Thursday 4 August 2022

 

Delete Archivelog until time

Oracle database is archiving redo log group files if database is in archivelog mode.

 

When redo log files are archived, then redo log files are overwritten with new redo data. But archivelogs are not deleted or automatically if you don’t schedule any deletion job.

You need to delete archivelog periodically, otherwise you will get archiver errors.


Delete Archivelog via RMAN

You can delete all archivelogs with following query.

RMAN>  delete archivelog all;

Delete Archivelog Until Time Oracle

You can delete archivelogs until spesific time ( until time 1 day ago ) like following query.

RMAN>  delete archivelog until time 'sysdate -1';

You can delete archivelog which is backed up 1 times to Disk.

RMAN>   delete archivelog all backed up 1 times to DISK;

Saturday 22 January 2022

OEL 8 VNC server issue:

Error:

The XKEYBOARD keymap compiler (xkbcomp) reports:

> Warning:          Could not resolve keysym XF86MonBrightnessCycle

> Warning:          Could not resolve keysym XF86RotationLockToggle

Errors from xkbcomp are not fatal to the X server


Fix:


 # dnf install tigervnc-server tigervnc-server-module -y

# cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:16.service
# firewall-cmd --add-port=5916/tcp --permanent
# firewall-cmd --add-service=vnc-server --permanent
# firewall-cmd --reload
# vi /etc/tigervnc/vncserver.users
:16=user

# vi /etc/tigervnc/vncserver-config-defaults
securitytypes=vncauth,tlsvnc
desktop=sandbox
geometry=2000x1200
localhost
alwaysshared

# \su - user
user$ vncpasswd
user$ exit
# systemctl daemon-reload
# systemctl start vncserver@:16.service
# systemctl enable vncserver@:16.service
# systemctl status vncserver@:16.service

● vncserver@:16.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:16.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2020-12-15 12:49:05 PST; 18min ago
 Main PID: 50980 (code=exited, status=0/SUCCESS)

Dec 15 12:49:04 xxxx.xxxx.xxx systemd[1]: Starting Remote desktop service (VNC)...
Dec 15 12:49:04 xxxx.xxxx.xxx systemd[1]: Started Remote desktop service (VNC).
Dec 15 12:49:05 xxxx.xxxx.xxx systemd[1]: vncserver@:16.service: Succeeded.

Thursday 13 January 2022

 How to move data files to other mounts ??


There are multiple ways.. here are the ones which I followed for PROD :)

1. Shut down your DB

2. At OS level move your datafiles/Tempfiles/Undo or any dbf files to your destination location i.e /u02

    mv /u01/system10.dbf  /u02/system10.dbf

3. Now start the db in mount so that it will update your control files

   startup mount

4. Now use RENAME command as below:

alter database rename file '/u01/system10.dbf' to '/u02/system10.dbf'

..--> Do the same for all required files -->

5. Alter database open

Now for validation , you can check 

select name from v$datafile where name like '%u02%'; - should point out new locations for datafiles

2nd Method:

From 12C onwards, there is an option to move datafile online 

1. Simply use below command to move online datafile from /u01 to /u02

set echo on

set timing on

ALTER DATABASE MOVE DATAFILE '/U05/applfarm/farmdata/a_txn_ind12.dbf' to '/u01/a_txn_ind12.dbf';

ALTER DATABASE MOVE DATAFILE '/U05/applfarm/farmdata/a_txn_ind14.dbf' to '/u02/a_txn_ind14.dbf';

NOTE:  Problem with online datafile move is .. It will not RELEASE space at OS level immediately

as some of your BG process are still accessing the space. After restart space gets released