Category: Database

opatch “patch not applicable”

I saw the exception in the subject title of this post this earlier this week while applying the most recent PSU. Of course, the problem had absolutely nothing to do with whether or not the patch was applicable to the…

dbms_stats and no_invalidate

Since at least 10.2.0, Oracle has decided by default when to invalidate a dependent cursor when query optimizer statistics are gathered. You can determine what setting you have by the following: SQL> select dbms_stats.get_param(‘NO_INVALIDATE’) from dual; DBMS_STATS.GET_PARAM(‘NO_INVALIDATE’) ——————————————————————————– DBMS_STATS.AUTO_INVALIDATE SQL>…

Oracle database encryption

Under normal conditions using an out of the box setup, Oracle database datafiles are stored in a proprietary format. Data such as strings of alphabetic characters can be viewed just as they are in the database by the naked eye…

JDBC and Oracle Database Change Notification

Below is a simple example of a cutdown example of using DCN in Oracle with JDBC. I plan on presenting this to our developers as an alternative to the ATG InventoryCache manager module. import java.sql.*; import java.util.*; import oracle.jdbc.*; import…

SQL Server example of a C# stored procedure

Below is a simple example of using CLR. Source code for procedure… using System.IO; using Microsoft.SqlServer.Server; public partial class spaceProc { [Microsoft.SqlServer.Server.SqlProcedure] public static void freeSpace() { foreach (DriveInfo drive in DriveInfo.GetDrives()) { if (drive.IsReady) { SqlPipe p = SqlContext.Pipe;…

TIMESTAMP in GV$SQL_BIND_CAPTURE

This has been an issue since at least 10.2.0.3, and appears to still be the case in 11.2.0.3, almost five years later. A TIMESTAMP datatype in GV$SQL_BIND_CAPTURE is not printed. Fortunately, the following works. select anydata.accesstimestamp(value_anydata) from v$sql_bind_capture where sql_id=’&your_sql_id’;

tcpdump to see Oracle errors

Not all exceptions are created equally, and most you can ignore (the one below you can, in general). However, if you have to troubleshoot on JBOSS (or anywhere a Linux application connects to an Oracle database), what is below is…