Scripting: Is the DB DataGuarded?

Whilst developing some administrative functions within PL/SQL I needed to know whether the database that the code was being run in was part of an Oracle DataGuard setup, which you would think would be a trivial exercise. My first thought was that we could determine this via v$database. If the DATABASE_ROLE column in v$database contains STANDBY then we know... Continue Reading →

Testing a string for a numeric value

Sometimes it is necessary to determine if a value in a varchar column actually contains a number. The code below gives examples of how to do this. All versions of Oracle The code below created a stored procedure that can be used on all versions of Oracle to test whether a string contains a numeric... Continue Reading →

Blog at

Up ↑