Here’s one of those odd little tricks that (a) may help in a couple of very special cases and (b) may show up at some future date – or maybe it already does – in the optimizer if it is recognised as a solution to a more popular problem. It’s about an apparent restriction on how the optimizer uses the BITMAP MERGE operation, and to demonstrate a very simple case I’ll start with a data (more...)

Raspberry Pi Version 2 Wifi Inconsistent Connectivity

I’d had some difficulty with WiFi consistently staying connected on each of my Raspberry Pi units.  I’d had a little time to look into it, but no research had offered an answer and the only fixes I’d come up with was a shell script I wrote to force a restart of the NIC, which helped some, but no improvement when I added an antenna, (I considered all the wires, sensors, etc. might be interfering with (more...)

SQL – is there a better way?

Next Tuesday at 11:20 am at Oracle headquarters there will be a panel discussion on SQL. You can participate whether you are there or not as we are collecting questions ahead of time and will video the panel to be posted later. The panel’s participants will be

PL/SQL context switch

Whenever you use PL/SQL in SQL statements, the Oracle engine needs to switch from doing SQL to doing PL/SQL, and switch back after it is done. Generally, this is called a “context switch”. This is an example of that:

-- A function that uses PL/SQL 
create or replace function add_one( value number ) return number is
        l_value number(10):= value;
        return l_value+1;
-- A SQL statement that uses the PL/SQL function
select sum(add_one(id))  (more...)

Packt – Time to learn Oracle and Linux

What is your resolution for learning? Learn Oracle, Learn Linux or both. It' s a good news for people who are interested in improving Oracle and Linux skills. Packt Promotional (discount of 50%) for eBooks & videos from today until 23rd Feb, 2016. 

[Cloud | On-Premise | Outsourcing | In-Sourcing] and why you will fail!

error-24842_640I was reading this article about UK government in-sourcing all the work they previously outsourced.

This could be a story about any one of a number of failed outsourcing or cloud migration projects I’ve read about over the years. They all follow the same pattern.

  • The company is having an internal problem, that they don’t know how to solve. It could be related to costs, productivity, a paradigm (more...)

Friday Philosophy – Database Dinosaurs

I’m guessing many of you reading this are over 40. I know some of you are actually beyond the half century and a couple of you are….older! If you are younger than 40, just print out this and put it in an envelope marked “read a decade later than {current date}”. It will have become relevant for you by then…

creative commons - Elvinds

creative commons – Elvinds

So wind back your memories to those glorious days in (more...)

Linux Perf Probes for Oracle Tracing

 Topic: this post is about Linux perf and uprobes for tracing and profiling Oracle workloads for advanced troubleshooting.



Literals and VARCHAR2

We all know that comparing two VARCHAR2 fields of different lengths will be treated by Oracle as being not EQUAL:

SQL> drop table T purge;

Table dropped.

SQL> create table T ( x varchar2(10), y varchar2(10));

Table created.

SQL> insert into T values ('abc','abc    ');

1 row created.

SQL> select * from T where x = y;

no rows selected

SQL> select * from T where y = 'abc';

no rows selected

But interestingly enough, (more...)

Determining What Management Packs Are Needed

In Enterprise Manager 12c, there was a little known functionality where you could check what management packs you needed to be licensed for to use a particular page in Enterprise Manager. I referred to it many times at conferences I was presenting at, and almost always people did not realize the functionality existed. Let’s see how this works.

To start with, I’m going to go to the Performance Home page for a particular database (accessed (more...)

ASM Diskgroup Analysis Tip

Recently I have been performing multiple Oracle 12c RAC setups and digging deep into ASM internals. Besides query the ASM environment via the V$ASM_DISK and V$ASM_DISKGROUP dynamic tables, these lesser known command line tools provide detailed troubleshooting assistance for solving difficult ASM issues with your Oracle environments.

As a reference point for today's discussion, I found a very useful support note from Oracle that explains all three utilities to analyze Oracle ASM environments:

Jenkins Plugin for Delphix

In my last blog I talked about trying out Jenkins. In this blog post I want to talk about the new Jenkins plugin for Delphix.

Delphix plugin

Delphix plugin is easy to add. Just navigate to “Manage Jenkins” in the top left

Screen Shot 2016-01-15 at 11.34.17 AM

Then click on “Manage Plugins”

Screen Shot 2016-01-15 at 11.34.27 AM

Then type in “delphix” in the search bar and then click on the “Delphix Jenkins plugin” to install

Screen Shot 2016-01-15 at 11.45.10 AM

Now we can access Delphix APIs through the Jenkins (more...)

Getting Your Transaction SCN – USERENV(COMMITSCN)

A few days ago I was introduced (or re-introduced) to USERENV(‘COMMITSCN’) by Jonathan Lewis. This is an internal function that allows limited access to the SCN of your transaction.

I was trying to find a way to get the actual commit SCN easily as it struck me that Oracle would have it to hand somewhere and it would be unique to the change and generated very efficiently. I could not find anything to do it (more...)

Recover from ORA-01172 & ORA-01151

This morning I was working on an Oracle Management Repository (OMR) for a test Enterprise Manager that is used by a few consultants I work with. When I logged into the box, I found that the OMR was down. When I went to start the database, I was greeted with ORA-01172 and ORA-01151.

These errors basically say:

ORA-01172 – recovery of thread % stuck at block % of file %
ORA-01151 – use media recovery (more...)

I’ll be back!

Tons to say, zero time to write. But… I’ll be back ;)

The curious case of the missing index

Today we were moving some schemas from database A to database B - all was pretty much fine apart from some messages about bad index stats right at the end where it was failing to import some metadata against an object that didn't exist

ORA-39083: Objekttyp INDEX_STATISTICS konnte nicht erstellt werden, Fehler:
ORA-01403: Keine Daten gefunden
ORA-01403: Keine Daten gefunden

It's in German but i'm sure you an work it out

This is very odd (more...)

Drop Column

I published a note on AllthingsOracle a few days ago discussing the options for dropping a column from an existing table. In a little teaser to a future article I pointed out that dropping columns DOESN’T reclaim space; or rather, probably doesn’t, and even if it did you probably won’t like the way it does it.

I will  be writing about “massive deletes” for AllthingsOracle in the near future, but I thought I’d expand on (more...)

DML Operations On Partitioned Tables Can Restart On Invalidation

It's probably not that well known that Oracle can actually rollback / re-start the execution of a DML statement should the cursor become invalidated. By rollback / re-start I mean that Oracle actually performs a statement level rollback (so any modification already performed by that statement until that point gets rolled back), performs another optimization phase of the statement on re-start (due to the invalidation) and begins the execution of the statement from scratch. Note (more...)

Solving the red stack

In the weeks running up to Christmas Red Stack laid down the gauntlet with their 'Christmas challenge' The challenge is now long since closed so i thought i'd post my solution to the problem as I'm intrigued to see if there was more than one way to attack this - here is what i did (I've left out all the trial and error stuff along the way and just given the solution.


Why GUI sucks…

Of course we all know GUI stands for Graphical User Interface, just as CLI stands for Command Line Interface, right!
Or, rather, a GUI is this nice, flashy screen where you can easily roam with your mouse, comparable to a multiple choice quiz, where the right answer is there for the picking.
A CLI on the other hand is this dark, mysterious blinking cursor… Nothing happens unless you know more or less what (more...)