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