Recent Posts

Wallet

Scripting the Oracle Wallet truststore

TweetShareSharePin0 SharesAs you may recall, I do not like processes that requires a GUI for things that should be possible to do repeatedly and be part of automatic deployment of a full environment. Thus I want the whole wallet creation to be done in scripts. No, the root certs don’t change often and no it would bot be a bad thing to just commit a complete wallet to git. But I still like to quickly with scripts recreate a wallet. […]

DBA, Wallet

Update on creating wallet

TweetShareSharePin0 SharesI held a live stream for SWEOUG that presented what my last two blogs covered. It was my first ever and while it was a bit uncomfortable to set up to not see your audience it worked well. In fact it was really enjoyable and I look forward to doing more. In the stream Ilmar Kerm made a few comments about what I said. I was not able to fully grasp it during the stream, but I talked to Ilmar after […]

DBA

Wallet setup for https

TweetShareSharePin0 SharesIn the last blog post I wrote about how to access an HTTP-resource and the ACL needed for it. That works great for HTTP, but as the world is turning to HTTPS it is not enough in most cases. In this post I will look at how to set up the trust store in a database to allow access to an HTTPS-based access. I will use the same simple select grabbing the html for a webpage to show how […]

PL/SQL, SQL

Accessing a website from the database

TweetShareSharePin0 SharesOne of the things people want more and more often is to somehow read from a web-resource using a database. It could be to just get the HTML off of a website or access REST via PL/SQL, or grab a JSON-file residing on a public website. No matter which it is we need to declare that it is a website we want the database user to reach. To have a simple example I’ll just show how to read the HTML off […]

Uncategorized

Sysdate for start_date i scheduler is bad

TweetShareSharePin0 SharesI was recently asked to investigate why a job that was to update a few thousand rows took an hour where it had been proven to do the work in just seconds in other environments. Was this new environment set up with much more data? No, actually much less as the tests before had been with production like data though not production copy. After getting data for three executions it showed that the time was ALWAYS just a fraction over […]

SQL

Finding the query you never saved

TweetShareSharePin0 SharesYes, I admit it. I am sometimes not at all as structured as I would like to think. Recently I had worked on a query that had taken me many hours to get just right. When I was done I celebrated with a coffee break (I’m a Swede after all) and after it I started working on other pressing issues. A couple of weeks later that query is desperately needed as the same test needs be be done again and […]

Bug, SQL

The bug that wasn’t

TweetShareSharePin0 SharesThis is a short update to the presumed bug I wrote about recently in this post. After a few back and forth with Oracle support it turns out this is a well-known (to them) effect of using dbms_random in SQL. The base for this seems to be a bug report in 10g that was declared “not a bug”. You can read the bug report on MOS. It is also covered in this doc that references the same bug. It turns out that a […]

Visual Code

Moving or starting with Visual Code

TweetShareSharePin0 SharesIf you live your life in an editor writing code or configuration files, you need Visual Code in your life. Yes it is a Microsoft product and possibly surprising to use in environments that are not heavy on Microsoft or even using Windows operating system. But the truth is that it may well be the best thing to ever come out of Microsoft. If you read that as a diss of Microsoft, you do not appreciate how much I […]

Bug, SQL

Bug with prefactoring and nondeterministic SQL

TweetShareSharePin0 SharesSometimes the results of a SQL is not at all what you expected. Most of the time it is a simple error you’ve made. Very rarely is it an issue that after hours of looking at it still looks like SQL does something wrong, But it still happens. This post is about one such situation that occurred last week. If you read the last blog post, you’ll recognize some of this. It turned up when I looked at transforming […]

PL/SQL, SQL

LUHNs algoritm – Three ways with SQL and PL/SQL

TweetShareSharePin0 SharesHave you encountered LUHNs algorithm? I can almost guarantee it even if you’ve never heard the name before. It is part of all of our lives every single day. It is used to check that various numbers are correctly entered. From ID numbers for persons in Sweden, Greace, and Israel to credit card numbers and IMEI numbers and misc other things. It is a very simple checksum function not intended to be cryptographically secure hash function. Due to the […]