Skip to content

Database

Everything our consultants learn while running databases for customers: Oracle, PostgreSQL, SQL Server, MySQL, MariaDB, MongoDB and Delphix. Expect hands-on posts about installation, day-to-day administration, backup and recovery, performance tuning, replication and upgrades.

Oracle locks: Identifying blocking sessions

By Franck Pachot . When you have sessions blocked on locks, you probably have all information about the waiters (they call you and anyway their waiting session is visible in v$session our ASH). But you usually need to get enough information that help to identify the blocker. Here is a query I use to get that quickly, based on V$WAIT_CHAINS… 

12c SQL Plan Directive: state has changed between 12.1.0.1 and 12.1.0.2

By Franck Pachot . SQL plan Directives have been introduced in 12c. If you have scripts that check their states (and I have that as I prefer to monitor closely the features that are new) you probably have seen a difference when going from 12.1.0.1 – the first release of 12c and the only one avilable yet in Standard Edition… 

Oracle AVDF post-installation configuration

In one of my last blog, named: “Oracle Audit Vault and Database Firewall (AVDF) 12.1 – installation on VirtualBox” I explained how to install AVDF on VirtualBox. Since some of you asked for a blog on “How to configure AVDF”, I decided to write this posting on AVDF post-installation configuration. This one only concerns the post-installation phase, a third blog… 

AWR does not store explain plan predicates

By Franck Pachot . What is the most important part in an execution plan? It’s probably the predicate section. It helps to see implicit conversions. It helps to understand why an index is used or not. Or to see additional predicates coming from constraints. When you get an execution plan from shared pool, the dbms_xplan.display_cursor() shows the predicates. But when… 

12.1.0.2 CDB views are now using CONTAINERS()

By Franck Pachot . I’ve blogged about multitenant internals at the time when 12.1.0.1 was just released. Something has changed in 12.1.0.2 and blogging about it was in my todo list for a long time. Now the occasion to do it has been triggered by a question on Oracle Forums about CDB_DATA_FILES not showing PDB$SEED datafiles because there is an… 

Oracle SQL Profile: why multiple OPT_ESTIMATE?

By Franck Pachot . In a previous blog I’v shared my script to retrieve the OPT_ESTIMATE hints from a SQL Profile. In the example I made, I had two lines for each table: — PROFILE HINTS from dbiInSite (1) statement 4fz1vtn0w8aak: /*+ OPT_ESTIMATE(@”SEL$2CBA5DDD”, TABLE, “EMPLOYEES”@”SEL$1″, SCALE_ROWS=2) OPT_ESTIMATE(@”SEL$58A6D7F6”, TABLE, “EMPLOYEES”@”SEL$1″, SCALE_ROWS=2) OPT_ESTIMATE(@”SEL$6AE97DF7”, TABLE, “DEPARTMENTS”@”SEL$1″, SCALE_ROWS=5.185185185) OPT_ESTIMATE(@”SEL$58A6D7F6”, TABLE, “DEPARTMENTS”@”SEL$1”, SCALE_ROWS=5.185185185) */ The… 

Using tmux for semi-interactive demos

By Franck Pachot . You are a speaker and like to show some demos. Which kind of demo do you do? you script everything so that you just have to press ‘enter’ during the demo you prepare everything in a text file and copy/paste during the demo you type everything in live? I don’t like the first one because it’s… 

The future of SQL*Plus and some oddities

By Franck Pachot . Rumors are coming after OOW14. Oracle is working on a new SQL*Plus version. Not only a new version. It’s a completely new development. Here is what we know currently about the future of sqlplus an sqldeveloper. But I start with some very old stuff. SQL*Plus sqlplus is an old tool. With many features that look as… 

How to disable all database links

By Franck Pachot . A frequent scenario: you refresh test from production with a RMAN duplicate. Once the duplicate is done, you probably change dblinks so that they address the test environment instead of the production one. But are you sure that nobody will connect in between and risk to access production from the test environement? You want to disable… 

Oracle cloud control / SQL Details / Statistics

By Franck Pachot . A question that I had several times: in Enterprise Manager, in the screen about one SQL statement, the ‘statistics’ tab shows the number of executions, elapsed time, etc. Question is: which time window does it cover? There is a one hour chart above, and two timestamps displayed as ‘First Load Time’ and ‘Last load Time’, and… 

Oracle Grid Infrastructure: fixing the PRVG-10122 error during installation

Making errors is human and when you configure a new Oracle Grid Infrastructure environment (especially one with a large number of nodes), mistakes can happen when configuring ASMLIB on all nodes. If you get an error looking like”PRVG-10122 : ASMLib configuration…does not match with cluster nodes”, there is a simple solution to fix it. When you are installing Grid Infrastructure,…