Data Pump Enhancements in Oracle 21c (and a little support story)

I’ve been having a play with some of the Oracle 21c data pump enhancements. This post links to the resulting articles, and includes a little story about one of the features.

The Articles

Here are the articles I wrote during this investigation.

As an aside, I also knocked up a quick overview of the DBMS_CLOUD package. I’ve used many of the routines in this package in my autonomous database articles over the last few years, but I got a bit sick of jumping around to get the syntax of different operations, so it seemed sensible to have a centralised description of everything, along with working examples.

The Story

The article about using expdp and impdp with a cloud object store (Oracle Cloud Object Storage, AWS S3 or Azure Block Storage) came with a little bit of drama.

Back in the 18c days it was possible to import into an Autonomous Database using a dump file on a cloud object store using the 18c impdp utility. I wrote about this at the time (here). At that time export to a cloud object store using the expdp utility was not supported, and the import wasn’t supported with an on-prem database.

Oracle 21c introduced the ability to export from an Autonomous Database to a cloud object store, which worked fine first time. The documentation also listed a new feature called, “Oracle Data Pump Supports Export to and Import From Cloud Object Stores“. This sounded very much like it meant for on-prem databases, and sure enough it did.

When I started trying to use this feature I pretty quickly hit a road block. The expdp utility couldn’t connect to the object store bucket. I raised a call with Oracle Support about it. While I was waiting for a response I figured this functionality may have a dependency on the DBMS_CLOUD package under the hood, so I installed it in my on-prem database. The on-prem installation of DBMS_CLOUD was working OK, but the expdp utility was still failing to contact the object store bucket.

Due in part to friends in high places, my SR got picked up and it was confirmed the DBMS_CLOUD installation was an undocumented prerequisite, but it was still not working for me. The support engineer confirmed they could replicate the issue too. A few interactions between support and development resulted in bug 33323028, which fortunately had a simple workaround. At that point the support engineer was up and running, but I still had a problem. A bit of tracing later and it turned out my remaining issue was PEBCAK (Problem Exists Between Chair And Keyboard)…

When I installed the DBMS_CLOUD package it said to put a wallet reference in the sqlnet.ora file. I did that and the package seemed to be working OK, so I thought everything was good. Unfortunately I put it under the ORACLE_HOME and Oracle 21c uses a read-only Oracle home, so that’s the wrong place. It didn’t affect the package, as that picks up the wallet location from a database property, but it affected the expdp and impdp utilities. I keep telling people read-only Oracle homes will trip you up if you are not used to them, and sure enough it tripped me up. Damn you muscle memory! Once the correct sqlnet.ora file was amended everything was good.

So the journey to get this feature working involved:

  • An undocumented prerequisite, which I guessed.
  • A bug which Oracle Support and the dev folks gave me a workaround to.
  • An idiot (me) trying to learn not to be an idiot.

With a bit of luck the bug fix/workaround will be rolled into a future release update, so you may never see this. The MOS note about the DBMS_CLOUD package installation suggests this might also be part of the database by default in future. That would be great if it happens.

Anyway, after that little drama I was able to export data from my on-prem database to a dump file located on a cloud object store, and import data from a cloud object store into my on-prem database. Happy days!

Thanks to the support and dev folks who helped get me through this! 🙂

By the way, all the other Oracle 21c data pump new features worked without any issues.

So there you have it. Some new articles and a little bit of drama… 🙂

Cheers

Tim…

Video : Qualified Expressions Enhancements in Oracle Database 21c (part 2)

In today’s video we demonstrate some more of the enhancements to qualified expressions in Oracle database 21c.

You can see the first part here. This is the second video based on this article.

If you are new to qualified expressions, and don’t already know about the FOR LOOP enhancements in 21c, these may be helpful.

The star of today’s video is Kim Berg Hansen, who is an Oracle ACE Director and long time SQL and PL/SQL developer and advocate.

Cheers

Tim…

Video : Qualified Expressions Enhancements in Oracle Database 21c (part 1)

In today’s video we demonstrate some of the enhancements to qualified expressions in Oracle database 21c.

The video is based on this article.

If you are new to qualified expressions, and don’t already know about the FOR LOOP enhancements in 21c, these may be helpful.

The star of today’s video is Mike Hichwa. Everything you know and love about APEX started with this guy!

Cheers

Tim…

Video : FOR LOOP Iteration Enhancements in Oracle Database 21c

In today’s video we demonstrate the FOR LOOP iteration control enhancements in Oracle database 21c.

The video is based on this article.

If you’re not already got up to speed with qualified expressions in 18c, you might want to check this out also.

The star of today’s video is Alex Nuijten, of PL/SQL and in recent years APEX fame.

Cheers

Tim…

Video : JSON_OBJECT Function Enhancements in Oracle Database 19c

Today’s video is a demonstration of some of the enhancements to the JSON_OBJECT function in Oracle Database 19c.

If videos aren’t your thing, you can get the same information, and more, from this article.

The star of today’s video is Patrick Jolliffe. 🙂

Cheers

Tim…

Scheduler (DBMS_SCHEDULER) Enhancements in Oracle Database 12.2

Since its release in 10gR1, Oracle have consistently added neat functionality to the “new” scheduler with every database release. Yes, I still call it the new scheduler and you would be surprised how many people still insist on using DBMS_JOB rather than switching to DBMS_SCHEDULER.

Oracle Database 12c Release 2 (12.2) is no exception to this pattern, as once again we have some new stuff to play with.

In website housekeeping news, each scheduler article on the site was getting loaded down with links to other scheduler articles, so I’ve collected them all together into a section on one of my links pages, along with a feature list breakdown, so you don’t have to trawl through all the articles to get to the bit you need. You can see that section here.

For many people the simple example in the first article I wrote on the scheduler will be all they ever use, but it’s good to know what it’s capable of doing, especially when you see what some people get up to with CRON. 🙂

Cheers

Tim…

Update: For the person that just contacted me about the non-transactional nature of DBMS_SCHEDULER, I wrote about this here and finally raised an SR about it some time ago. That was converted to a bug, which was then altered to an enhancement request.

Bug 21247177 : DBMS_SCHEDULER JOB NOT DELETED WITH ROLLBACK, WHEREAS DBMS_JOB JOB DOES

This issue is still present in 12cR2, with a workaround of using DBMS_JOB. 🙂

Auditing Enhancements (Audit Policies and Unified Audit Trail) in Oracle Database 12c

security_image1_smallA little over a year ago I was at the BGOUG Spring Conference and I watched a session by Maja Veselica about auditing in Oracle Database 12c. At the time I noted that I really needed to take a look at this new functionality, as is was quite different to what had come before. Fast forward a year and I’ve finally got around to doing just that. 🙂

I’ve tried to keep the article quite light and fluffy. The Oracle documentation on this subject is really pretty good, so you should definitely invest some time reading it, but if you need a quick overview to get you started, my article might help. 🙂

My 12c learning experience continues…

Cheers

Tim…

Partitioning Enhancements in Oracle Database 12c Release 1

I was planning to cover this subject in a single article, but it got a bit bulky, so I split it down into 6 little articles.

I’ve also created a links page to bring them all together.

I guess you could call it a list of nice-to-haves, rather than something revolutionary, but I’m sure someone will come back to me saying one of them has changed their life! 🙂

Cheers

Tim…

Scheduler Enhancements in Oracle Database 12c

I’ve spent the last couple of days playing around with the scheduler enhancements in Oracle 12c.

I guess the big news is the new “script jobs”, which are pretty cool. This kind-of passed me by until Brynn Llewellyn mentioned them at UKOUG in his Multitenant presentation, at which point I made a note to check them out.

I’ve been having some trouble with the “BACKUP_SCRIPT” jobs up until a few minutes ago. My problem was I couldn’t see what the stdout/stderr text was, so I couldn’t determine why there were not working. The “$ORACLE_HOME/scheduler/log” directory was empty and there were no messages in the trace files or alert log. Then I stumbled upon the new columns added to the ALL_SCHEDULER_JOB_RUN_DETAILS view. The OUTPUT column, not surprisingly, gives you the output from the scripts. Once I could see the error message it took me a few seconds to fix the issue and Bingo! 🙂

The new job types are a nice addition, allowing you to run file-based scripts or incline scripts much more easily that before.

Cheers

Tim…

 

Data Pump Enhancements in Oracle Database 12c

Another one to file under “Not sexy but flippin’ awesome!”

If you are a DBA, you are going to spend a lot of time with Data Pump. All roads seem to lead back to it. 🙂 There are some more headline worthy features, like transportable database, but the two that jumped out at me were actually pretty small, but awesome.

  • “TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y” – Switches table and/or index imports to NOLOGGING for the lifespan of the import operation.
  • “LOGTIME=ALL” – Puts a timestamp in the output message so you can see how long individual operations took.

I wrote up an article about it here.

Cheers

Tim…