TL;DR: Sometimes you have to "build" your own tools. And nowadays, an AI-assistant is a Surprisingly Good Help at that.
Image: I used an AI-assistant... got me thinking of Robot and Frank. Some 15yrs ago, but still a recommended movie...
Background: I needed to diagnose a "Legacy" system.
There is this customer who runs a relatively small but Critical system with a database on SE2. The system is 25+ years old, and still lovingly maintained and cherished by its users and a small team of Developers.
There are many (100s) of installations of this system around, all on Oracle SE2 on Windows. In most cases, it hummed away quietly in a corner of a dusty datacentre. In some cases, the data had grown to a size that made it more difficult to manage. And a few installations had "irregular proglems" with sluggishness or hiccups.
This being SE2, my first advice was to install Statspack everywhere. But for more ad-hoc troubleshooting, I also felt the need for the screen with OEM wait-statistics.
Been Living on sql-scripts for years.
Statspack-installation will get under way, through a process of ticket-submission and approval. But getting OEM would be complicated.
And this particular situation was calling for the "wait statistics graph" from OEM.
Ever since the disappearance of Lab128, I have mostly depended on a set of scripts and occasionally on OEM. I already was apt at interrogating ASH and AWR, and the gv$ views and I could manage reasonably well. But here I was on SE2, with a lot less tooling, and I had to revert to queries on SNAP$ tables (my scripts from the 00s, on v9.2, suddenly looked very interesting again).
I know how to get around with scripts, but it takes time, and it takes even more time with SE2 and PERFSTAT. Becasue most of my scripts were by now geared towards EE.
Some 15yrs ago I would have gotten a Lab128 free download, and, whizz-Bang, I would have a view of how a system was running and where the possible fixable items were. The low hanging fruit.
But this is 2026.
So let me try this...
In an inspired moment, I asked claude to get me a viewer, similar to the OEM-performance screen, Lab128.exe, ancient TOra, and quest-spotlight.
The results were surprisingly good.
Here is some of the dialogue:
I am not sure how much claude already knows of me, but its way of thinking on this idea was remarkably similar to my own.
When running v1, I had some remarks, mostly cosmetic. I made some comments. Claude itself had located more information on lab128 and was ready to produce a working version 2. In less than 30min after the Idea. That is Fast for any software-development.
However, v2 gave me a sql-syntax error, which claude fixed when I pointed it out.
The fix worked.
And a few more rounds of dialogue got us to v2.03, which had most of what I wanted, and more. I specifically wanted the ability to connect via either light- or full-client-stack, running muliple screens to different database, and a way to "keep" the data. The options as described in the README.md reflect some of that:
Doesnt that look surprisingly "complete" for 30min of work ?
Let's have a look at the result.
Looking at some of the information.
My main intention was to have the "wait stats, like OEM". And it delivered: The top of the screen looks like this:
Note that I explicitly put in some SQL activity (green=cpu, blue=io) and a deliberate lock-block-wait (red).
<small> Note to self: I have some script I use for quick-testing and quick-demos: spin.sql, spin_pio.sql, and demo_fklck.sql, possibly worth a future blog. </small>
When scrolling down, below the wait-graph comes a section on Statistics, Events and Top Activity:
I really liked the six smaller running graphs and the large choice in the picklist for each of them (lab128, anyone?). Any statistic you are interested in: It is There. In my case, one of those is the "logons/s", to detect excessive logon-activity from too-large connection pools...
And below those graphs and events, there are the top-SQL statements:
You might spot my artificial load, caused by "spin" and count-queries...
The "session" screen surprised me by already providing a Waiters-Blockers tree and click-through possibility on both SQL_ID and SID. Of course you need those features, but claude seemed to know that all by itself.
I'm a little careful to Shout Out Victory after only about 2 days of usage. But I can already say that this "assistant", claude, is rather impressive.
Improvements - Probably. But not yet.
Do I have more questions? More goodies to ask for ? Yes.
But let me explore a bit first. I feel like I have barely discovered all the possibilities of the current version. And for now I have enough to work with.
The first/next thing that comes to mind is this: Drawing ERDs.
For example when I inspect an SQL-stmnt for improvement (or elimination), I often draw an ERD for the tables under the query. And I can probably ask claude to help me create a quick-draw tool here, provided it has enough access to the dictionary of the database in question.
And I suspect some of my friends can come up with more, better and more interesting ideas. So if you are reading, feel free to contact me.
Dependent on the assistant?
A quick mention here about python. I agree with claude that python is a good choice here: it has an ready-to-go oracle-connector, and is Very Powerful in data-handling inside the app. But the resulting code is unreadable for a python-nood like me. Where the SQL generated by claude and copilot is often readable and instructive (you can learn from it!), the python code for oramon is, for me, not very accessible. And that also applies to a lot of the AI-generated python I see from colleagues: they can quickly wrap API-calls in a program, and it often works smoothly. Until it doesnt, and then only the assistant can help...
This Should be a point for future attention.
Conclusion: This is Powerful stuff. Interesting!
It is hard to express how Happy + Surprised I was with this "assistant-created tool".
This can make the (adhoc) creation of tooling much more easy. And with better tools, I can often solve problems faster.
This AI stuff is powerful, and I will be tweaking and playing with this in the near future. At the same time, I feel humbled. I could never have built this myself (which is why I often got lab128).
At the same time, I know how many ppl (myself included) can get confused by OEM, lab128 and similar tools that provide some quite-geeky information. You still need to interpret it, draw conclusions, and apply the resulting information correctly.
The speed with which claude produced a surprisingly workable program, That was what Impressed me most.
When I inspected the python-code, I had to conclude that it was, on first sight, too complicated for me to mess with. Hence, for further development and maintenance of this tool, I will have to depend on claude. That makes me slightly uneasy as I loose some control there.
It will be Interesting to see how this will develop.
-- -- -- -- -- End of this blogpost -- -- -- -- --
Link to version v203, so you can try:
Give it a spin, and tell me what you think.
-- -- -- -- -- End of this blogpost, for real (for now)-- -- -- -- --








