Posts

Showing posts from July, 2020

Switching between pluggable database – alter session set container

Image
Alter session set container - <pdb_name> can be used to switch between pluggable databases of multitenant Oracle setup. With Oracle multitenant being Oracles preferred implementation method with non-cdb architecture is deprecated in Oracle 12c - (Refer screen below ,  https://docs.oracle.com/database/121/UPGRD/deprecated.htm#BABDBCJI ), alter session set container does become a common command to use. Alter session set container example oracle@pcitdb:~$ sqlplus sys as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Wed Jul 22 16:57:54 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> set lines 1000 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PRMUATPDB READ WRITE ...

Wait for unread message on broadcast channel - Blocking Sessions

Image
What is Wait for unread message on broadcast channel wait event? Wait for unread message on broadcast channel is a wait event where source destination communication is involved and the database is waiting for a reply from remote party. Mostly this wait is seen related to data pump export (expdp) or import (impdp) operations. Although categorized in idle wait class "Wait for unread message on broadcast channel" can become the blocking session for some other sessions. Common causes for stuck sessions waiting on this wait event includes, Broken databases links, where remote database is not responding. Abnormally killed remote processes causing the sessions to wait. When a session is waiting on "Wait for unread message on broadcast channel" it can become a blocking session for dependent sessions. Most probably these sessions will be waiting on "library cache pin" or related concurrency wait events. The blocking_session column of (g)v$session view...

Query Suddenly Slow - Troubleshooting

Image
My Query Suddenly Slow - The Background My query is suddenly slow, or the database is suddenly slow. For any DBA this is a common complaint from our beloved users, no matter what database server being used this is an inevitable. So what should be the approach to troubleshoot this type of request from an angry user who has already passed the deadline to provide a report? (Normally they all start after the deadline and hope the database will do the magic ::D) Below are set of questions, tasks that can be performed on Oracle, to correctly identify and fix the situation. My Query Suddenly Slow - The Questioner 1. Slow? Is it for single user, subset of users or all the users (Application) If it is a particular query executed by one user, or particular department accessing the system via particular floor, we can always start looking for external clues, such as network delays, a bad application query impacting a particular function etc.. If the all the backend users  and ap...

ORA-12751

What is ORA-12751? ORA-12751 is a generic error which can occur during a resource exhausted condition. Oracle definition for the particular error is below. ora12c@racaprdb1:~$ oerr ora 12751 ora-12751 cpu time or run time policy violation" // *Document: NO // *Cause: A piece of code ran longer than it is supposed to // *Action: If this error persists, contact Oracle Support Services. ora12c@racaprdb1:~$ ORA-12751 example In the given example one of the rac databases was not accepting connections intermittently. Alert log contained ora-12751 errors as below and TNS timeouts were also recorded. 2020-07-14T12:59:34.407693+05:30 MOBPDB(3):minact-scn: useg scan erroring out with error e:12751 2020-07-14T13:02:23.311541+05:30 Thread 1 advanced to log sequence 145866 (LGWR switch) Current log# 2 seq# 145866 mem# 0: +MOBREDO1DG/MOBCDB/ONLINELOG/group_2.258.989494005 Current log# 2 seq# 145866 mem# 1: +MOBREDO2DG/MOBCDB/ONLINELOG/group_2.2...

OpenEdge Replication Setup

This is a step by step guide on OpenEdge Replication setup with 2 nodes. Here I ll be setting up replication for Openedge 10.2B databases on RHEL 6.2 on top of Virtualbox. My replication environment will be configured for automatic transition, (DR conversion to primary) and will be using Defer Agent Startup (DR database can be created while production is running - minimum production timeout) method. With OpenEdge DR option comes as a separate installable add-on products for database. It has two variants. 1. OpenEdge Replication. 2. OpenEdge Replication Plus. (Provides the possibility to perform read-only actions on DR DB) Virtualbox Setup Install OS (Mine - RHEL 6.2) and  Progress Openedge database (Mine -OpenEdge Enterprise DB 10.2B) and the Fathom replication product (Mine - OpenEdge Replication plus). After installation check with ‘showcfg’ on proenv prompt, should display both the products. Clone or manually create another duplicate server.  M...

"_undo_autotune" parameter with undo_management and undo_retention

Oracle does have multiple parameters which govern how undo management happens in database. Each parameter applies in different stages, below we will discuss on each of these. What is undo_management parameter? Undo_managments is the parameter which defines how the undo extents are managed in the database. This can be either AUTO (which is the default setting 11g onwards) or manual. When set to auto Oracle does allocate, retain and free up undo extents, which is the recommended method. Undo extents that are managed by Oracle can be in one of below states, ACTIVE – Undo extents of uncommitted active queries. UNEXPIRED - Undo extents of completed queries, but still within the undo_retention value defined. EXPIERED - Undo extents of completed queries, but still within the undo_retention time period. What is _undo_autotune parameter? Simply put _undo_autotune , is   a parameter that will try to override the undo_retention parameter. When _undo_autotune is...