Oracle and DST changes - SQL + JVM Verification Script

  • From: "GovindanK" <gkatteri@xxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 31 Jan 2007 16:35:07 -0800

I have started this with a different title. Easy to get lost among the bunch of 
postings under the earlier "Oracle and DST changes". Another gem for Metalink 
Note:402742.1. Thought i will share it with the list.

$ sqlplus [1]usr1@tns

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 31 16:23:37 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>select case to_number(to_char(to_timestamp_tz
  2              ('20070311 00:00:00 US/EASTERN','YYYYMMDD HH24:MI:SS TZR')
  3              + to_dsinterval('0 08:00:00'),'HH24'))
  4              when 8 then 'The patch has not been applied'
  5              when 9 then 'The patch has been applied correctly'
  6              else 'Error' end "TZTEST (RUN FROM DB HOME)"
  7         from dual;

TZTEST (RUN FROM DB HOME)
------------------------------------
The patch has been applied correctly

1 row selected.

SQL>quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 
64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>sqlplus [2]usr2@tns2

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 31 16:23:53 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

COUNTS:NCSQC>select case to_number(to_char(to_timestamp_tz
  2              ('20070311 00:00:00 US/EASTERN','YYYYMMDD HH24:MI:SS TZR')
            + to_dsinterval('0 08:00:00'),'HH24'))
  3    4              when 8 then 'The patch has not been applied'
  5              when 9 then 'The patch has been applied correctly'
  6              else 'Error' end "TZTEST (RUN FROM DB HOME)"
  7         from dual;

TZTEST (RUN FROM DB HOME)
------------------------------------
The patch has not been applied

1 row selected.

SQL>

For JVM testing too the above Note:402742.1 has the code.

HTH

GovindanK

References

1. mailto:usr1@tns
2. mailto:usr2@tns2

Other related posts:

  • » Oracle and DST changes - SQL + JVM Verification Script