1833046 Members
2602 Online
110049 Solutions
New Discussion

Set server date forward

 
SOLVED
Go to solution
Tonya Underwood
Regular Advisor

Set server date forward

We have a question from the customer... pasted below:

"We have request from Russia to change system date to month date (Nov1st) during Oct 23 – 26th. We would like to find out if this is possible to change system date to forwarded date like Nov 1st for few days and get back to normal dates after month-end testing. We request to validate of this is possible with risk associated with it. "

Now... do you see any risk associated with this? Does the OS have problems if files exit at a future date? Or... once we reboot to set the time BACK, does the system modify these file dates as well?

Any Oracle DB problems with this that you can see?

Thanks!
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Set server date forward

Tonya,

There is no problem with setting the date forward. Setting it backward, however, can cause problems with your Orcle DB if it should crash and have to go through the (now mis-dated) Oracle re-do logs. It is generally not recommended that you set the date backward.


Pete

Pete
IT_2007
Honored Contributor

Re: Set server date forward

It depends on criticality of application. If you are running real-time application then YES. If it is a test server and want to do testing you can change time using set_parms command and move it back when you are done. Also, you can change date using date command.
Bill Hassell
Honored Contributor

Re: Set server date forward

There is a big question: WHY?

If the database is to be run as if it was a few days earlier, your database administrators will have to analyze all the date dependencies inside the database. For instance, if records were created three days ago, then the system date is changed back 3 days, will this create duplicate records? Or records that make no sense such as ordering a product 2 days after it was shipped?

Keep in mind that cron entries may run out of sequence or worse, cron jobs may run again and they are not supposed to do that.

The dates on files and directories are static, that is the timestamp is not changed unless it has been accessed or updated. So when you set the system date backwards, you WILL have files that are dated in the future. Again, this is not expected and while most HP-UX files can have any date and still function, application programs and scripts may depend on the actual date stamp.

So to answer the question "will there be problems", you'll need to start a very large project to analyze the possible effects on the system. If this is a production system, I would forbid such a change! For a test system, I would make an Ignite backup plus a data backup, then play with the system, then replace everything on the system with your Ignite and data backups. I would not trust the test system after jumping the date around like that. But then I'm paranoid about mysterious errors and problems...


Bill Hassell, sysadmin
Yogeeraj_1
Honored Contributor

Re: Set server date forward

hi tonya,

Allow me to also add that because of data dependencies, your scheduled oracle jobs will also be "misled". You will have to cater for this also.

I would suggest that you make a full backup of your database before you try anything that has a risk of data inconsistency.

If this is for testing purposes only, why not use another server or create a new database instance?


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Tonya Underwood
Regular Advisor

Re: Set server date forward

received info needed