Category Archives: PL/SQL

Small test with FORALL SAVE EXCEPTIONS

This one I think I know the answer allready, but just wanted to test for sure.The question I asked myself is “When does FORALL SAVE EXCEPTIONS jump to the EXCEPTION clause?”. I’m pretty sure the answer is “After it completes the FORALL, and if – and only if – there are exceptions”.

Script: Synchronizing sequences to max(value)

Today I needed to synchronise several sequences with the max(value) existing in the primary key column. I did a quick google search to see if I found a script which could do this for me, but didn’t find anything (well didn’t spend to long either). So I wrote a script instead.

Strange behavior with EBR II

This is an update on the previous article “Strange behavior with EBR“.To try to understand a little more I have tested some more. The result suggest that what’s inherited in my latest edition is actually not what I first thought (read last article). Let’s have a look.

PLSQL: Nice little overview of the PL/SQL language

I just came over these slides and nice little overview of the PL/SQL language by Morten Braten. The slides covers many good tips to follow when coding PL/SQL. It’s not ment to be an introduction to the PL/SQL language, so many topics are just mention briefly and would need to be followed by further reading and/or […]

PLSQL: Anonymous block to reset out-of-sync (too low) sequence

I wrote a short little PLSQL to fix an out-of-sync sequence issue. For some unknown reasons, there was stored primary key values in the database which was way larger than the currval for the dedicated sequence.

PLSQL: Using Datapump API with filter on multiple tables

The developers in one of the teams I work within wanted to export the tables in a schema with limited number of rows. This could of course be done by running  expdp command line.  But this time we needed to find the last x numbers of primary keys in one of the central tables and […]

Nice blog about DBMS_METADATA from Alex Nuijten

This blog post has been laying in my TO_READ folder for a long time. Finally found some time to catch up, and I especially liked the little piece of PL/SQL for remapping the schema.

How PL/SQL can help improve your application design, and a lot more

As an Oracle resource taking part in development projects I’ve had the change to see how PL/SQL can actually increase the quality of both the application development and in application maintenance. In this article I’ll try to share this experience, and show how using PL/SQL will increase the quality of your application and your Oracle […]