Generate Entity Relationship Diagrams from a SQL Script.

Sometimes, just occasionally, you find yourself as a DBA on a site where, for some strange and unknown reason, you don’t have an Entity Relationship Diagram (ERD) for the database that you are working on. You could use a tool such as Toad, or SQL*Plus (or even, SQL Developer – if you must) to generate a list of referential integrity constraints. There has to be a better way. Continue reading Generate Entity Relationship Diagrams from a SQL Script.

Snorkelling in the Oracle Listener Logs.

(Snorkelling is not quite as in depth as a “deep dive”!)

Attempting to parse a listener.log will probably bend your brain, but I needed to do it recently to determine which unique servers and/or desktops and/or application servers were still connecting to a database prior to that database going down for maintenance. This was an exercise in confirming that the documentation we have, is correct.

Continue reading Snorkelling in the Oracle Listener Logs.

Dropping Temporary Tables (With Bonus, Broken Check Constraints!)

I found a broken check constraint, one that simply wouldn’t work, on a database. It was created as:

... CHECK(COLUMN_NAME IN ('Y','N',NULL)) ;

Try it yourself, it doesn’t work! Anyway, I needed to find if there were any other check constraints broken in this manner, so I did the following:

Continue reading Dropping Temporary Tables (With Bonus, Broken Check Constraints!)

How to Start an Oracle Database When You Are Not in the DBA Group

This applies to Linux, Unix as well as Windows, but affected me on a Windows 2012 Server running Oracle 11.2.0.4 Enterprise Edition.

My user on the server was an administration user, but not in the ora_dba group. This is required to connect / as sysdba within SQL*Plus. The SYS password had been changed recently but whoever did it, did not update the password vault. The users were urgently requiring their database be started, I was the only DBA in the office, the SYS password was unknown, and my user didn’t belong directly to the ora_dba group. What to do? Continue reading How to Start an Oracle Database When You Are Not in the DBA Group

RMAN Connection Troubles, RMAN-03010 & RMAN-10038

For no reason, after many weeks of use, RMAN suddenly cannot connect:

rman target sys/******@dbadb01 catalog ...

...
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03010: fatal error during library cache pre-loading
RMAN-10038: database session for channel default terminated unexpectedly

Continue reading RMAN Connection Troubles, RMAN-03010 & RMAN-10038