Wednesday, 5 February 2025

How does the DBWR process interact with the buffer cache and datafiles?

 The Database Writer (DBWR) process is a crucial background process in Oracle databases that manages the writing of data from the buffer cache to the datafiles. Here's a breakdown of its interaction:   

DB Buffer Cache:

  • The buffer cache is a portion of the System Global Area (SGA) that holds data blocks read from the datafiles. It serves as a temporary storage for frequently accessed data, improving database performance by reducing physical I/O operations.

Tuesday, 4 February 2025

How do parameter files differ between single-instance and RAC environments?

 Parameter Files in Single-Instance vs. RAC: A Deep Dive

Managing Oracle databases involves careful configuration, and a key part of that lies in understanding parameter files. While the basic concepts are similar, there are critical differences in how parameter files behave in single-instance databases compared to Real Application Clusters (RAC) environments. This post will explore these differences with examples, focusing on the shared SPFILE concept in RAC.

What are the advantages of using SPFILE over INIT.ORA?

 An SPFILE (Server Parameter File) is a binary file that stores database initialization parameters in Oracle databases. It was introduced in Oracle 9i as a more robust and manageable alternative to the traditional PFILE (Parameter File), also known as the init.ora file. Here's a breakdown of the advantages of using SPFILE over PFILE:

What is a Parameter File and its Purpose in Oracle Database?

Every Oracle database instance relies on a parameter file to define its fundamental characteristics. Think of it as the database's configuration blueprint. This file dictates everything from memory allocation and database name to control file locations and various other operational settings. Understanding the parameter file is crucial for any DBA or anyone working closely with Oracle databases.   

Monday, 3 February 2025

What is a listener in Oracle Database?

Oracle Listeners: Your Database's Watchman

In the world of Oracle databases, a listener acts like a doorman, managing incoming connection requests from clients. It's a separate process that resides on the database server, patiently waiting for connections. Without a listener, clients can't communicate with the database.

java.lang.AssertionError: No replication server channel, when HTTP port is Disabled

"java.lang.AssertionError: No replication server channel' when HTTP port is Disabled" - this error came when I was trying to setup SSL within Oracle Weblogic. I had created the required keystores (identity.jks & trust.jks) and imported the certificate to these keystores. Post that I added the keystores to all server's (Admin & Managed) configuration and also mapped the certificate alias in SSL tab.

How to use EXPDP to export to multiple locations?

 Efficiently backing up large Oracle databases is crucial for data protection and disaster recovery.  While EXPDP (Export Data Pump) excels at single-location exports, achieving multi-location backups requires a slightly different approach. You might be in a need of exporting a huge schema or some object but you don't have enough storage on single mount point. How to deal with this situation? Well, EXPDP gives you flexibility to export your dump to multiple locations at once. But you must use PARALLEL option to achieve this.

What are the different types of tablespaces available in Oracle Database & their purpose?

 In an Oracle database, tablespaces are fundamental to how data is organized and managed. They act as logical containers for storing various types of data. Here's a breakdown of the key tablespace types: 

1. SYSTEM Tablespace

  • Purpose: This is the most crucial tablespace. It houses the data dictionary, which contains metadata about the entire database. This includes information about users, tables, indexes, and other database objects.

Sunday, 2 February 2025

What is the purpose of using tablespaces in Oracle Database?

Tablespaces serve several crucial purposes in Oracle databases, all contributing to better organization, performance, and manageability. Here's a breakdown of the key reasons for using them:   

Logical Data Organization: Tablespaces provide a logical layer of abstraction between the physical datafiles and the database objects (tables, indexes, etc.). This allows you to organize data logically, grouping related objects together.  For example, you might have a tablespace for application data, another for user data, and another for indexes. This logical separation simplifies management and makes it easier to understand the structure of your data. 

What are tablespaces in Oracle Database?

 In Oracle Database, a tablespace is a fundamental unit of logical storage. Think of it as a container that holds data for your database objects, such as tables, indexes, and other data. Here's a breakdown of what they are and why they're important:   

How do you determine the optimal SGA value for a given workload?

How to configure System Global Area (SGA) for your Oracle database? How do you know how much shared memory you need to provide to your database? 

Determining the optimal SGA size for a given workload is a crucial aspect of Oracle database performance tuning. It involves a combination of analysis, testing, and iterative adjustments. Here's a breakdown of the process:


Detailed Explanation to SGA Components in Oracle Database

What is the role & impact of different SGA components? 

The System Global Area (SGA) is a crucial memory area in Oracle databases, shared by all server processes and background processes.  It holds data and control information for a single database instance, significantly impacting performance.  Efficient management of the SGA is essential for optimal database operation. Here's a more detailed look at its components:

What are the main components of the SGA in Oracle Database 19c?

The System Global Area (SGA) in Oracle Database 19c is a crucial memory area that stores data and control information for a single Oracle Database instance. It's shared by all server and background processes. Here are the main components:

Saturday, 1 February 2025

Relocate a PDB from SOURCE to TARGET CDB

How to relocate a pluggable database (PDB) from 1 Container database (CDB) to another CDB?

This article talk about PDB relocation i.e. simply migrating and attaching a PDB from 1 CDB to another CDB. The process is almost similar to a normal PDB clone but since we are migrating a DB here so there are variations as well.

For this exercise, I am using Oracle 19c, with 2 CDBs named CDB1, running on 2 separate VMs. Here is the simple picture,

Tuesday, 28 January 2025

java.lang.RuntimeException: Cannot convert identity certificate

While implementing SSL in Oracle Weblogic, you might see the error <Cannot convert identity certificate>, mostly when your Weblogic version is either 10.3.2 or lower than this.

<Jan 28, 2025 8:33:06 AM CET> <Debug> <SecuritySSL> <BEA-000000> <Cannot convert identity certificate

java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11

              at com.certicom.security.cert.internal.x509.X509V3CertImpl.<init>(Unknown Source)

              at com.certicom.tls.interfaceimpl.CertificateSupport.addAuthChain(Unknown Source)

              at com.certicom.net.ssl.SSLContext.addAuthChain(Unknown Source)

              at com.bea.sslplus.CerticomSSLContext.addIdentity(Unknown Source)

Monday, 27 January 2025

Configuring JAVA 6 to use TLS version 2 (TLSv2)

How to use TLSV2 with JAVA 6? Can JAVA 6 run TLSv2 or higher versions?

Yes, JAVA 6 supports encryption up to TLSv2 version.

This case might not be relevant to most of the people but there are still some legacy applications which are still running with JAVA 6 and you might need to have SSL implemented with that application due to security reasons. Now, free JAVA 6 supports ciphers till TLS version 1 but not beyond it. Though Oracle has provided compatibility with TLS v2 with latest updates, you can refer Oracle article here to get to know about it but the problem is that you'll need to buy JAVA license to use that feature officially.

Friday, 24 January 2025

Vagrant Learning : Day 2

On Day 1, we understood what Vagrant is all about and how to get started with using Vagrant. So we download 1 Box (bento/ubuntu-16.04) and configured a VM using the same with very basic configuration in VAGRANTFILE. Today we'll explore some more configuration options and also see how to manage this VM. 

Thursday, 23 January 2025

Create a self signed certificate (SHA256) using OpenSSL

Creating Self Signed certificate is very essential when you are practicing SSL implementation OR doing some POC and you need to test the environment with SSL certificate. In such cases, a self signed certificate is a quick solution and go-to route for most of the cases. Of course, you must use self signed certificates for testing and internal environment and not for Production or Critical environments where security can not be compromised.

Tuesday, 21 January 2025

Understanding Vagrant - Day 1

I know I am late but finally I got the opportunity to see what VAGRANT is all about. In this article, I am going to cover everything I'll go as part of my 1st learning experience with VAGRANT so if you are also new to this, let's see it together.

Installing Vagrant:

You can download the latest Vagrant software here. For me, it's Version: 2.4.3 and I have downloaded AMD64 for my Windows machine.

The installation is quite easy so if you have every installed any software, it should not be difficult for you.

Monday, 20 January 2025

Using INCLUDE/EXCLUDE options in Oracle EXPDP/IMPDP

Within Oracle Datapump parameters, you can specify a set of objects to be included or excluded from an Export or Import operation, such as tables, indexes, grants, procedures.

EXCLUDE and INCLUDE and mutually exclusive parameters, that means you can only specify 1 of them at a time in EXPDP or IMPDP commands. Below shown in the syntax,

EXCLUDE = object_type[:name_clause] [, ...]
INCLUDE = object_type[:name_clause] [, ...]

Examples:

expdp ... SCHEMAS=scott EXCLUDE=SEQUENCE, TABLE:\"IN ('EMP', 'DEPT')\"
impdp ... SCHEMAS=scott INCLUDE=FUNCTION, PACKAGE, TABLE:\"= 'EMP'\"