How to change SYSDATE's value to a static date without changing system date

First change the NLS_DATE_FORMAT to a recognizable full format:

alter session set nls_date_format = 'dd.mon.yyyy hh24:mi:ss';

Then change the system variable fixed_date's value:

alter system set fixed_date='2004-03-02 22:23:24';

Now select SYSDATE from dual or any other table. You will only get the fixed date always irrespective of the system's physical date.

To reset the fixed_date parameter do the following:

alter system set fixed_date=NONE; 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章