Search

Top 60 Oracle Blogs

Recent comments

October 2015

PL/SQL bug with DBMS_RANDOM?

I think I’ve found an (admittedly obscure) bug with DBMS_RANDOM, group functions, PL/SQL and/or SQL.

Have a look and see if you also think this is odd – or have I missed the totally obvious?

(This is all on 12.1.0.2)

{Update – my conclusion is, and thanks to Joel and Sayan for their comments, that this is not a “bug”. Oracle do not promise us how PL/SQL functions are executed due to the way SQL can be re-written by the parser. I think most of us stumbling over something like this would treat it as a bug though. You have to look at the column projection, again see the comments, to see how Oracle is deciding to get the columns derived by a naked call to DBMS_RANDOM.VALUE (by naked I mean no inclusion of parameters passed in and, significantly, no reference to columns). It’s just the way it is}

Example of Full Transportable Export to create a 12c PDB

The Cool Stuff

Oracle has introduced a new way of transporting data from one platform to another in 12c. The new feature is called “Full Transportable Export”. This enhancement works from 11.2.0.3 and later and is a great way to move data, as it allows for an easy-to-use combination of Export Data Pump and Transportable Tablespaces. The documentation specifically praises it as a means to move from an 11g Release 2 database into a 12c Pluggable Database. And Pluggable Databases I like :)

Unfortunately the Full Transportable Export/Import process does not perform endianness conversion for you. And in fact, if you have encrypted data you want to move you cannot do so unless you are on the same endianness.

Limitations

Before we begin, here is a list of restrictions pertaining to the new Full Transportable Export, taken from the 12c Utilities Guide:

PDB Logging Clause… Again…

About 14 months ago I spotted a problem with the PDB Logging Clause. I opened an SR and several months later I got a patch, which unfortunately didn’t fix the issue, just altered the symptom somewhat. I wrote about that patch here.

Yesterday I got a new patch, which actually does fix the problem, so now the PDB Logging Clause works as documented!

I’ve updated the PDB Logging Clause article to reflect the change.

Virtualbox 5.0

I like it when stuff just “works”.

I’ve been using Virtual Box 4 for a long time now, and since my needs are relatively simple (ie, run a VM!) then I’ve not had any great cause to move to version 5.  But today I had a spare few minutes and thought “Well, its probably time”.

So the steps I followed were:

  • download
  • run the installer
  • start version 5

And .. well, all my stuff  (aka all my existing VM’s) worked just fine.  In fact, the only “error” I got was when I tried to start up too many of them at once and VirtualBox helpfully told me that I was either kidding myself or needed a better laptop.

This is how upgrades should be.  Simple and pain free.  Love it.

Downloads are here https://www.virtualbox.org/wiki/Downloads

Delphix Express – virtualize your first database (and application)

I have previously announced that Delphix now has a free version available called Delphix Express as well as how to install Delphix Express.

In this blog will look at an example of virtualizing your first database and not only the database but virtualizing the application as well.

What does virtualizing mean? Like in the world of virtual machines where we make multiple virtual machines on one set of hardware, in the world of virtual data we make many read/write copies of data with one actual physical copy of the data. We do that by sharing unmodified data and storing each version of a data block that gets modified and keeping that modified version of the block only visible to the clone that made the modification.

Here is the demo video:

Helping to Advance your Career

Do you want to advance your career? Help someone else advance theirs. The
more people you drag up the ladder behind you, the faster you go. 



Read the full post at www.gennick.com/database.

Helping to Advance your Career

One of the best ways to advance in your field is to help others advance in your field. It's a surprising truth brought home to me again just now while working with Darl Kuhn and Tom Kyte on an upcoming article for the IOUG SELECT Journal

The year is 1979. It's summer before my senior year in high-school, and my mother has gone out of her way to arrange a college course for me in COBOL programming. (Bless you mom, for doing that). I’m at Henry Ford Community College. My instructor is John Rostek. Three classmates are also high-school students, and the rest are adults looking for better jobs and career changes. It’s an evening course.

John Kaitschuck – I still remember his name – is the youngest of us high-school students. He plans to become a doctor. Curious, I ask why, and his answer slams into me like a ton of bricks:

AskTom and formatting

There’s an interesting “debate” going on under AskTom at the moment.  It’s hardly cause for major concern, but anyone is welcome to add their thoughts as comments to this blog post.  (Naturally, if your comments agree with my opinion, then that’s great.  If your comments don’t agree, then I’ll post them and ignore them Smile – ah the joys of being a blog owner)

So here’s the issue.  When we are posting code to the AskTom page as a solution to a question, we could post it as a mix of script and output, for example:

Fun with array fetch

I’ve lost track of the number of times I’ve worked with systems that didn’t run brilliantly because every database operation was the “row at a time” methodology.  Typically you see hundreds of routines (either in the database in PL/SQL) or further up the chain in C#, Java etc, and the “alarm bells” start ringing in my head when all of those routines are prefixed with “GET_” and the input parameter looks like a primary key.

It doesn’t take long before the code-reuse mindset starts creating things like:

“for each  EMPLOYEE on screen, call GET_EMP_DETAILS(:screen.employee_number)”

So to try demonstrate the silliness of this… I ask the question:

Would you do this in real life ?

And here’s what happens if you do

https://www.youtube.com/watch?v=-Mlxdn5osvs

Cloud Control 12.1.0.5 : Some minor issues (fixed)

em-12cSince the upgrade to Cloud Control 12.1.0.5, we’ve been having a couple of issues, mostly around EMCLI.

Some of our databases use Service Guard, so you don’t know which node they are running on. Rather than having an agent per package, we have one on each node. One of my colleagues wrote a little script to check which node the instance is running on, and relocate it if it has moved. This is done using EMCLI and was working fine before the move to 12.1.0.5. Since the upgrade it’s been rather erratic. It would work for a while, then fail. After watching for a while I noticed a couple of things.