Saturday, 3 December 2022

New datafiles created in primary database were not created in the Standby

 Problem description: New datafiles created in primary database were not created in the Standby.

 Symptoms: In the standby alert log:

Media Recovery Log /apps/******/****/orclepmp1_1_3211_4234582.arc
 File #17 added to control file as 'UNNAMED00017'
 because the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL 
The file should be manually created to continue. 
Errors with log /apps/apps/******/****/orclepmp1_1_3211_4234582.arc 
MRP0: Background Media Recovery terminated with error 1274
 Errors in file /apps/*****/trace/orcl_pr00_101232.trc:
 ORA-01274: cannot add datafile '/apps/****/****/oradata/testing01.dbf' - file could not be created Recovery interrupted!


Workaround: On standby database:

sqlplus "/as sysdba"
select file#,name from v$datafile where name like '%UNNAMED%';
ALTER DATABASE CREATE DATAFILE 'unnamed datafile' AS 'proper filename';

An example would be: 

alter database create datafile '/apps/***/***/**/**/11.2.0/dbs/UNNAMED00020' as '/apps/***/***/***/testing01.dbf';
alter system set standby_file_management = AUTO;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
exit;

Note:

To avoid this problem, add following  parameter into standby configuration:

                sqlplus "/as sysdba"
alter system set standby_file_management = AUTO scope=both;
exit;

Thursday, 14 July 2022

Adding Managed Server in Oracle Apps R12.2

Adding a new managed server

Addition of managed servers needs to be done on the run file system when there is no active ADOP cycle. During the next adop prepare, the Configuration Change Detector identifies that the addition has been made and the managed servers are automatically synced up from the run file system to the patch file system. The synchronization also gets done when fs_clone is executed.

Adding New oacore (oacore_server2, oacore_server3)

Adding oacore

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

port to use: - 7213(fs1-patch file system),7214(fs2-run file system) [ check port is not being used in run and patch edition context_file as well running netstat in both application servers]

 To add a new managed server of a specific service type, perform the following steps on the run file system:

 

1. Execute the following command to add a new managed server. This will create a managed server and add a new entry to the context file for starting and stopping the new managed server via the adstrtal and adstpall scripts:

$ perl <AD_TOP>/patch/115/bin/adProvisionEBS.pl \
ebs-create-managedserver -contextfile=<CONTEXT_FILE> \
-managedsrvname=<MANAGED_SERVER_NAME> -servicetype=<SERVICE_TYPE> \
-managedsrvport=<MANAGED_SERVER_PORT> -logfile=<LOGFILE>

Example:-  

$ perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \

ebs-create-managedserver -contextfile=/apps/ebs/IMGSIT/R12_2/fs2/inst/apps/IMGSIT_<hostname>/appl/admin/IMGSIT_oraung08.xml \

-managedsrvname=oacore_server2 -servicetype=oacore \

-managedsrvport=7214 -logfile=/apps/ebs/IMGSIT/R12_2/fs2/inst/apps/IMGSIT_<hostname>/logs/appl/rgf/TXK/addMS_oacoreserver2.log


2. Startup the managed server as follows:

On Unix:

$ sh <ADMIN_SCRIPTS_HOME>/admanagedsrvctl.sh start <MANAGED SERVER NAME>


3. Perform the following steps on all application tier nodes participating in the same cluster where this managed server is added:

  1. Source the run file system.

  2. Execute the following command to add details of the newly added managed servers into the OHS configuration files mod_wl_ohs.conf and apps.conf on the current node:
     $ perl <FND_TOP>/patch/115/bin/txkSetAppsConf.pl \
        -contextfile=<CONTEXT_FILE> \
        -configoption=addMS \
        -oacore=<host>.<domain>:<port> \
        -oafm=<host>.<domain>:<port> \
        -forms=<host>.<domain>:<port> \
        -formsc4ws=<host>.<domain>:<port>

For example, 

4.  If Oracle HTTP Server is enabled on the node, restart it as follows:

5. run fs_clone to sync both file system 

$ sh <ADMIN_SCRIPTS_HOME>/adapcctl.sh stop
$ sh <ADMIN_SCRIPTS_HOME>/adapcctl.sh start


6. verify the oacore_server_ports



Managing Configuration of Oracle HTTP Server and Web Application Services in Oracle E-Business Suite Release 12.2 (Doc ID 1905593.1)







Friday, 4 February 2022

Apply RU on Database 19c

  Apply RU on Database 19c

Caution:  It is provided for educational purposes only. It has been tested internally, however; we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Applying RU (Release Update) on Oracle Database 19c

Goal: We are going to apply Patch 30557433 – Database Release Update 19.4.0.0.190716

Table of Contents
___________________________________________________________________________________

1. Environment
2. Introduction
3. Download the patch from MOS (My Oracle Support)
4. Unzip patch
5. List patches which were applied
6. Check Conflict
7. Shutdown Databaseand  LISTENER
8. Backup Oracle Home / Inventory
9. Apply Patch
10. Startup Database
11. Apply SQL changes (datapatch)
12. Verify from dba_registry_sqlpatch
13. Start LISTENER
14. Verify INVALID objects
__________________________________________________________________________________

1. Environment

Platform   : Linuxx86_64

Server IP 

DB Version : Oracle 19c, File system: Normal, RAC: Non-RAC

DB Name    : orcl

Oracle Home: 

2. Introduction

What is an RU? Release Update (formerly known as Proactive Bundle Patches).

 

RU are the second number,eg.19.6.0.0.0

 

Each release update can also be updated with PSUs, still the last number, for example 19.6.0.0.200114

 

You must use the OPatch utility version 12.2.0.1.17 or later

 

3. Download the patch from MOS (My Oracle Support)

https://updates.oracle.com/download/30557433.html

4. Unzip patch 

5. List patches which were applied



6. Check Conflict

7. Shutdown Database and LISTENER

8. Backup Oracle Home / Inventory

      Already done

9.Apply Patch


10. Startup Database



11.Apply SQL changes (datapatch)



12. Verify from dba_registry_sqlpatch

SET LINESIZE 500

SET PAGESIZE 1000

SET SERVEROUT ON

SET LONG 2000000

COLUMN action_time FORMAT A12

COLUMN action FORMAT A10

COLUMN patch_type FORMAT A10

COLUMN description FORMAT A32

COLUMN status FORMAT A10

COLUMN version FORMAT A10

alter session set "_exclude_seed_cdb_view"=FALSE;

select CON_ID,

TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time,

PATCH_ID,

PATCH_TYPE,

ACTION,

DESCRIPTION,

SOURCE_VERSION,

TARGET_VERSION

from CDB_REGISTRY_SQLPATCH

order by CON_ID, action_time, patch_id;


13. Start LISTENER



14. Verify INVALID objects


 

Introduction to Oracle ALTER DATABASE LINK statement

                             Introduction to Oracle ALTER DATABASE LINK statement


Typically, when you create a database link that connects through a user to a remote database, the user is dedicated and not used by anyone else.

However, if the user is also used by someone, then potentially the user's password could be changed, thereby breaking the database link.

When the password of the user of a database link changes, you need to use the ALTER DATABASE LINK statement to update the database link.

The following statement updates the new password for the remote user of a private database link:


ALTER DATABASE LINK private_dblink CONNECT TO remote_user IDENTIFIED BY new_password;


ALTER PUBLIC DATABASE LINK public_dblink CONNECT TO remote_user IDENTIFIED BY new_password;


                         Oracle ALTER DATABASE LINK statement example

This example uses the ALTER DATABASE LINK statement to update the password for the user saurabh of the M2APPS_to_N2APPS database link:


ALTER DATABASE LINK M2APPS_to_N2APPS  CONNECT TO XYZ IDENTIFIED BY xyz@432;