Sunday, 4 August 2024

Rman backup in different locations

 Introduction:

Customers whose databases are of huge size and if the RMAN backup size is about 2TB or more and when there is no enough space to keep all of the backup files in a single mountpoint , we spread them in 2 or 3 different mount points.

Question is ” How do we restore when the RMAN backup files are in different location” ?

Solution:

A simple solution to this would be to create softlinks to the backup pieces from location B in the  location A :

In my case,  the database Rman Backup files are spread across 2 different mount points in the Target ( /u02 & /u03)  and  as we cannot pass two locations to the Rman Duplicate command … I’ve created softlinks in  /u02 to the backup pieces in /u03 and passed /u02 as a single backup location to RMAN script.

Example:

cd  /u02/backup/location1

ln -s /u03/backup/location2/PROD_df_full_143926_1.bak PROD_df_full_143926_1.bak

ln -s /u03/backup/location2/PROD_df_full_143927_1.bak PROD_df_full_143927_1.bak

ln -s /u03/backup/location2/PROD_df_full_143929_1.bak PROD_df_full_143929_1.bak

ln -s /u03/backup/location2/PROD_df_full_143936_1.bak PROD_df_full_143936_1.bak

ln -s /u03/backup/location2/PROD_df_full_143935_1.bak PROD_df_full_143935_1.bak

Now, It would look like :

cd  /u02/backup/location1

ls -lrt

FINP01_df_full_143925_6.bak

FINP01_df_full_143930_6.bak

FINP01_df_full_143931_4.bak

FINP01_df_full_143931_2.bak

FINP01_df_full_143931_3.bak

FINP01_df_full_143926_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143926_1.bak

FINP01_df_full_143927_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143927_1.bak

FINP01_df_full_143929_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143929_1.bak

FINP01_df_full_143936_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143936_1.bak

FINP01_df_full_143935_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143935_1.bak

Now, pass ‘/u02/backup/location1’ as the backup location to RMAN duplicate command :

DUPLICATE TARGET DATABASE to <TARGETDB>  BACKUP LOCATION ‘/u02/backup/location1’ NOFILENAMECHECK ;

Tuesday, 25 June 2024

 

Oracle Apps R12 “Cannot complete applications logon”

In a recently cloned R12 instance, we can successfully login as oracle apps user
but clicking on a form based function triggers this pop-up error:

“Cannot complete applications logon.
You may have entered an invalid applications password,
or there may have been a database connect error.”

We checked for GUEST password and it was ORACLE in system profile option and encrypted passwords.
However the services wouldn’t start. If we changed the GUEST password to GUEST the Apache services started but Jserv wouldn’t start:

JVM logs had this error:

Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps
.jtf.base.resources.FrameworkExceptionoracle.apps.fnd.common.PoolException:
Not able to create new database connection: FNDSECURITY_APPL_LOGIN_FAILED


It was clear that GUEST password was out of sync. Since we could not pinpoint where the issue was we followed this strategy to solve this issue:

1. Change the s_guest_passwd to GUEST/GUEST in context file and run autoconfig.
2. Checked everything was working fine, including Apache, Jserv, Forms
3. Changed back s_guest_passwd to GUEST/ORACLE in context file and run autoconfig.

Monday, 29 April 2024

 

Find largest table in oracle


The below query gives you the top 10 largest tables in oracle database.

Script

SELECT * FROM
(select 
 SEGMENT_NAME, 
 SEGMENT_TYPE, 
 BYTES/1024/1024/1024 GB, 
 TABLESPACE_NAME 
from 
 dba_segments
order by 3 desc ) WHERE
ROWNUM <= 10

Tuesday, 19 September 2023

Multinode adop patching:

 In a multi-node setup on EBS 12.2, we can apply patches individually on each node as well.


If ssh is enabled from primary to secondary node then it is not necessary.

But I will show in this post how we can do it manually. This is an interview question and may be required sometimes.

Scenario 1: Shared Application Tier File System with SSH enabled

primary node run below

adop phase=<phase_name>

Scenario 2: Shared Application Tier File System without SSH enabled

primary node: 
adop phase=<phase_name> allnodes=no action=db

secondary node:
adop phase=<phase_name> allnodes=no action=nodb

Note: In a multi-node environment, the cleanup phase is to be executed on the primary node only as it is the DB phase. All other phases have to be executed on primary and all secondary nodes.

Scenario 3: Non-Shared Application Tier File System with SSH enabled

primary node run below

adop phase=<phase_name>

Scenario 4: Non-Shared Application Tier File System without SSH enabled

primary node: 
adop phase=<phase_name> allnodes=no action=db

secondary node:
adop phase=<phase_name> allnodes=no action=nodb

Wednesday, 14 June 2023

DBA SCRIPTS

 https://dbaclass.com/monitor-your-db/

 

Restore INST_TOP if it is deleted or corrupted accidently?

Below steps to restore the INST_TOP if it is deleted or corrupted without using adcfgclone.

Step 1: 

If we have CONTEXT_FILE backup then we can easily restore 
(follow  step-2). If CONTEXT_FILE is not there
 then need to follow below steps to restore CONTEXT_FILE.

  perl /clone/bin/adclonectx.pl retrieve 

Step 2:

Once we restored CONTEXT_FILE then run the auto-config using below script. 
It will recreate INST_TOP without using adcfgcolne.

Run AutoConfig using:
 "perl $AD_TOP/bin/adconfig.pl contextfile=<CONTEXT_FILE>" command 
and it will create the $INST_TOP

Thursday, 6 April 2023

 

Updating Apps Password from Backend in Oracle Apps R12.2


In Oracle Apps R12.2 whenever we are changing apps password we need to update the new value in EBSDatasource in Weblogic.


We can either update the same by going into weblogic console and updating it or we can update it through server using below method.


Steps:

1. Start AdminServer 

$ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start 

Note: Do not start any other application tier services.
update apps pass:
FNDCPASS apps/apps 0 Y system/Manager SYSTEM APPLSYS apps

2. Change the APPS password in WLS Data Source by running the the following script:

perl $FND_TOP/patch/115/bin/txkManageDBConnectionPool.pl

When prompted, select 'updateDSPassword' to update the new APPS password in the WLS Datasource.