HowTo validate a date/timestamp column (Doc ID 976591.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 11.2.0.4 [Release 9.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 26-03-2012***


Goal

Goal of this document is to validate all date/timestamp values of a specific column in specific table
(check will be done on partial content of timestamp: up till the second part of the timestamp value (a timestamp value will always contain a value up till the second part but can be longer))

Problem in question was hitting an ora-1877 while no information was shown which row/column was the cause of the error. Using an event on the error(errorstack on 1877) did not write a useful tracefile from which the row could be identified (only trace header information).

Further checking made clear that a timestamp column was the cause of the ora-1877, but it was impossible to find the exact rowid (next rowid after last rowid as shown at failure was not the row causing the ora-1877: SQL> select rowid,<column_name> from <table_name>).

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms