Monthly Archives: June 2024

Using AI to confirm a wrongly cabled Exadata switch – or how to fix script for Python3.

One of the preparation steps when installing an Exadata X10M is to verify that the cabling of the RoCE switches is correctly done. The next step is to upgrade the Cisco switches with the latest firmware. During my intervention for Tradeware at the customer, the first didn’t work as the provided script is not compatible with Python3 and the latter complained about wrong cabling.

Here I show how studied the wrong cabling of the X10M switches and how I use (ChatGPT and other AI tools probably also work) to quickly fix the Python script provided by Oracle.


Oracle postpones release of 23ai on-premises to 2H CY2024

Oracle just updated the Release Schedule of Current Database Releases (Doc ID 742060.1) and changed the release date of database version 23ai on-premises to next half-year. Lets see how many months and bug fixing that means. 🙂

Update on 20.06.2024 – “Added new release dates for Oracle Autonomous Database – Dedicated Exadata Infrastructure, Autonomous Database on Exadata Cloud@Customer, ODA, Exadata and Linux-x86 64”

The DBT-16051 when creating a standby database using DBCA is still around. 7 years after.

Sometimes I ask myself why some bugs are not solved. When looking for DBT-16071 we find a blog post from Frank Pachot from more than 7 years ago. He shows that with Oracle 12.2 you can “create” standby databases directly with dbca. But that the script does only a duplicate for standby and nothing more.

I decided to try with 19.22 to see how the situation evolved. It didn’t.

The first thing I got was a DBT-16051 error:

$ dbca -createDuplicateDB -gdbName anjodb01 -primaryDBConnectionString "anjovm01.local.wsl/anjodb01_s1.local.wsl" -sid anjodb01 -createAsStandby -dbUniqueName anjodb01_s2 -silent
Enter SYS user password:
[FATAL] [DBT-16051] Archive log mode is not enabled in the primary database.
   ACTION: Primary database should be configured with archive log mode for creating a duplicate or standby database.

Quick check shows the primary is correctly in archivelog mode. The problem is the Easy Connect string. The string I gave “anjovm1.local.wsl/anjodb1_s1.local.wsl” works well on sqlplus, but not with dbca. There you need to specify the port, also when you are just using the default one:

$ dbca -createDuplicateDB -gdbName anjodb01 -primaryDBConnectionString "anjovm01.local.wsl:1521/anjodb01_s1.local.wsl" -sid anjodb01 -createAsStandby -dbUniqueName anjodb01_s2 -silent
Enter SYS user password:
[WARNING] [DBT-10331] Specified SID Name (anjodb01) may have a potential conflict with an already existing database on the system.
   CAUSE: The specified SID Name without the trailing numeric characters ({2}) may have a potential conflict with an already existing database on the system.
   ACTION: Specify a different SID Name that does not conflict with existing databases on the system.
Prepare for db operation
22% complete
Listener config step
44% complete
Auxiliary instance creation
67% complete
RMAN duplicate
89% complete
Post duplicate database operations
100% complete

The warning DBT-10331 appears because I’ve a “anjodb02” in the same VM, and this could create a problem, as they share the prefix “anjodb”. I don’t expect on a single instance environment that to be a problem though.

And it starts the new standby in ‘read only’ mode, which requires adequate licenses.

SQL> select name, db_unique_name, database_role, open_mode, dataguard_broker from v$database;

--------- ------------------------------ ---------------- -------------------- --------

For the moment, I’ll stay with my set of scripts which do the operations in the right way.

Change language and prompt in SQLcl for VS Code

Windows and language settings is a common problem for users outside English speaking countries. The windows language on my laptop is English, but time to time I use another laptop in Portugal with the same Microsoft account as login. This laptop is configured in Portuguese. My work laptop’s keyboard is Swiss, locale also set for Switzerland. Windows just gets confused and shows some applications in English, others in German, others in Portuguese.

Today I was testing SQLcl inside VS Code. I tried the help function and get answers in German, plus with the öäü signs wrong.

So I needed to change it to English. Based on SQLcl documentation it reads a file startup.sql once when it starts. And on VS Code, to know where it is currently running, you just have to run the ‘pwd’ command:

SQL> pwd

Then, on this path, you can create a startup.sql file and change the prompt, and language. My startup.sql starts by changing the display language, then the SQLcl layout and the prompt:

set feedb off termout off
-- changes the display language
alter session set nls_language=american;

-- Changes SQLcl to have word highlight and statusbar
set highlighting on
set highlighting keyword foreground green
set highlighting identifier background blue
set highlighting string foreground yellow
set highlighting number foreground cyan
set highlighting comment foreground white
set statusbar on
set statusbar add editmode
set statusbar add txn
set statusbar add timing

-- Changes prompt to show the instance and pdb name
DEFINE prompt="SQL"
COLUMN col_prompt NEW_VALUE prompt
SELECT UPPER(USER || '@' || SYS_CONTEXT('userenv', 'instance_name')) ||'.'|| SYS_CONTEXT('userenv', 'con_name') col_prompt FROM dual;
set sqlprompt "&prompt> " ;
set termout on feed on

At the ends it looks like this:

How to use Zabbix to monitor Oracle DB – a quick test run

Currently I’m testing different solutions for monitoring (mostly) Oracle databases. One solution in the shortlist is Zabbix.

Zabbix is open-source and currently has a quite active community helping out.

On Zabbix website there is a nice quick download and setup instructions:

I’ll use a Oracle Linux 9 VM under Windows WSL2 for installing Zabbix. For the exercise, I’ll configure it with PostgreSQL. The database installation step is missing. So, here are all the steps I’ve done.