If you do this on a shared database, it will affect everyone, so be careful.
CJUSTICE@TESTING>SELECT TO_CHAR( SYSDATE, 'MM/DD/YYYY HH24:MI:SS' ) dHappy testing.
FROM DUAL;
D
-------------------
04/02/2010 15:50:35
1 row selected.
CJUSTICE@TESTING>ALTER SYSTEM SET FIXED_DATE = '02-MAR-10';
System altered.
CJUSTICE@TESTING>SELECT TO_CHAR( SYSDATE, 'MM/DD/YYYY HH24:MI:SS' ) d
FROM DUAL;
D
-------------------
03/02/2010 00:00:00
1 row selected.
CJUSTICE@TESTING>ALTER SYSTEM SET FIXED_DATE = 'NONE';
System altered.
Elapsed: 00:00:00.09
CJUSTICE@TESTING>SELECT TO_CHAR( SYSDATE, 'MM/DD/YYYY HH24:MI:SS' ) d
FROM DUAL;
D
-------------------
04/02/2010 16:03:01
1 row selected.
So cool!
ReplyDeleteI've found that not that many people know about it, so it seemed appropriate to share. I've had arguments with DBAs about it who swore up and down that it wasn't possible.
ReplyDeleteIts a very very very old parameter, that goes back at least until Oracle 7.0...
ReplyDeleteWay before my time Marco...way before. I think I started with 8i back in 2002. I came late to the game. :)
ReplyDeleteI totally missed this since forever, thanks.
ReplyDelete