Connecting to PostgreSQL

To connect to PostgreSQL, the following parameters are required:

1. Host or Host Address
2. Port
3. Database Name
4. User
5. Password

As mentioned, in my earlier post, like sqlplus in oracle, PostgreSQL has “psql”.
To connect any PostgreSQL db, you can use

1. psql
2. pgAdmin4
3. phpPgAdmin

Using psql

The default port number for PostgreSQL is 5432.

i) psql -h hostname -p port -d dbname -U username

bash-3.2$ psql -h localhost  (more...)

PostgreSQL – An introduction

2017 – A year of learning !!

Today technology is changing at a very rapid speed and it’s very difficult to keep up to it but as said, it’s never too late to start something new. This year I plan to spend some time outside of Oracle and learn some new things.

I have started learning PostgreSQL and I want to take this platform to share my learning and to learn from others.  As this (more...)

Happy New Year 2017

Wishing everyone a very happy and prosperous 2017. May all your dreams come true and …..


Work Hard, Stay Positive !!

Cheers !!

Filed under: Oracle

“U” entries in MLOG$

Recently in a discussion with colleague, on what entries do MLOG$ have, the following was agreed to :-

1. “I” for insert
2. “D” for delete
3. “D” + “I” for update.

Along with the above entries, you might notice “U” also. The “U” entry is for update. But then, on what condition do we get “U” and when do we get “D” and “I” entries.

I have used “EMP” table as master table in (more...)

Enabling Flashback – Be Cautions

Enabling flashback on database can take minutes and cause multiple database wait events degrading database performance.

On a quite busy system, during the low peak hours, I tried to enable flashback on version database and multiple sessions waited on

1. buffer exterminate
2. enq: SQ – contention
3. latch: cbc contention
4. SGA: allocation forcing component growth

PRAKANAN_DBA@:1> show parameter sga_target
NAME                           TYPE        VALUE
------------------------------ -----------  (more...)

EM Express Login – Get Flash

I have 12c setup on OEL 6.7 on my VM and while trying to access EM express, I was receiving the error


Just for the notes, a user can log into EM Express using URL


and port details can be found using

lsnrctl status | grep HTTP
select dbms_xdb_config.getHttpsPort() from dual;

Clicking on the “Get Flash” takes you to abode flash page from where you can download the rpm for flash.


Fixed Table x$ktfbue has not statistics

While playing around db, I ran my usual script to check tablespace usage details and it took ~59 secs (Elapsed: 00:00:59.02), which was high.
Ran the sql using “gather_plan_statistics” hint and below lines in the execution plan were of interest –

|  34 |      HASH GROUP BY                     |                    |      1 |      6 |      3 |00:00:58.68 |     129K|  54801 |  1160K|  1160K|  758K (0)|
|  35 |       VIEW                             | DBA_FREE_SPACE      (more...)

Oracle ASMLib

This blog post is more of a note for myself on configuring ASMLib.

ASMLib is an optional utility that can be used on Linux systems to manage Oracle ASM devices.

ASMLib consists of the following components:

An open source (GPL) kernel module package: kmod-oracleasm
An open source (GPL) utilities package: oracleasm-support
A closed source (proprietary) library package: oracleasmlib

On my Oracle VMBox, I performed the below steps –

1. Check the installed packages related to (more...)

Tuned-adm and Oracle

“Tuned” in RHEL7/OEL7 is tuning daemon for automatically tuning the system via the use of tuning profile. It can also be configured to react to changes to improve performance of the server and also to make system settings persistent.

“tuned-adm” is a command line tool that provides a number of different profiles to improve performance.

Below are the profiles provided and supported in RHEL 7 :-

  1. throughput-performance
  2. latency-performance
  3. network-latency
  4. network-throughput
  5. virtual-guest
  6. virtual-host

Apart from the (more...)

12cR1 RAC Installation on OEL7

To build Oracle Clusterware Database at Home, I believe , RAC ATTACK is the best place to learn. Its is a free curriculum and platform for hands-on learning labs related to Oracle RAC. While reviewing the article, I thought to perform 12cR1 RAC installation on OEL 7.2.

Attached is the document :- 12c_RAC_on_OEL7

The attached article is inspired by


Tim Hall’s article :- 

Deploying Oracle RAC (more...)

Happy New Year 2016!

Hello Everyone!!

I would like to take this opportunity to thank you all for visiting my blog  and to wish you and your family a Happy New Year 2016!!!




Filed under: Oracle

2015 in review

The stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 170,000 times in 2015. If it were an exhibit at the Louvre Museum, it would take about 7 days for that many people to see it.

Click here to see the complete report.

Filed under: Oracle

Online Partition Move fails with ORA-00932 –

Oracle 12c introduced feature to move table partitions and sub-partitions as online operations.So, this blog is related to this feature and the issue I faced.

The database was upgraded from to and this issue is seen in upgraded databases only.

Lets start!!!

SQL> create table sales_part
    (product char(25),channel_id number,cust_id number,
    amount_sold number, time_id date)
    partition by range (time_id)
    partition sale_jan values less than (to_date('01-02-2015','dd-mm-yyyy')),
    partition  (more...)

PDB Saved state –

Prior to version, whenever container database was restarted,the pluggable databases within the container database remained in MOUNT state. Startup trigger were written to open the database in READ-WRITE/READ-ONLY mode.Starting from, this can be done with PDB save state feature

SQL> show pdbs

---------- ----------------- ---------- ----------

Lets create a new PDB


latch: cache buffers chains and rollback

I had an interesting encounter with latch: cbc contention early this week. During my oncall I received page for Load of 206.81 exceeded threshold of 150. After I logged into server , the server load average was continously increasing and all the top PIDs were of oracle processes. After logging into database, I saw multiple sessions waiting on latch: cache buffer chains wait event

load average: 258.52, 244.27, 226.15

select username,sql_id,event,count(*)  (more...)