Raised $6000 for the Center for Child Protection!

The annual Ride Drive Give event at Circuit of the Americas on Friday May 5th at CotA was a great success. I gave 12 different rides at $500 each to raise $6000 for the charity. Each year the event is a big success.

https://centerforchildprotection.org/events/2023-ride-drive-give/

I was a “Hot Lap Driver” giving people rides in my Revolution.

I even made the Ride Drive Give website as the example for “Racecar Hot Laps”.

The day started with some time blocked out on the schedule for me to rest, but I let the organizers fill up the whole day with rides so I could generate as much as possible for the event.

Of the 12 different riders, only one rider got a bit queasy, so I slowed down a bit for him. For everyone else, it was a ‘pretty brisk’ lap.

It was quite a bit of fun for me too, although I was quite exhausted by the end of the day. I also had both the Boxster race car and the Revolution in my trailer (with, of course, the Revolution in front of the Boxster in the trailer), so I had to load two cars at the end of the day. Danny (one of the other instructors) gave me a hand loading the cars which took much less time than if I did it all myself.

I feel very lucky to be able to give back to the community in this way.

See you at the track!

Advertisement

See you at Kscope 23!

Today I got two emails from the KScope team:

Dear Richard,

Congratulations! You have been accepted to speak at ODTUG Kscope23, June 25–29, 2023, in Aurora, Colorado!

The following abstract has been accepted for a 60-minute session:

  APEX & ORDS for DBAs and System Admins

Followed by:

The following abstract has been accepted for a 30-minute session.

  You know you might have a bad data model when…

That was followed up by another email from Cary Millsap of Method-R. Cary submitted a session with me as the co-presenter.

The following abstract has been accepted for a 60-minute session.

  Tracing APEX: the Ultimate in Performance Observability

I have the first presentation already done since I just delivered it at the RMOUG conference a few weeks ago. Oracle, of course, released new versions of APEX and ORDS after I thought I was done, including an APEX patch the Monday before I left. I had to scramble to update my content to reflect the new versions right before I left.

Between now and June, Oracle is going to release new versions of APEX and ORDS so I’ll have to update my content for the first presentation.

The 2nd presentation is currently on my whiteboard (It’s really glass… so is it a glass board?) in my office, so I’ll put that together pretty soon.

Cary recently wrote a book that has some good details on his topic for the conference. I’ve been able to review the book and make it a bit better. I’m really looking forward to working with Cary to come up with some compelling content for the conference.

If you are going, you can use code VINS23 to get $100 off your registration. Hopefully, we’ll see you all there!


Rich Soule Racing’s Revolution at CotA this Weekend

Rich Soule Racing will be at CotA this weekend. Stop by and get a ride!

In 2021 my Radical SR3 had a failure on track. A few dollar worm gear hose clamp broke and took out the engine. I debated long and hard about what to replace the car with and through a lot of luck I managed to find a 2020 Revolution A-One. It’s pretty awesome. It’s got around 400 or so horsepower from a naturally aspirated Ford V6 and weighs in at around 1750 lbs.

If you happen to be at Circuit of the Americas this weekend stop by.


Why haven’t you moved to AL32UTF8 yet?

Hey DBAs! Run this query on your database:

select value as character_set
  from nls_database_parameters
 where parameter = 'NLS_CHARACTERSET';

CHARACTER_SET
________________
AL32UTF8

If you see anything other than AL32UTF8 as the answer to the above query, then you should be building a plan to get from whatever character set your database is currently running to Unicode (AL32UTF8). While this can seem daunting, Oracle actually provides a great tool to assist with the process called the Oracle Database Migration Assistant for Unicode (DMU).

DMU will show you if your database will have any issues when you migrate from your legacy character set to Unicode. As you can see from the splash screen above “Oracle recommends using Unicode as the database character set for maximum compatibility and extensibility“. Oracle strongly suggests that all new databases should be created using AL32UTF8 and that legacy databases created in the past should be migrated to AL32UTF8.

A great time to think about a character set upgrade is during a database upgrade. If you are planning on a 19c upgrade (and we should really be there already today, but, of course, “should” and “are” are two different words for a reason) or potentially even 23c when Oracle releases it soon, and your current character set isn’t AL32UTF8 then now is the time to plan the migration!

Here’s a real-life DMU story:

A customer of mine had a database that had been created on Solaris in the late ’80s and they had used whatever the default character set was at the time, which is really what everyone was doing back then. In 2013 we decided to upgrade the database to 12.1 and change the character set during the upgrade. The fear was that this was going to be a big problem and we came up with all kinds of plans on how to fix the various issues (data cleansing, adjusting column widths on tables, etc.) However, after talking about all the potential issues, we actually ran the DMU and it showed us that the problem was much smaller than we thought. We only had about 30 rows of data that could have an issue during the migration!

After checking with the business, we just went into the 30 rows and cleaned up the data. A few “do not”s got changed to “don’t”, saving a single character which was all we needed.

Today, I talk to folks about using DMU to check their databases before they decide that “the problem is too big”. DMU will sometimes show that the problem either doesn’t exist, or it’s very small.

As an aside:

Today I did an install of DMU on a server using the download of DMU from Oracle Support. After extracting the zip file on my Oracle Linux box into /opt/oracle/dmu, I noticed that the dmu.sh script was read-only. A simple chmod u+x on the dmu.sh script enabled me to start it up without any issues.

[oracle@databaseserver DB:dbacon /opt/oracle/dmu]
$ ./dmu.sh
-bash: ./dmu.sh: Permission denied

[oracle@databaseserver DB:dbacon /opt/oracle/dmu]
$ chmod u+x dmu.sh

[oracle@databaseserver DB:dbacon /opt/oracle/dmu]
$ ./dmu.sh

   Database Migration Assistant for Unicode
 Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.

Directly Upload Files to Oracle Support

After watching a client move a file from their Linux database server down to their Windows box and then use their browser to upload the file to Oracle Support, I remembered that there was a more efficient way to do this. I was confident that I had this post in my blog already, but lo and behold, I hadn’t.

So today I fix that:

Let’s say you have an SR number 3-111222333444 and you need to upload a big zip file name zipfile.zip and you use email@blah.com to log into Oracle Support. The below command will get the file directly from your Linux box to Oracle Support.


curl -T "zipfile.zip" -u "email@blah.com" https://transport.oracle.com/upload/issue/3-111222333444/

Happy Linuxing!

Photo by Wesley Tingey on Unsplash


My Oracle Database Server PS1 Environment Variable

Today I was doing some tricky remote troubleshooting of an ORDS deployment. It turned out that it was the networking team doing fun stuff with the removal of cookies from only one of the multiple load-balanced devices between the users and the ORDS server (99% sure of this, we’ll see later if I was right). Since this stuff can be almost impossible to figure out without sniffing packets and/or visibility into the whole network configuration, a good trick to remember is to just deploy ORDS standalone on the desktop of the user attempting to troubleshoot things. If it works on their desktop, then it’s almost certainly the networking team doing something funny between the users and the application servers.

During the whole troubleshooting session, where the DBA was typing in all the commands as I dictated them (so much fun!), the DBA was constantly typing pwd. This post is for that DBA.

I’ve added the following line to my .bash_profile on all my Oracle database servers:

export PS1='\n[\u@\h DB:$( echo $ORACLE_SID ) \t \w]\n\$ '

PS1 is the environment variable that controls what your prompt looks like.

Mine has the following:

\n = a new line. This means that all of my commands have some nice whitespace (although I use green on black, so is that blackspace?) between them.

[ = the starting bracket for my prompt.

\u@\h = username@hostname

DB:$( echo $ORACLE_SID ) = Each time a new prompt is generated, find the value of the $ORACLE_HOME environment variable and display it with a DB: in front of it. It took me a bit to figure out how to get this to evaluate every time a new prompt was drawn. For my middleware servers, I leave this portion off. I suppose if your middleware server talks to only a single database, you could just hardcode it into the prompt.

\t = the current time

\w = the current working directory. No more typing pwd every other command!

] = the ending bracket for my prompt.

\n = another new line. This allows your actual command prompt to always start on the left side of the screen instead of constantly moving across the screen as you navigate down directory paths.

\$ = print the normal prompt. Notice that there is a space before the closing ‘ so that commands are not jammed up against the prompt.

Hopefully, an Oracle DBA or two out there finds this useful!

Happy DBAing!

#joelkallmanday


Motorsport Safety Academy HPDE Instructor Training Level 1 Course

While I’ve been instructing since 2006, anywhere from 2 to 6 days per month, almost every single month (I’ve missed a month here or there with work or family obligations), one organization that I instruct with wanted to have all their instructors take the HPDE Instructor Training Level 1 Course.

The course is composed of 17 lessons of various lengths and types (some are videos, some are slides), 13 quizzes, and a final assessment. Note that the final assessment isn’t just a repeat of the questions from the quizzes (like many lesser online exams), but instead, it’s almost all brand new questions (some of which are generally related to the quiz questions, but nothing that appeared to be a direct copy). This week I made my way through the various lessons and quizzes and then passed the final exam today.

HPDE Instructor Level 1 Course Certificate of Completion

Overall, the content is very good. Even though I’ve been instructing since 2006, there were a few things the content brought to my attention that I’ll probably do differently going forward. For example, I used to tell students at Circuit of the Americas to “Don’t brake” on the way into Turn 16, and going forward I’m going to refrain from saying “No braking/Don’t break” and instead use something else… maybe “Steady throttle” or “Slight lift” depending on how fast they are going into the turn.

I’d agree with the creators that the content would prepare someone thinking about instructing to be more prepared before they took whatever school/training program their local HPDE organization had for instructors. It certainly wouldn’t qualify anyone who had not done any instructing before to become an instructor.

One area that I really felt could have been better was the quizzes and the exam. Some of the quiz questions were along the lines of “What is your favorite color?” and the answers would be Red, Green, Yellow, and Blue. And then, amazingly, you could get the answer wrong because they were not really asking which was your favorite color, but instead, “What color do we think should be your favorite color?”. There was also a spelling mistake in the correct answer to a quiz question (“stop” was spelled “stp”). Also, I felt that the final assessment had questions that were not in any way discussed in the material. That’s fine (and I did pass on the first attempt), but it would have been nice if at the beginning of the course (or at least at the start of the final assessment) it was made clear that you’d be answering questions that you should know from your own track experience rather than from the content of the course. And some of the questions and answers were just a bit too subjective for my taste.

Overall, I’d give the course an A-. With a bit of editing on the exam questions and final exam, it could easily be brought up to an A.

Happy HPDEing!


Windows WSL can be Oracle Linux!

The other day I struggled a bit as I was trying to get something to work on the out-of-the-box Windows Subsystem for Linux that ships as Ubuntu. Linux is Linux, but Ubuntu is just a bit different from Oracle Linux (basically RHEL with some better stuff) that I use daily.

Haniel (@haniel211 on Twitter, give him a follow) was giving me a hand and he mentioned that the MS store that has an Oracle Linux WSL application!

Since I didn’t have anything really configured in my current WSL, I just removed the Unbuntu Linux and installed Oracle Linux. It’s pretty awesome to have my WSL match the distribution that I use every day.

Happy Linuxing!


Pretty Dates in Oracle

The default display for the database for date columns is often DD-MON-RR. So Januray 1st, 2021 would display as 01-JAN-21. This is horrible. The time portion of the date is missing from the display (an Oracle date is always composed of at least the century, year, month, day, hour, minute, and second) and the RR format will lead to issues in 2050 which isn’t that far away.

To get your Oracle tools (like sqlplus and rman for example) on your Unix/Linux server to show dates in a better format, the following will help.

export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"


Which Oracle tablespaces have the most write activity going on?

One of my customers is deploying a new driver for their VMWare Cluster SAN next week. The last time they did this (about a year ago), there were random disk corruptions on the database servers. Needless to say, this was bad.

This time the VMWare team is going to be on the lookout for corruption, but the database team wanted to also do an extra check and run an rman validate command on the “datafiles with the most write activity”.

The following query will give you a list of tablespaces with write activity over the last hour with the highest write activity.

  select tablespace_name
       , sum(physical_block_writes) as total_last_hour_block_writes
    from v$filemetric_history
    join dba_data_files using (file_id)
group by tablespace_name
  having sum(physical_block_writes) > 0
order by sum(physical_block_writes) desc;

Hopefully, this helps someone in the future.

Photo courtesy of Gratisography