December 14, 2020

Useful scripts for E Business Suite R12

 In this topic I have explained the purpose of various script that we use for E business suite R12 instance


Script Name

Details

addbctl.sh

This script basically calls adstrtdb.sql to start the DB  or adstopdb.sql to stop the database

Example:-

To start DB :- sh addbctl.sh start

To Stop DB :-

sh addbctl.sh stop normal | immediate|abort

Script location :- $ORACLE_HOME/appsutil/script/<$CONTEXT_NAME>

addlnctl.sh

This script is used to start or stop database listener.

Example:-

To start  Listener:- sh addlnctl.sh start <Listener_name>

To Stop  Listener:- sh addlnctl.sh stop <Listener_name>

To check listener status :- sh addlnctl.sh status <Listener_name>

Script location :- $ORACLE_HOME/appsutil/script/<$CONTEXT_NAME>

adautocfg.sh

This script basically is used to run autoconfig . Autoconfig calls adconfig.sh and adconfig.sh is also calls another perl script namely adconfig.pl

Example:- sh adautocfg.sh

 

Script location for DBTier :-

<RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>

 

Script location for Apps Tier :-

<INST_TOP>/admin/scripts

adstrtal.sh

This script starts all the services related to E Business Suite on application tier.Using this single  script we can start multiple service components which are required to run EBS .

 

Example:- sh adstrtal.sh apps/<apps_pwd>

 

Script location:-

<INST_TOP>/admin/scripts

adstpal.sh

This script stops all the services related to E Business Suite on application tier. Using this single  script we can stop multiple service components which are related to run EBS .

Example:- sh adstpal.sh apps/<apps_pwd>

 

 

Script location:-

<INST_TOP>/admin/scripts

adalnctl.sh

We can run this script to start/stop/check status of application RPC listener.

sh adalnctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

adapcctl.sh

This script is used to start/stop or check the oracle http server.

Example:- sh adapcctl.sh apps/<apps_pwd>

 

Example:-

sh adapcctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

adcmctl.sh

This script is used to start or stop or check status of concurrent managers.

 

Example:-

sh adcmctl.sh start/stop/status apps/<apps_pwd>

 

Script location:-

<INST_TOP>/admin/scripts

adformsctl.sh

This script basically used to start,stop and check status of forms server in servlet mode.

 

Example:-

sh adformsctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adformsrvctl.sh

This script basically used to start,stop and check status of forms server in socket mode.

 

Example:-

sh adformsrvctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adoacorectl.sh

This script basically used to start,stop and check status of oacore oc4j service.

 

Example:-

sh adoacorectl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adoafmctl.sh

This script basically used to start,stop and check status of oafm oc4j service.

 

Example:-

sh adoafmctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adopmnctl.sh

Using this script we can start/stop and check status of opmn service.

 

Example:-

sh adopmnctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

 

 


December 7, 2020

Bucket named xxxx has pending multipart uploads. Stop all multipart uploads first.


So I received the above error while dropping the bucket in OCI object storage.




As the error reports there is files which are either being uploaded into the bucket or those files are stuck somewhere. As in our case there was no files were getting uploaded when I received the above error.

To find out what files are being uploaded run the following command from OS level. This should be run as os user from which the upload was initiated.

Command:- oci os multipart list –bucket-name <yourbucketname>

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120                                                  {

  "data": [

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_149_1",

      "time-created": "2020-11-24T20:59:47.752000+00:00",

      "upload-id": "2e55d944-e192-ae09-bf4e-8289eb2dcea4"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_153_1",

      "time-created": "2020-11-24T20:59:47.802000+00:00",

      "upload-id": "73d09a66-689d-558d-5570-4c8ae29fadcf"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_156_1",

      "time-created": "2020-11-24T20:59:48.094000+00:00",

      "upload-id": "91cad581-82e6-09d5-caf8-a4d4d5fa029a"

    }

  ]

}

 

So as we can see the above objects are stuck and didn’t upload successfully , because of that we are unable to delete the bucket.

To remove pending upload files.

Command:- oci os multipart abort -ns <object_storage_namespace> -bn <bucket_name> --object-name <object_name> --upload-id <upload_ID>

 

 [prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_149_1  --upload-id 2e55d944-e192-ae09-bf4e-8289eb2dcea4

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_153_1  --upload-id 73d09a66-689d-558d-5570-4c8ae29fadcf

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_156_1  --upload-id 91cad581-82e6-09d5-caf8-a4d4d5fa029a

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

  

Now check again if anymore pending files are there for upload.

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120

[prodtestdb@ccuine23 ~]$

[prodtestdb@ccuine23 ~]$

 

As there is no files left to upload, we can now safely drop the bucket.




December 2, 2020

How to start and stop EBS R12 database and application

In this topic I would show simple steps of starting & stopping of EBS R12 database and application.

 

Environment details :-

Application Version

R12.1.3

Database Version

11.2.0.4

OS

RHEL 7.7

DB SID

PRODTEST

Application OS User

Prodtestappl

Database OS  User

prodtestdb

R12 install base

/backup/prodtest

 

Important facts to remember: -

To start up R12 instance, first start the database services i.e database and listener and then start the application.

To shutdown R12 instance, first shutdown the application then shutdown the listener and database.

While starting the application, the database and listener must be running. Because the during the start up process of application it logs into the database and starts up other components/services related to application.

Also, during the shutdown of application the database and listener must be up and running for the same above reason.

 

Start Database Tier


First login to Database os user.(prodtestdb)

Now set environment file from the following path

 

cd /backup/prodtest/db/tech_st/11.2.0.4 [Here /backup/prodtest is the install base of R12 instance]

[prodtestdb@ccuine23 11.2.0.4]$ . PRODTEST_ccuine23.env  


[prodtestdb@ccuine23 PRODTEST_ccuine23]$ sqlplus / as sysdba

SQL>startup

The database can be started in another way..

cd $ORACLE_HOME/appsutil/scripts/PRODTEST_ccuine23

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ ./addbctl.sh start

 

You are running addbctl.sh version 120.1

Starting the database PRODTEST ...

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 2 09:44:40 2020

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

ORACLE instance started.

Total System Global Area 6.4137E+10 bytes

Fixed Size                  2269072 bytes

Variable Size            1.2080E+10 bytes

Database Buffers         5.1942E+10 bytes

Redo Buffers              112762880 bytes

Database mounted.

Database opened.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

addbctl.sh: exiting with status 0

 

Now start the listener

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ lsnrctl start PRODTEST

 Or

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ ./addlnctl.sh start prodtest

 

Now lets verify if the database is running

SQL> select name,open_mode,database_role from v$database,v$instance;

NAME      OPEN_MODE            DATABASE_ROLE

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

PRODTEST  READ WRITE           PRIMARY

 

 

Start Application  Tier


First login to Application OS user.(prodtestappl)

Now set environment file from the following path

[prodtestappl@ccuine23 appl]$ cd /backup/prodtest/apps/apps_st/appl4 [Here /backup/prodtest is the install base of R12 instance]

[prodtestappl@ccuine23 11.2.0.4]$ . APPSPRODTEST_ccuine23.env



[prodtestappl@ccuine23 appl]$ cd $ADMIN_SCRIPTS_HOME

[prodtestappl@ccuine23 scripts]$ adstrtal.sh

You are running adstrtal.sh version 120.15.12010000.3

Enter the APPS username: apps

Enter the APPS password:

The logfile for this session is located at /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adstrtal.log

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adopmnctl.sh start

script returned:

****************************************************

You are running adopmnctl.sh version 120.6.12010000.5

Starting Oracle Process Manager (OPMN) ...

opmnctl: opmn started.

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adopmnctl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adalnctl.sh start

script returned:

****************************************************

adalnctl.sh version 120.3

Checking for FNDFS executable.

Starting listener process APPS_PRODTEST.

adalnctl.sh: exiting with status 0

adalnctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adalnctl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adapcctl.sh start

script returned:

****************************************************

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

opmnctl: opmn is already running.

opmnctl: starting opmn managed processes...

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adapcctl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adoacorectl.sh start

script returned:

****************************************************

You are running adoacorectl.sh version 120.13

Starting OPMN managed OACORE OC4J instance  ...

adoacorectl.sh: exiting with status 0

adoacorectl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adoacorectl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adformsctl.sh start

script returned:

****************************************************

You are running adformsctl.sh  version 120.16.12010000.3

 

Starting OPMN managed FORMS OC4J instance  ...

Calling txkChkFormsDeployment.pl to check whether latest FORMSAPP.EAR is deployed...

Program : /backup/prodtest/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl started @ Wed Dec  2 10:23:47 2020

*** Log File = /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/rgf/TXK/txkChkFormsDeployment_Wed_Dec_2_10_23_47_2020/txkChkFormsDeployment_Wed_Dec_2_10_23_47_2020.log

File "/backup/prodtest/apps/tech_st/10.1.3/j2ee/forms/applications/forms/formsweb/WEB-INF/lib/frmsrv.jar" exists. Proceeding to check the size...

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

*** Latest formsapp.ear has been deployed ***

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

Program : /backup/prodtest/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl completed @ Wed Dec  2 10:23:47 2020

Perl script txkChkFormsDeployment.pl got executed successfully

adformsctl.sh: exiting with status 0

adformsctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adformsctl.txt for more information ...

.end std out.

*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS

*** Log File = /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/rgf/TXK/txkChkFormsDeployment_Wed_Dec_2_10_23_47_2020/txkChkFormsDeployment_Wed_Dec_2_10_23_47_2020.log

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adoafmctl.sh start

script returned:

****************************************************

You are running adoafmctl.sh version 120.8

Starting OPMN managed OAFM OC4J instance  ...

adoafmctl.sh: exiting with status 0

adoafmctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adoafmctl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/adcmctl.sh start

script returned:

****************************************************

You are running adcmctl.sh version 120.17.12010000.5

Starting concurrent manager for PRODTEST ...

Starting PRODTEST_1202@PRODTEST Internal Concurrent Manager

Default printer is noprint

adcmctl.sh: exiting with status 0

adcmctl.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adcmctl.txt for more information ...

.end std out.

.end err out.

****************************************************

Executing service control script:

/backup/prodtest/inst/apps/PRODTEST_ccuine23/admin/scripts/jtffmctl.sh start

script returned:

****************************************************

You are running jtffmctl.sh version 120.3

Validating Fulfillment patch level via /backup/prodtest/apps/apps_st/comn/java/classes

Fulfillment patch level validated.

Starting Fulfillment Server for PRODTEST on port 9321 ...

jtffmctl.sh: exiting with status 0

.end std out.

.end err out.

****************************************************

All enabled services for this node are started.

adstrtal.sh: Exiting with status 0

adstrtal.sh: check the logfile /backup/prodtest/inst/apps/PRODTEST_ccuine23/logs/appl/admin/log/adstrtal.log for more information ...

 

 

Note: It is important to make sure that all sciprts are executed with status 0. Generally, the status 0 ensures the services are started properly.


Shutdown Application  Tier


Login to Application OS User.(prodtestappl)

Now set environment file from the following path

[prodtestappl@ccuine23 appl]$ cd /backup/prodtest/apps/apps_st/appl4 [Here /backup/prodtest is the install base of R12 instance]

[prodtestappl@ccuine23 11.2.0.4]$ . APPSPRODTEST_ccuine23.env


[prodtestappl@ccuine23 appl]$ cd $ADMIN_SCRIPTS_HOME

[prodtestappl@ccuine23 scripts]$ adstpal.sh

 

Note: It is important to make sure all processes related to application are down.

To make sure no process is alive from application end

ps –ef | grep FND | grep prodtestappl

Make sure no output  is shown from the above command

Once no process are shown we can go ahead with the database shutdown process.

 

Shutdown Database  Tier

 Login to Database os user.(prodtestdb)

Now set environment file from the following path

 

cd /backup/prodtest/db/tech_st/11.2.0.4 [Here /backup/prodtest is the install base of R12 instance]

[prodtestdb@ccuine23 11.2.0.4]$ . PRODTEST_ccuine23.env  


[prodtestdb@ccuine23 PRODTEST_ccuine23]$ sqlplus / as sysdba

SQL> shut immediate

Or

cd $ORACLE_HOME/appsutil/scripts/PRODTEST_ccuine23

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ ./addbctl.sh stop immediate

Now stop the listener service

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ lsnrctl stop PRODTEST

Or

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ ./addbctl.sh stop immediate

[prodtestdb@ccuine23 PRODTEST_ccuine23]$ ./addlnctl.sh stop PRODTEST


So this concludes the overall process of startup and shutdown of EBS R12 instance!

Shell Script to Automate Oracle 19c TDE Wallet & sqlnet.ora Backups

  Recently, one of my junior colleague had a requirement to clone a production database. While doing so he faced the following error while o...