To connect to PostgreSQL, the following parameters are required:
1. Host or Host Address
3. Database Name
As mentioned, in my earlier post, like sqlplus in oracle, PostgreSQL has “psql”.
To connect any PostgreSQL db, you can use
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...)
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...)
Wishing everyone a very happy and prosperous 2017. May all your dreams come true and …..
Work Hard, Stay Positive !!
Filed under: Oracle
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 on 22.214.171.124 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 126.96.36.199.6 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...)
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.
While playing around 188.8.131.52 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...)
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” 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 :-
Apart from the (more...)
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
RAC ATTACK :- https://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/RAC_Attack_12c
Tim Hall’s article :- https://oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-7-using-virtualbox
Deploying Oracle RAC (more...)
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
The WordPress.com 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
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 184.108.40.206 to 220.127.116.11 and this issue is seen in upgraded databases only.
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')),
Prior to 18.104.22.168 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 22.214.171.124, this can be done with PDB save state feature
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ----------------- ---------- ----------
2 PDB$SEED READ ONLY NO
3 ALPDB READ WRITE NO
Lets create a new PDB
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...)