Altering sysdate in Oracle

posted Dec 7, 2010, 7:57 AM by Sachchida Ojha   [ updated Dec 7, 2010, 8:19 AM ]
SQL>  alter system set fixed_date='2010-12-03';

System altered.

SQL>  select sysdate from dual;

SYSDATE
---------
03-DEC-10


BUT, setting this parameter does not effect SYSTIMESTAMP. It continues to show current timestamp.

SQL> ALTER SYSTEM SET FIXED_DATE='2010-12-03-00:00:00';

System altered.

SQL> select sysdate from dual;

SYSDATE
---------
03-DEC-10

SQL> select systimestamp from dual;

SYSTIMESTAMP
---------------------------------------------------------------------------
07-DEC-10 09.01.07.669041 AM +05:30

revert it back to system date

SQL> ALTER SYSTEM SET FIXED_DATE=NONE;

System altered.

SQL>

Comments