07 December 2024

Oracle E-Business Suite R12.2.14 Clone with Oracle 19c Database

Oracle E-Business Suite R12.2.14 Clone with Oracle 19c Database

Oracle E-Business Suite R12.2.14 Clone with Oracle 19c Database

Source System

  • Hostname: prodr12.githesh.com
  • Base Directory: /u03/oracle/PROD
  • 19C_ORACLE_HOME: /u03/oracle/PROD/19.0.0/
  • DATAFILE LOCATION: /u01/oracle/
  • CDB NAME: PRODCDB
  • PDB NAME: PROD

Oracle EBS and Database Version Information

SQL> select release_name from apps.fnd_product_groups;

RELEASE_NAME
--------------------------------------------------
12.2.14

SQL> SELECT version, version_full FROM v$instance;

VERSION           VERSION_FULL
----------------- -----------------
19.0.0.0.0        19.19.0.0.0
    

Pre-Clone Steps

Application Tier

cd $ADMIN_SCRIPTS_HOME
./adpreclone.pl appsTier
        

Database Tier

cd /u03/oracle/PROD/19.0.0/appsutil/scripts/PROD_prodr12/
./adpreclone.pl dbTier
        

Backup Steps

  • RDBMS ORACLE HOME: /u03/oracle/PROD/19.0.0
  • Backup Command:
    tar cfvz /backup/19c_home.tz /u03/oracle/PROD/19.0.0
  • RMAN Backup Script:
    #!/bin/bash
    # Source the Oracle environment
    if [ -f ~/.bash_profile ]; then
      source ~/.bash_profile
    fi
    
    LOG_FILE="/home/oraprod/backup_PRODCDB_${DATE}.log"
    BACKUP_DIR="/backup/"
    mkdir -p ${BACKUP_DIR}
    
    ${ORACLE_HOME}/bin/rman target / log=${LOG_FILE} <<EOF
    run {
      allocate channel d1 type disk;
      allocate channel d2 type disk;
      allocate channel d3 type disk;
      backup AS COMPRESSED BACKUPSET format '${BACKUP_DIR}/PRODCDB_bu_db_%d_t%t_s%s_p%p' database;
      sql 'alter system archive log current';
      backup AS COMPRESSED BACKUPSET format '${BACKUP_DIR}/PRODCDB_bu_al_t%t_s%s_p%p' archivelog all skip inaccessible delete input;
      backup format '${BACKUP_DIR}/PRODCDB_control%U' current controlfile;
      release channel d1;
      release channel d2;
      release channel d3;
      allocate channel d1 type disk;
      crosscheck backup;
      release channel d1;
    }
    EOF
    
    if [ $? -eq 0 ]; then
      echo "RMAN backup completed successfully. Backup files are stored in ${BACKUP_DIR}."
    else
      echo "RMAN backup failed. Check the log file: ${LOG_FILE}" >&2
      exit 1
    fi
                    
  • Application File System Backup:
    tar cfvz /backup/appliation_file.tz /u03/oracle/PROD/fs1/EBSapps

Target System

  • Hostname: cloner12.githesh.com
  • Base Directory: /u03/oracle/PROD
  • 19C_ORACLE_HOME: /u03/oracle/PROD/19.0.0/
  • DATAFILE LOCATION: /u01/oracle/
  • CDB NAME: DEVCDB
  • PDB NAME: DEV

Clone Steps

  1. Generate Context File for Database:
    cd /u03/oracle/PROD/19.0.0/appsutil/clone/bin/
    perl adclonectx.pl contextfile=/u03/oracle/PROD/19.0.0/appsutil/PROD_prodr12.xml template=/u03/oracle/PROD/19.0.0/appsutil/template/adxdbctx.tmp
                    
  2. Clone Database Technology Stack:
    cd /u03/oracle/PROD/19.0.0/appsutil/clone/bin
    perl adcfgclone.pl dbTechStack /u03/oracle/PROD/19.0.0/appsutil/DEV_cloner12.xml
                    
  3. Rename and Edit pfile, Set Environment, Start DB in nomount:
    . DEVCDB_cloner12.env
    sqlplus / as sysdba
    SQL> create spfile from pfile;
    SQL> startup nomount;
    SQL> ALTER SYSTEM SET DB_FILE_NAME_CONVERT = '/u01/oracle/PROD/oradata/PRODCDB', '/u01/oracle/DEV/oradata/DEVCDB' scope=spfile;
    SQL> ALTER SYSTEM SET LOG_FILE_NAME_CONVERT='/u01/oracle/PROD/oradata/PRODCDB', '/u01/oracle/DEV/oradata/DEVCDB' scope=spfile;
                    
  4. Restore RMAN Backup:
    $ORACLE_HOME/bin/rman auxiliary / log=rman.log <<EOF
    run
    {
        allocate auxiliary channel C1 device type disk;
        allocate auxiliary channel C2 device type disk;
        allocate auxiliary channel C3 device type disk;
        allocate auxiliary channel C4 device type disk;
        allocate auxiliary channel C5 device type disk;
        allocate auxiliary channel C6 device type disk;
        DUPLICATE DATABASE TO "DEVCDB" BACKUP LOCATION '/u03/backup/18062025'  nofilenamecheck;
    }
                    
  5. PDB Configuration:
    sqlplus / as sysdba
    SQL> alter pluggable database PROD close immediate;
    SQL> alter pluggable database PROD unplug into '/u03/oracle/PROD/19.0.0/dbs/PROD.xml';
    SQL> drop pluggable database PROD;
    SQL> create pluggable database DEV using '/u03/oracle/PROD/19.0.0/dbs/PROD.xml' NOCOPY SERVICE_NAME_CONVERT=('DEV','PROD');
    SQL> alter pluggable database DEV open read write;
    SQL> alter pluggable database all open;
    SQL> alter pluggable database all save state instances=all;
                    
  6. Configure the Database:
    cd $ORACLE_HOME/appsutil
    . ./txkSetCfgCDB.env dboraclehome=/u03/oracle/PROD/19.0.0
                    
  7. TNS Configuration:
    cd $ORACLE_HOME/appsutil/bin
    perl txkGenCDBTnsAdmin.pl -dboraclehome=/u03/oracle/PROD/19.0.0 -cdbname=DEVCDB -cdbsid=DEVCDB -dbport=1526 -outdir=/u03/oracle/PROD/19.0.0/appsutil/log
                    
  8. Register Local Listener:
    sqlplus / as sysdba
    SQL> alter system set LOCAL_LISTENER='cloner12:1526' scope=both;
    SQL> alter system register;
    SQL> alter user system identified by manager;
    SQL> alter session set container=DEV;
    SQL> alter trigger SYSTEM.EBS_LOGON compile;
                    
  9. Post-PDB Creation Tasks:
    cd $ORACLE_HOME/appsutil
    . ./txkSetCfgCDB.env dboraclehome=/u03/oracle/PROD/19.0.0
    perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl -dboraclehome=/u03/oracle/PROD/19.0.0 -outdir=/u03/oracle/PROD/19.0.0/appsutil/log -cdbsid=DEVCDB -pdbsid=DEV -appsuser=apps -dbport=1526 -servicetype=onpremise
                    
  10. Setup Utility File Directory:
    cd $ORACLE_HOME
    . DEV_cloner12.env
    # Rename and modify the PROD_utlfiledir.txt to DEV_utlfiledir.txt ($ORACLE_HOME/dbs)
    tail -n 6 DEV_utlfiledir.txt
    mkdir -p /u03/oracle/PROD/temp/DEV
    mkdir -p /u03/oracle/PROD/19.0.0/appsutil/outbound/DEV_cloner12
    perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=setUtlFileDir
    perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir
                    
  11. Run POST-CLONE for Application Tier:
    cd /u03/oracle/PROD/fs1/EBSapps/comn/clone/bin
    ./adcfgclone.pl appsTier dualfs
                    

Check Application URL

grep -e "s_external_url" $CONTEXT_FILE
# Example output:
http://cloner12.githesh.com:8005
        

12 August 2023

Essential Linux Commands for File Management, Monitoring, and Oracle EBS Administration

Essential Linux & Oracle EBS Commands — Quick Reference

Essential Linux Commands for File Management, Monitoring, and Oracle EBS Administration

A compact reference of commonly used Linux and Oracle E-Business Suite commands. Each command includes a short description to help you understand its purpose before execution.

📂 File Transfer and Archive Management

Synchronize files with compression while preserving attributes

Efficiently copy files between systems while compressing data and preserving timestamps, permissions, and ownership.

rsync -az /path/to/source username@host:/path/to/destination

Extract files from a tar archive excluding the inst directory

Unpacks a tar archive to root / while ignoring files inside the inst folder.

tar xfv --exclude='inst/*' -C /

🔍 Searching and Managing Files

Delete files older than 30 days and print their names

Removes old files to free space while printing each deleted filename for confirmation.

find . -mtime +30 -exec rm -f {} \; -print

List files modified within the last 2 minutes

Helps identify recently updated files with detailed metadata (long listing, sorted by time).

find . -type f -mmin -2 -exec ls -ltr {} \;

Find all PDF files and count per directory

Counts how many .PDF files exist in each directory (case-sensitive pattern in this example).

find . -type f -name "*.PDF" | grep -o '/./' | sort | uniq -c

Count number of files in each directory

Quickly checks file distribution across folders by listing each directory with its file count.

find . -type d -exec sh -c 'echo -n "{}: "; find "{}" -maxdepth 1 -type f | wc -l' \;

Delete files older than 10 days and print their names

Removes files older than 10 days and prints each filename as it is deleted.

find . -mtime +10 -exec rm -f {} \; -print

⚙️ Monitoring Processes and Services

Check Oracle Concurrent Manager processes

Verifies if FNDLIBR processes (Concurrent Managers) are running.

ps -ef | grep FNDLIBR

Check Oracle HTTP Server / Apache processes

Lists active Apache or HTTPD processes.

ps -ef | grep apache
ps -ef | grep httpd

Check Forms server processes

Confirms if Oracle Forms runtime processes are active.

ps -ef | grep forms

Check OACore WebLogic managed server processes

Displays running OACore JVM processes (useful for EBS WebLogic troubleshooting).

ps -ef | grep oacore

Check if a port is listening

Tests if a specific port is active and accepting connections.

netstat -an | grep <port>

List open ports with associated processes

Shows which processes are bound to a given port (requires appropriate privileges).

netstat -nlpa | grep <port>

Show processes using port 5557

Finds detailed process info for applications using port 5557.

netstat -anp | grep 5557

Test TCP connection (PostgreSQL example)

Checks if a remote host and port (e.g., PostgreSQL 5432) are reachable using netcat.

nc -zv 10.0.2.155 5432

Verify connection with telnet

Uses telnet to manually test host and port connectivity (useful for quick debugging).

telnet <host_name> <port>

📑 Configuration File Exploration

Quickly extract important port, URL, and service configurations from your Oracle EBS $CONTEXT_FILE.

grep -i oacore_server_ports $CONTEXT_FILE
grep -i oafm_server_ports $CONTEXT_FILE
grep -i appldcp $CONTEXT_FILE
grep -i s_shared $CONTEXT_FILE
grep s_url_protocol $CONTEXT_FILE
grep "s_endUserMonitoringURL" $CONTEXT_FILE
grep "s_external_url" $CONTEXT_FILE
grep "s_webentryhost" $CONTEXT_FILE
grep "s_webentrydomain" $CONTEXT_FILE
grep "s_webdomain" $CONTEXT_FILE
grep "s_login_page" $CONTEXT_FILE
grep "s_active_webport" $CONTEXT_FILE
grep "s_webssl_port" $CONTEXT_FILE
grep "s_webentryurlprotocol" $CONTEXT_FILE
grep "httpslistenparameter" $CONTEXT_FILE
grep "s_enable_sslterminator" $CONTEXT_FILE
grep "adminport" $CONTEXT_FILE
grep "URL" $CONTEXT_FILE
grep $APPLTMP $CONTEXT_FILE
grep $APPLPTMP $CONTEXT_FILE

🖥️ Oracle EBS Managed Server Status

List OACore and OAFM managed servers

Displays all configured managed servers inside the domain directory.

ls $EBS_DOMAIN_HOME/servers/ | grep oacore
ls $EBS_DOMAIN_HOME/servers/ | grep oafm

Check status of specific managed servers

Runs admanagedsrvctl.sh to verify if servers are up or down.

./admanagedsrvctl.sh status oacore_server1
./admanagedsrvctl.sh status forms_server1
./admanagedsrvctl.sh status oafm_server1
./admanagedsrvctl.sh status forms-c4ws_server1

Loop through multiple servers in one go

Automates status checks for multiple managed servers in a single command.

for srv in oacore_server1 oafm_server1 forms_server1 forms-c4ws_server1; do
  ./admanagedsrvctl.sh status $srv
done

🖥️ Terminal Multiplexing with Tmux

Start a new tmux session

Create a detachable terminal session so you can run long jobs and come back to them later.

tmux

Detach from a running session

Press Ctrl+B then D to detach and leave the session running in background.

CTRL+B D

Reattach to a detached session

Reconnect to a previously detached tmux session.

tmux a

🔑 SSH Key Generation and Setup

Generate RSA SSH key (PEM format)

Creates a 2048-bit RSA private/public keypair in PEM format for compatible SSH setups.

ssh-keygen -t rsa -b 2048 -m PEM

Generate ECDSA SSH key

Creates a high-strength ECDSA key (521-bit) for modern SSH security.

ssh-keygen -t ecdsa -b 521

Add public key to authorized_keys

Append your public key so that the corresponding private key can be used to SSH in.

cat id_rsa.pub >> authorized_keys

🔐 File Attributes and Permissions

Add immutable attribute (protect file)

Prevents file deletion or modification even by root until the attribute is removed.

chattr +i <file_name>

Remove immutable attribute

Allows modifications after removing the immutable flag.

chattr -i <file_name>

💽 Disk and Filesystem Identification

List block devices with UUIDs and mount points

Shows block device names, unique identifiers, and where they're mounted.

lsblk -o NAME,UUID,MOUNTPOINT

Display detailed block device info

Prints device information such as LABEL, UUID and filesystem type.

blkid

✍️ Quick Text Replacement

Replace “deny” with “allow” in config.xml

Performs an inline replacement and saves the file using the classic Ex editor.

ex -s -c '%s/deny/allow/g|x' config.xml

27 September 2022

Change APPS password Oracle EBZ R12 (12.2)

APPS Password Change – Oracle EBS R12.2

🛠️ Changing APPS Password in Oracle EBS R12.2

Note: Always ensure you take proper backups before altering APPS, APPLSYS, or APPS_NE user passwords.

🔐 Tables to Backup

  • FND_USER
  • FND_ORACLE_USERID
create table FND_USER_BK as select * from FND_USER;
create table FND_ORACLE_USERID_BK as select * from FND_ORACLE_USERID;

⛔ Step 1: Shut Down the Application Tier

cd /u01/app/PROD
. EBSapps.env run
cd $ADMIN_SCRIPTS_HOME
adstpall.sh

🔄 Step 2: Change APPLSYS Password

A. Using FNDCPASS

FNDCPASS apps/<appspwd> 0 Y system/manager SYSTEM APPLSYS <new_password>

B. Using AFPASSWD

AFPASSWD -c apps@UAT -s APPLSYS

⚙️ Step 3: Run AutoConfig

cd /u01/app/PROD
. EBSapps.env run
cd $ADMIN_SCRIPTS_HOME
adautocfg.sh

🚀 Step 4: Restart Admin Server

cd $ADMIN_SCRIPTS_HOME
sh adadminsrvctl.sh start

📊 Step 5: Verify Server Status

sh adadminsrvctl.sh status

🔁 Step 6: Update WebLogic Datasource Password

A. For AD TXK Delta 7 or Higher

perl $FND_TOP/patch/115/bin/txkManageDBConnectionPool.pl
Choose: updateDSPassword

B. For AD TXK Delta Below 7

  1. Login to WebLogic Console
  2. Click "Lock and Edit"
  3. Navigate: Services → Data Sources
  4. Select EBSDataSource
  5. Update apps user password in Connection Pool
  6. Click “Activate Changes”

04 March 2022

RMAN Backup Script

 #!/bin/bash

# Source the Oracle environment
if [ -f ~/.bash_profile ]; then
  source ~/.bash_profile
fi

LOG_FILE="/home/oraprod/backup_PRODCDB_${DATE}.log"
BACKUP_DIR="/backup/"

# Create the backup directory if it doesn't exist
mkdir -p ${BACKUP_DIR}

# Run RMAN commands directly
${ORACLE_HOME}/bin/rman target / log=${LOG_FILE} <<EOF
run {
  allocate channel d1 type disk;
  allocate channel d2 type disk;
  allocate channel d3 type disk;
  
  # Database backup
  backup AS COMPRESSED BACKUPSET format '${BACKUP_DIR}/PRODCDB_bu_db_%d_t%t_s%s_p%p' database;
  
  # Archive logs
  sql 'alter system archive log current';
  sql 'alter system archive log current';
  sql 'alter system archive log current';
  sql 'alter system archive log current';
  sql 'alter system archive log current';
  
  backup AS COMPRESSED BACKUPSET format '${BACKUP_DIR}/PRODCDB_bu_al_t%t_s%s_p%p' archivelog all skip inaccessible delete input;
  
  # Controlfile backup
  backup format '${BACKUP_DIR}/PRODCDB_control%U' current controlfile;
  
  # Release channels
  release channel d1;
  release channel d2;
  release channel d3;
  
  # Crosscheck backup
  allocate channel d1 type disk;
  crosscheck backup;
  release channel d1;
}
EOF

# Check if the backup succeeded
if [ $? -eq 0 ]; then
  echo "RMAN backup completed successfully. Backup files are stored in ${BACKUP_DIR}."
else
  echo "RMAN backup failed. Check the log file: ${LOG_FILE}" >&2
  exit 1
fi

12 February 2022

Getting Error while login to WebLogic Console Oracle Application R12 (12.2.14)

Getting Error while login to WebLogic Console Oracle Application R12 (12.2)

The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException: [Security:090220]rule 2

 

Issue:
The error I encountered is related to a feature in WebLogic known as a connection filter. This mechanism provides network-layer access control, enabling the server to block unwanted communication based on various criteria.

Solution:

We need to update the connection filter value to 'allow' in the config.xml file located in the $EBS_DOMAIN_HOME/config folder

 

[applprod@cloner12 ~]$ cd $EBS_DOMAIN_HOME/config

[applprod@cloner12 config]$ ls -l config.xml

-rw-r----- 1 applprod dba 55688 Jun 18 22:37 config.xml

[applprod@cloner12 config]$ grep connection-filter config.xml

    <connection-filter>oracle.apps.ad.tools.configuration.wls.filter.EBSConnectionFilterImpl</connection-filter>

    <connection-filter-rule>cloner12.githesh.com * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * deny</connection-filter-rule>

 


Backup the config.xml

 

[applprod@cloner12 config]$ cp -rf  config.xml  config.xml_bk

And change the value from deny to allow

 

[applprod@cloner12 config]$ sed -i 's/<connection-filter-rule>0\.0\.0\.0\/0 \* \* deny<\/connection-filter-rule>/<connection-filter-rule>0.0.0.0\/0 * * allow<\/connection-filter-rule>/' config.xml

[applprod@cloner12 config]$ grep connection-filter config.xml

    <connection-filter>oracle.apps.ad.tools.configuration.wls.filter.EBSConnectionFilterImpl</connection-filter>

    <connection-filter-rule>cloner12.githesh.com * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * allow</connection-filter-rule>

 


 

Stop and Start the admin server

[applprod@cloner12 config]$ cd $ADMIN_SCRIPTS_HOME

[applprod@cloner12 scripts]$ ./adadminsrvctl.sh stop

[applprod@cloner12 scripts]$ ./adadminsrvctl.sh start


 

WebLogic Console

 

 

Oracle E-Business Suite R12.2.14 Clone with Oracle 19c Database

Oracle E-Business Suite R12.2.14 Clone with Oracle 19c Database Oracle E-Business Suite R12.2.14 Clone with Oracle 1...