Philipp Salvisberg’s Blog

Database-centric development

2023-03-05

IslandSQL Episode 4: Expressions

Introduction In the last episode, we extended the IslandSQL grammar covering the complete lock table statement. However, the support for expressions was very limited. It was not possible to use a date literal or to_date function to determine a partition to be locked. Time to fix that. In this episode, we will have […]
2023-02-19

IslandSQL Episode 3: Lock Table

Introduction In the last episode, we extended the IslandSQL grammar to cover all DML statements as a single lexer token. Now it’s time to handle the complete grammar for one DML statement. The simplest one is lock table. A good reason to start with it and lay the foundation for the other DML […]
2023-02-07

IslandSQL Episode 2: All DML Statements

Introduction In the last episode, we build the initial version of IslandSQL. An Island grammar for SQL scripts covering select statements. In this blog post, we extend the grammar to handle the remaining DML statements. The full source code is available on GitHub and the binaries on Maven Central. Lexer Changes The […]
2023-02-04

IslandSQL Episode 1: Select Statement

Introduction An island grammar focuses only on a small part of a grammar. The island represents the small, interesting part and the sea the rest. In this blog post, I explain the components of an island grammar for SQL scripts named IslandSQL. In the first iteration, we focus on the select statement. Everything […]
2022-10-30

optimizer_secure_view_merging and plsql_declarations

The Original Problem A customer is currently upgrading some Oracle databases from 11.2 to 19c. One query was extremely slow on the new test system and my job was to find out why. The root cause was that the database parameter optimizer_secure_view_merging was set to a different value. In 19c true and […]
2022-10-11

Quoted Identifiers #JoelKallmanDay

Background and TL;DR Connor McDonald wrote a blog post named Cleaner DDL than DBMS_METADATA. Back then he asked me if it would be possible to let the formatter remove unnecessary double quotes from quoted identifiers. Yes, of course. Actually, the current version of the PL/SQL & SQL Formatter Settings does exactly that. […]
2022-09-25

DOAG2022 Highlights

Nobody knows what kind of restrictions we will experience later this year. That’s why the DOAG Conference + Exhibition 2022 took place in September instead of November. The organizers wanted an in-person event. While you can access some chosen content remotely an in-person event has a lot of advantages, like getting in […]
2022-07-31

Deleting Rows With Merge

The merge statement allows you to insert, update and delete rows in the target table in one go. This is great. However, the delete part does not work as expected. Is it a bug? No, it works exactly as documented. Nonetheless, I was not aware of this for years. Let’s take a […]
2022-07-31

Testing With utPLSQL – Made Easy With SQL Developer

Nowadays, everything is about automation. Software testing is no exception. After an introduction, we will create and run utPLSQL tests with Oracle SQL Developer for a fictitious user story. Our tests will cover a PL/SQL package, a virtual column, two database triggers and a view. The full code samples can be found […]
2022-07-17

plscope-utils for SQL Developer 1.0 – What’s New?

Introduction PL/Scope is an SDK for source code analysis. It is available since Oracle Database 11g Release 1 and has been significantly improved in 12c Release 2. plscope-utils for SQL Developer is a SQL Developer extension that simplifies the compilation with PL/Scope, visualizes PL/Scope information under a PL/Scope node in the Connections […]