Assertions in 26ai
I've started keeping configuration information for Oracle's Connection Manager in tables and then generating the cman.ora file needed for each listener. One of the quandaries I ran into was trying to enforce a rule where you could not define invited nodes for registration if you…
Posts by Sean D. Stuber
Advent of Code 2025- Day 11
Reactor Part 1 is a simple recursion with limited paths, so I used CONNECT BY where the device (source) of each row is contained within the output (target) of the prior row. So, in the sample data, the line "bbb: ddd eee" has source "bbb" and targets "ddd eee". But we…
Advent of Code 2025- Day 9
Movie Theater Part 1 was pretty straightforward. I extract the X and Y coordinates from each line and then using a self-join, I compare the areas of each possible rectangle. As with many other, similar, self-joins, I use the b.seq > a.seq filter to eliminate redundant,…
Advent of Code 2025- Day 8
Playground This one felt tricky at first with lots of words and seemingly numerous combinations of how to arrange the boxes, but the solutions turned out to be fairly straightforward. It wasn't necessary to recognize any particular trick to solving them; but I will…
Advent of Code 2025- Day 7
Laboratories This one was a little misleading, but that's probably more due to me assuming too much going in than any tricky wording. My first thought was this would be a recursion puzzle because of the tree nature and there hadn't been one yet; but I ended up not…
Advent of Code 2025- Day 6
Trash Compactor Like Day-5, I accepted a slight efficiency hit by reading the data twice for logical convenience. I read the numbers as one CTE and then read the corresponding operators as a second CTE. Since the data is irregularly spaced I used regular expression to…
Advent of Code – Day 5
Cafeteria I accepted a small inefficiency in part 1 by reading through all of the data twice in order to come up with two data sources. One for the ranges of fresh ids, and the other the list of ids to check. Counting the number of fresh ids was simply checking if each id…
Advent of Code 2025 – Day 4
Printing Department The first map puzzle of the year. Part 1 was a simple count; just loop through each position and see how many neighboring rolls it has, if it's less than 4, increment a counter. Return the counter when done. DECLARE v_map advent.t_map :=…
Advent of Code 2025 – Day 3
I was kind of disappointed in day 3 because it's the same puzzle twice. So one solution solves both parts 1 and 2, just changing the length from 2 to 12. I start by looping from the first digit (most significant) down to the least significant digit. So, for a 2-digit…
Advent of Code 2025 – Day 2
Day 2 was both easy and hard. Easy because it was easy to understand and hard because I knew there was a trick that would make an efficient solution for part 2 but I couldn't remember it. For part 1, I just divide the line of ranges into rows and then use regexp to pull…
26ai coming to on-prem in January!
Many of had given up hope, but an official announcement has been made and I am, like many others, excited to start installing it on our Linux systems. You can read the official announcement here... Only the Linux x86 platform is mentioned specifically in that…
Advent of Code 2025 – Day 1
I'm late getting started on the puzzles this year, I'll try to catch up and see how many I can do before I break for the holidays and family time. Secret EntrancePart 1 was fairly obviously about modulo math; but the MOD function in Oracle works oddly with negative…
Creating APEX report with rolling set of columns #JoelKallmanDay
The last several years I've participated in the Joel Kallman Day tributes with articles about SQL and PL/SQL. While there are no requirements for article topics, this year I wanted to contribute something within the framework Joel…
Duplicating an IG does not duplicate Automatic Row Processing DML
When you duplicate an Interactive Grid in APEX, if that region has a process to perform Automatic Row Processing DML; the new, duplicated region, will not have a DML process created for it. You can create a DML process for the new…
Using SQL to derive dice distributions in D&D
In a previous article (Bringing APEX and PL/SQL to D&D) I used a package with formulas of predetermined distributions for rolling multiple dice. In this article I will show how I came up with those formulas. In each case of rolling multiple 20-sided…
Bringing APEX and PL/SQL to D&D
While there are plenty of opportunities in the real world to use APEX; I felt the need to bring APEX into my gaming. The idea started with a conversation in mid-game about some tactical decisions in a game of Dungeons & Dragons. That is, how should we go about…
One more year.
Thank you @oracleace
Interesting bug with nondeterministic functions
I was working on a little simulation using random numbers and found I was getting odd results from my query. After spending a while dissecting it trying to find my error I found the problem was in the database itself. I was able to replicate the…
New Certification and FeedSpot Recognition
I successfully completed my Oracle AI Vector Search certification. I was also elated to hear FeedSpot has, again, selected my blog as one of the Top 100 Oracle Blogs on the web.
PL/SQL package for 32-bit xoshiro/xoroshiro pseudorandom number generators
Wrapping up my series on the, xoshiro/xoroshiro algorithms, in this article I present a package to return 32-bit values using the following variants. xoroshiro64* xoroshiro64** xoshiro128+ xoshiro128++ xoshiro128** The…
PL/SQL package for 64-bit xoshiro/xoroshiro pseudo-random number generators
Continuing in the path of previous two posts, the package below supports all of the xoshiro/xoroshiro algorithms returning 64-bit values. xoroshiro128+ xoroshiro128++ xoroshiro128** xoshiro256+ xoshiro256++ xoshiro256**…
Bit manipulation of large numbers in pl/sql
As I mentioned in my previous post I had to write my own functions to perform some bit operations on numeric values. While looking into some other pseudo-random number generators I ran into a few unexpected problems. The first problem is actually a…
Implementing xoshiro256** in PL/SQL
A long time ago I ported the Mersenne Twister pseudo-random number generator to pl/sql. That algorithm, and my port, are showing their age so I started looking at other generators. A newer approach is found in the xoshiro/xoroshiro family by David Blackman and…
Advent of Code 2024 – Day 4
Ceres Search Day 4 took a different turn, we're still parsing through text to find special values, but now we need to parse horizontally, vertically, and diagonally through a grid of text looking for "XMAS", which could appear forwards or backwards (SAMX.) For this I…
Advent of Code 2024 – Day 3
Mull It Over For Day 3, we're given sequences of fictitious code and we have to extract the multiplication commands from it; which will be of the form "mul(x,y)" where x and y are integers. So, using a regular expression makes finding the valid substrings easy. Once…
Advent of Code 2024 – Day 2
Red-Nosed Reports For Day 2, we have to find sequences of numbers that are safe to process. For part 1, "safe" means the numbers are in order, either increasing or decreasing, and the step between each is never more than 3. My approach to this was to pivot each row of…
Advent of Code 2024 – Day 1
Historian Hysteria In this puzzle we're given 2 lists of numbers that should be paired together such that the smallest value of each list form a pair, then the next smallest, and so on until we pair the largest values from each list together. To solve it, I read the…
I've completed "Linen Layout" - Day 19 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/19
I started off with the wrong approach but ended up going back to day 11 for similar solution. pl/sql block found 601 trillion combinations in under 2 seconds.
I just completed "Hoof It" - Day 10 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/10
I just completed "Resonant Collinearity" - Day 8 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/8