Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, August 4, 2022

Start up sequence:

The operating system starts ohasd (how):

Once the Operating system starts and finish the boot scrap process it reads /etc/init.d file via the initialisation daemon (INIT daemon >>) called init or init.d. The init tab file is the one it triggers oracle high availability service daemon

INIT daemon is very first daemon to be start  at the time of the operating system boot, we can say it  is system and service manager for the oracle linuxor any linux flavor. This services are start and stop through script which is stored in the /etc/init.d directory .

OHASD:-

Oracle High Availability Daemon   is the introduced in oracle 11g which is manage all clusterware resources , it is  responsible to start and monitor all local oracle clusterware daemon. We can say it is anchor for the all the process .

cat /etc/inittab|grep init.ohasd

h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null

HAS startup sequence:

– /etc/inittab

– /etc/init.d/init.ohasd

– /etc/rc.d/init.d/ohasd

– $GRID_HOME/bin/ohasd.bin

“/etc/init.d/init.ohasd” is started at runlevel 3 (networked, multi-user mode) or runlevel 5 (runlevel 3 + GUI).Logs present under “$GRID_HOME/log/<host_name>“.

/etc/inittab >>/etc/init.d/init.ohasd>>>/etc/rc.d>init.d/ohasd>>$GRID_HOME/ohasd.bin

“crsctl disable crs” updates a flag in “/etc/orale/scls_scr/<host_name>/root/ohasdstr“.

This file either contains “enable” or “disable” without any carriage return.

If “disable“, “/etc/rc.d/init.d/ohasd” will not startup.

nohup /etc/init.d/init.ohasd run &

 ohasd starts agents(whic all agent):

cssdagent - Agent responsible for spawning CSSD. >>> CSSD 

orarootagent - Agent responsible for managing all root owned ohasd resources.

         CRSD - Primary daemon responsible for managing cluster resources.

         CTSSD - Cluster Time Synchronization Services Daemon

         Diskmon

         ACFS (ASM Cluster File System) Drivers

oraagent - Agent responsible for managing all oracle owned ohasd resources.

         MDNSD - Used for DNS lookup

         GIPCD - Used for inter-process and inter-node communication

         GPNPD - Grid Plug & Play Profile Daemon

         EVMD - Event Monitor Daemon

         ASM - Resource for monitoring ASM instances  

cssdmonitor - Monitors CSSD and node health (along wth the cssdagent).

         CSSDmonitor

to start up daemons (gipcd, mdnsd, gpnpd, ctssd, ocssd,crsd, evmd asm etc), and 

crsd starts agents Which)

orarootagent - Agent responsible for managing all root owned crsd resources.

            Network resource - To monitor the public network

            SCAN VIP(s) - Single Client Access Name Virtual IPs

            Node VIPs - One per node

            ACFS Registery - For mounting ASM Cluster File System

            GNS VIP (optional) - VIP for GNS

oraagent - Agent responsible for managing all oracle owned crsd resources.

           ASM Resouce - ASM Instance(s) resource

           Diskgroup - Used for managing/monitoring ASM diskgroups.

           DB Resource - Used for monitoring and managing the DB and instances

           SCAN Listener - Listener for single client access name, listening on SCAN VIP

           Listener - Node listener listening on the Node VIP

           Services - Used for monitoring and managing services

           ONS - Oracle Notification Service

           eONS - Enhanced Oracle Notification Service

           GSD - For 9i backward compatibility

           GNS (optional) - Grid Naming Service - Performs name resolution

that start user resources (database, SCAN, listener etc).

http://rafik-dba.blogspot.com/2019/02/oracle-rac-startup-sequence.html

http://oracle-help.com/oracle-rac/rac-11gr2-clusterware-startup-sequence/

Thursday, July 28, 2022

All Explaination

 http://dbaparadise.com/2021/01/what-is-local-undo-mode/

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

Four Ways to Startup or Shutdown Your 19c Database:

There you have the 4 tools: SQLPLUS, RMAN, Cloud Control, SRVCTL!

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

What Is Local Undo Mode:

12c database (release 1)>>shared undo mode>>undo tablespace was shared by all the PDBs within the same CDB, meaning there was only one UNDO tablespace for the instances.

with 12cR2, the local undo mode was introduced>>each PDB has their own UNDO tablespaces.This is required by a few Oracle features, ie. hot cloning.

Here are some of features that I came across, that require local undo mode: PDB hot cloning, creating refreshable PDBs, near zero downtime PDB relocation, proxy PDBs.

If the database (the CDB) is created with DBCA, then local undo mode is the default mode. If the database (the CDB) is created with the CREATE DATABASE statement, then shared undo mode is the default.

In the latter case, you need to use the undo_mode_clause and specify LOCAL UNDO ON explicitly, if you want to create a database with local undo mode.

How to determine what undo mode the database is in? The answer is in the database_properties view

col property_name for A20

col property_value for A20

 select property_name, property_value  from database_properties where property_name like '%UNDO%';

Another method:

select con_id, tablespace_name from cdb_tablespaces where contents like '%UNDO%' order by 1;

How to switch to local undo mode?

it requires an outage.

sqlplus / as sysdba

shutdown immediate;

startup upgrade

 alter database local undo on;

 shutdown immediate;

startup;

To switch to shared undo mode

sqlplus / as sysdba

shutdown immediate;

startup upgrade;

alter database local undo off;

 shutdown immediate;

startup;

Note that the local undo tablespace inside the PDBs will not be dropped by Oracle and it will not be used either. For clarity purposes it is recommended to drop them manually after you switch the database to shared undo mode.

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

MAX_PDBS parameter:

Introduced in 12cR2.

To limit the number of pluggable databases (PDBs) one can create in a CDB or in an application root container. 

the PDB$SEED, Application Seed and Application Root are ignored from the count.

By default this parameter’s value is 4098

Why would you want to limit the number of PDBs a user can create in the CDB?

One of the reasons is licensing!

In 12c version you can have 1 user created PDB, without paying for the Multitenant option. In 19c you can have up to 3 user created PDBs in a CDB, without paying for the Multitenant option.

Once the parameter is set, if you will try to create another PDB, by accident, you will receive an error: ORA-65010: maximum number of pluggable databases created.

alter system set MAX_PDBS=3 scope=both;

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

How To Use Datapump Between Different Database Releases:

What if the source database is 12.2 and the target database version is 11.2?>> Use Vesion version=12.1

What if the versions are the same, but the compatible parameter of the target database is lower?

Once you find out the target version/compatible parameter, running a datapump export job with the appropriate version will be easy, as Oracle is providing you with an export datapump parameter called VERSION to facilitate this process.

An export datapump dumpfile created by a lower version of Oracle will always be compatible with a higher version of Oracle.

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

active duplicate :

Duplicating from an active database doesn’t require any RMAN backup to be taken from the source database. Actually, it reads all database structure from the source database that needs to be mounted or opened during the duplication.Although this method seems easy as we don’t need to backup source database or make it accessible for auxiliary instance anymore, it has its own disadvantages as well.

Two big disadvantages of the ACTIVE database duplication method are:

Negative performance impact on the source database. This impact applies to the whole duplication time.

High network traffic on the connection between the source and target databases.

 RMAN>run{

            DUPLICATE TARGET DATABASE TO HRPRD

            FROM ACTIVE DATABASE;

           }

1- Prepare auxiliary instance HRPRD1 on prd-db-01:

2- Enable status registration for HRPRD1 to run LISTENER:

3- Add following TNS entries to BOTH auxiliary and target tnsnames.ora file:

4- Ceate a password file for auxiliary instance HRPRD1 on prd-db-01:

5- Test connectivity to auxiliary and target instances from BOTH hosts using TNS:

6- On the auxiliary host, start RMAN and run the DUPLICATE command:

7- When step 6 finishes successfully, start HRPRD database using srvctl. You need to enable the second thread as well:

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

pdb restricted mode.

Here we use OPEN FORCE to leave restricted mode and go back to normal READ WRITE.

alter pluggable database ORCLPDB open force;

https://dbalifeeasy.com/category/oracle/cdbpdb/

Under the guidance of Oracle Support for specific purpose, the following instructions can be followed to open seed database “PDB$SEED” in “READ WRITE” mode.

Set hidden parameter “_oracle_script” at session level

SQL> alter session set "_oracle_script"=TRUE;

https://dbalifeeasy.com/2018/01/22/how-to-remove-pdb-from-restricted-mode/

SQL> select INST_ID,NAME,OPEN_MODE,RESTRICTED 

     from gv$pdbs order by 1,2;

Check PDB_PLUG_IN_VIOLATIONS.

select status, message, action 

     from   pdb_plug_in_violations 

     where  status !='RESOLVED';

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

 

 

Sunday, July 24, 2022

mod_wl_ohs.conf file – Oracle APPS 12.2

Basic use of the file (Text Based) is for redirecting the http requests to the concerned Managed/admin server for particular context root.

If in your environment any one says i am trying to hit Test and it goes to Prod/some where you need to lookout here first.

Entry would look like below :

<IfModule weblogic_module> 

<Location path>            

SetHandler weblogic-handler

WebLogicHost host

WeblogicPort port

</Location>

</IfModule>