Posts tagged as:

oracle

Finding constraints in Oracle

May 13, 2009

It can be quite frustrating when you get exceptions like those below - constraint violations where the constraint has a system generated name which means nothing to you:

2009-03-23 23:30:43 ERROR [AbstractFlushingEventListener.performExecutions] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (SAMPLE.SYS_C00123456) violated

The easiest way to find [...]

Read the full article →

Finding table differences in Oracle

October 10, 2008

Often there is a need to compare two databases and see the differences. I come across this a lot when releasing a new build into an existing environment - the new code runs on the development database, but the test environment needs a schema upgrade before the code will run.
There are tools that will compare [...]

Read the full article →

Displaying dates and times with Oracle

September 4, 2008

I use SQLDeveloper when interacting with Oracle. When viewing tables with date columns it can be frustrating that the default display does not show time (just day, month and year).
To change this behaviour, you can set the date format for your current session:

alter session set NLS_DATE_FORMAT='DD-Mon-YYYY HH24:MI:SS'

Now, when you view tables or resultsets, you’ll have [...]

Read the full article →

Oracle types

August 1, 2008

It frequently surprises me when seemingly simple things are missing from mature products. For example, Oracle doesn’t have a boolean type. Strange but apparently true.
Never mind, this article describes how to work around this.

Read the full article →

Oracle version information

July 31, 2008

When making support requests it is always helpful to include version information about the product in question. Rather than just stating ‘version X’ I like to get the software to display the version information and just copy and paste it - this way there can be no confusion, and there may even be extra useful [...]

Read the full article →