X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at avenirtech.net
--_----------=_1170290107281330
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="ISO-8859-1"
MIME-Version: 1.0
X-Mailer: MessagingEngine.com Webmail Interface
Date: Thu, 1 Feb 2007 00:35:07 UT
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
--_----------=_1170290107281330
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="ISO-8859-1"
MIME-Version: 1.0
X-Mailer: MessagingEngine.com Webmail Interface
Date: Thu, 1 Feb 2007 00:35:07 UT
Oracle and DST changes - SQL + JVM Verification Script
I have=
started this with a different title. Easy to get lost among the bunch of p=
ostings under the earlier "Oracle and DST changes". Another=A0gem for Metalink N=
ote:402742.1. Thought i will share it with the list.=
$ sqlplus =
font>usr1@tns
SQL*Plus: Release 9.2.0.1.0 - P=
roduction on Wed Jan 31 16:23:37 2007
Copyright (c) 1982, 2002, Oracle Cor=
poration.=A0 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
=A0 2=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 ('20070311 00:00:00 US/EASTERN','YYYYMMDD HH24:MI:SS TZR')
=A0 =
3=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + to_dsinterval('0 08:00:00'),'HH2=
4'))
=A0 4=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 when 8 then 'The pat=
ch has not been applied'
=A0 5=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
when 9 then 'The patch has been applied correctly'
=A0 6=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 else 'Error' end "TZTEST (RUN FROM DB HOME=
)"
=A0 7=A0=A0=A0=A0=A0=A0=A0=A0 from dual;
TZTEST (RUN FROM DB HOME)------------------------------------
The patch has been applied co=
rrectly
1 row selected.
SQL>quit
Disconnected from Oracle Database 10g Enterpri=
se Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning=
, OLAP and Data Mining options
SQL>sqlplus usr2@tns2
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 31 1=
6:23:53 2007
Copyright (c) 1982, 2002, Oracle Corporation.=A0 All rights r=
eserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Re=
lease 10.2.0.1.0 - 64bit Production
With the Partitioning, OL=
AP and Data Mining options
COUNTS:NCSQC>select case to_number(to_char(t=
o_timestamp_tz
=A0 2=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ('20070311=
00:00:00 US/EASTERN','YYYYMMDD HH24:MI:SS TZR')
=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 + to_dsinterval('0 08:00:00'),'HH24'))
=A0 3=A0=A0=A0 4=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 when 8 then 'The patch has not been=
applied'
=A0 5=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 when 9 then 'Th=
e patch has been applied correctly'
=A0 6=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 else 'Error' end "TZTEST (RUN FROM DB HOME)"
=
=A0 7=A0=A0=A0=A0=A0=A0=A0=A0 from dual;
TZTEST (RUN FROM DB HOME)
---------=
---------------------------
The patch has not been applied
<=
p>1 row selected.=
font>