Search

Top 60 Oracle Blogs

Recent comments

October 2015

SQL*Plus hints and tips

I just posted a video on how I get the most out of my SQL*Plus usage.  You can check it out here

I reference various elements of my login.sql file throughout the video – so here’s login.sql file – feel free to utilise any parts of it for your benefit.

The 2nd Annual PASS Summit Bloggers Meetup (2015)

class="l-submain">
class="l-submain-h g-html i-cf">

I’m excited to announce the second annual PASS Summit Bloggers Meetup! We began this last year and it was cool but this year will be even cooler!

What: PASS Summit Bloggers Meetup 2015 /> When: Thursday, October 29th, 5:30pm /> Where: Sports Restaurant & Bar, 140 4th Ave North, Suite 130, Seattle, WA 98109. /> How: Please comment with “COUNT ME IN” if you’re coming — we need to know attendance numbers.

Oracle OpenWorld 2015 – Bloggers Meetup

class="l-submain">
class="l-submain-h g-html i-cf">

Oracle OpenWorld Bloggers Meetup Many of you are coming to San Francisco next week for Oracle OpenWorld 2015 and many of you have already booked time on your calendars on Wednesday evening before the appreciation event. You are right — the Annual Oracle Bloggers Meetup, one of your favorite events of the OpenWorld, is happening at usual place and time!

What: Oracle Bloggers Meetup 2015.

When: Wed, 28-Oct-2015, 5:30pm.

Oracle XMLDB FAQ

In principle this post should be redundant, but due to all the changes the last…

RMAN old feature: Restore datafile without backup

Say I have created a new tablespace recently and did not yet take a backup of the datafile. Now I lose that datafile. Dilemma? No, because I can do an ALTER DATABASE CREATE DATAFILE. Sounds complex? Well even if I wouldn’t be aware of that possibility, a simple RMAN restore will work – as if there were a backup:

Multitentant (Pluggable Database) Videos

It’s been over 2 years since 12c was released and there still seems to be a lot of confusion about the pluggable database stuff. I think most people know the top-level concept, there’s only so many times you can see the memory stick analogy before it gets burned on your skull, but that doesn’t do much to help with the reality of working with it day-to-day.

Richard Foote: Upcoming Presentation Events (David Live)

I’ll be doing the rounds in Australia/NZ in the coming weeks so plenty of opportunity to catch-up and see me in action

Be the Change You Want to See

There is an incredible power with the simple act of doing.  People have a tendency to complain about the world, but there are only a few that refuse to simply accept it as it is and reach out to change it.

Where do my trace files go? V$DIAG_INFO

Where do oracle trace files go? I don’t know why this piece of info will not stick in my head, I seem to have to look it up 3 or 4 times a year.

If only I had an easy way to find out. There is a very easy way to find out – and that piece of info won’t stay in my head either. So this really is a blog post just for stupid, forgetful me.

V$DIAG_INFO has been available since oracle V11. All the trace files go into the Automatic Diagnostic Repository (ADR) by default.

Existence checks

Often, to do an existence check for data, people issue a “SELECT COUNT(…)” against the relevant table. So in pseudo-code, the logic looks like something like this:



select count(*)
into   my_variable
from   MY_TABLE
where  COL = 

if my_variable > 0 then ...


For unique key lookups, then that’s fine, but it’s a risky strategy as a general premise, because counting all of the records can be costly, especially if you’re only interested in the first one. You are coding always hoping that some index lookup is going to be possible. And in strict terms, you actually are not meeting the requirement. Someone asked you to check for existence, NOT to get an exact count of how many matches there were. You are doing more work than you need to.

So here are some potentially better alternatives:

Option 1: stop after the first row