Infrastructure at your Service

All Posts By

Clemens Bleile

Clemens Bleile

Automatic column formatting in Oracle sqlplus

By | Oracle | No Comments

Column formatting was always a pain in sqlplus when writing queries on the prompt. Most people use tools like SQL Developer or Quest TOAD which can scroll horizontally when running queries against a database, but as a consultant you are often still forced to use sqlplus. Here’s the issue: When running e.g. a query on a table T1 (which is a copy of ALL_OBJECTS) it looks by default as follows and is hard to read:…

Read More
Clemens Bleile

Oracle DML (DELETE) and the Index Clustering Factor

By | Oracle | No Comments

As a consultant working for customers, I’m often in the situation that I have an answer to a problem, but the recommended solution cannot be implemented due to some restrictions. E.g. the recommendation would be to adjust the code, but that is not feasible. In such cases you are forced to try to help without code changes. Recently I was confronted with the following issue: A process takes too long. Digging deeper I could see…

Read More
Clemens Bleile

Merge-Statement crashes with ORA-7445 [kdu_close] caused by Real Time Statistics?

By | Oracle | No Comments

In a recent project we migrated an Oracle database previously running on 12.1.0.2 on an Oracle Database Appliance to an Exadata X8 with DB version 19.7. Shortly after the migration a merge-statement (upsert) failed with an ORA-07445: exception encountered: core dump [kdu_close()+107] [SIGSEGV] [ADDR:0xE0] [PC:0x1276AE6B] [Address not mapped to object] [] The stack looked as follows: kdu_close – updThreePhaseExe – upsexe – opiexe – kpoal8 – opiodr – ttcpip – opitsk – opiino – opiodr…

Read More
Clemens Bleile

Oracle ASH SQL_PLAN_LINE_ID in adaptive plans

By | Oracle | No Comments

There are several methods to find out where time is spent in an execution plan of a query running in an Oracle database. Classical methods like SQL Trace and running a formatter tool like tkprof on the raw trace, or newer methods like SQL Monitor (when the Tuning Pack has been licensed) or running a query with the GATHER_PLAN_STATISTICS-hint (or with statistics_level=all set in the session) and then using DBMS_XPLAN.DISPLAY_CURSOR(format=>’ALLSTATS LAST’). However, what I often…

Read More
Clemens Bleile

DB-Upgrade hangs in SE2 waiting on Streams AQ while gathering statistics on LOGMNR-Tables

By | Oracle | No Comments

A couple of weeks ago I upgraded an Oracle Standard Edition 2 test database from 12.1.0.2 to 12.2.0.1 (with the April 2020 Patch Bundle) on Windows. Recently I upgraded the production database. Both upgrades were done with the Database Upgrade Assistant DBUA. I didn’t use AUTOUPGRADE because I had to upgrade only 1 database and the DBUA handles everything for me (including changing the necessary Windows services and update the timezone file). Both upgrades did…

Read More
Clemens Bleile

Functions in SQL with the Multitenant Containers Clause

By | Oracle | No Comments

By Clemens Bleile To prepare a presentation about Multitenant Tuning I wanted to see the METHOD_OPT dbms_stats global preference of all my pluggable DBs. In this specific case I had 3 PBDs called pdb1, pdb2 and pdb3 in my CDB. For testing purposes I changed the global preference in pdb1 from its default ‘FOR ALL COLUMNS SIZE AUTO’ to ‘FOR ALL INDEXED COLUMNS SIZE AUTO’: c##[email protected]@PDB1> exec dbms_stats.set_global_prefs(‘METHOD_OPT’,’FOR ALL INDEXED COLUMNS SIZE AUTO’); c##[email protected]@PDB1> select…

Read More
Clemens Bleile

Handle DB-Links after Cloning an Oracle Database

By | Oracle | No Comments

By Clemens Bleile After cloning e.g. a production database into a database for development or testing purposes, the DBA has to make sure that no activities in the cloned database have an impact on data in other production databases. Because after cloning production data jobs may still try to modify data through e.g. db-links. I.e. scheduled database jobs must not start in the cloned DB and applications connecting to the cloned database must not modify…

Read More
Clemens Bleile

Starting an Oracle Database when a first connection comes in

By | Oracle | 2 Comments

To save resources I thought about the idea to start an Oracle database automatically when a first connection comes in. I.e. if there are many smaller databases on a server, which are not required during specific times, then we may shut them down and automatically start them when a connection comes in. The objective was that even the first connection should be successful. Is that possible? Yes, it is. Here’s what I did: First of…

Read More
Clemens Bleile

Cleanup a failed Oracle XE installation on Linux Mint

By | Oracle | No Comments

On this Blog I described on how to install Oracle XE on a current Linux Mint version (19.3. Tricia when writing the Blog). After the conversion of the Oracle provided rpm to a deb installation file with the tool alien, you can install the Oracle XE software with a simple command [email protected]:/opt/distr# dpkg -i oracle-database-xe-18c_1.0-2_amd64.deb If the installation fails or the XE database cannot be created with the configuration script later on, then you have…

Read More
Clemens Bleile

Setup Oracle XE on Linux Mint – a funny exercise

By | Oracle | No Comments

On my old Laptop (Acer Travelmate with an Intel Celeron N3160 CPU) I wanted to install Oracle XE. Currently the available XE version is 18.4. My Laptop runs on Linux Mint 19.3 (Tricia). The Blog will describe the steps I had to follow (steps for Ubuntu would be similar). REMARK: The following steps were done just for fun and are not supported and not licensable from Oracle. If you follow them then you do it…

Read More