Operating System - HP-UX
1834091 Members
2226 Online
110063 Solutions
New Discussion

How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

 
SOLVED
Go to solution
Alzhy
Honored Contributor

How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

HP-UX11i Oracle Instances, apps, etc..

In a previous experience, I would do a 24+ hours shutdown of the server after which I start the server single user, correct the date and we're golden.

Everyone agrees but the method in how to correct the date is being debated, should we use "set_parms" or just use "date"?

What I am proposing is:

disable oracle/apps startup
shutdown server for 24+ hours
startup
use "set_parms date"
enable oracle/apps startup
reboot

What you guys think? Is there any difference between "set_parms date" and just using the "date" ?
Hakuna Matata.
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

I think that I would simply use date but first
/sbin/init.d/xntpd stop
date
/sbin/init.d/xntpd start

This will allow NTP to be "close enough" to start, if applicable.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

No discernable difference, Nelson - just use date.


Pete

Pete
Marvin Strong
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Third vote for just using date
RAC_1
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

I do think that it as easy as it seems.

First as you said time sensitive applications need to stopped. Date adjusted (date command or ntpdate or /etc/set_params date) and then applications started.

But keeping server disabled is good in you case. That is becasue some transactions already have timestamp of tomorrow and if you start immediately, some transactions will have timestamp of today. If that is fine with oracle you can start immedialtely after doing date adjustment. If not you will have to disable the server for 24 hrs.

Anil
There is no substitute to HARDWORK
Alzhy
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Why would HP then provide a date parameter to set_parms? Is'nt this to address whatever system files, db's , etc.. that it needs to "reset" so the other subsystems don't complain, etc?

Already I am thinking.. sar data, MWA datafiles, etc?
Hakuna Matata.
Pete Randall
Outstanding Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Nelson,

Two thoughts:

1) Just come up in single user mode (rather than disabling startups), then do the date, then init 3 (or 4 or whatever your default run level is).

2) set_parms is what is run during install. It's a common script available to do all those initialization things that need to be done at install time. I suspect it justs calls the date command, but all it does is provide an interface to make it more approachable for "rookies".


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

I'll answer it like this. All flavors of UNIX have the "date" command but my only exposure to set_parms has been with HP-UX. I was able to make exactly the kind of adjustments you need for at least a decade before I could even spell set_parms.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Hi Nelson,

As suggested by others, I would also use 'date' to change the date. But I will ensure that the application/database is shutdown before I do so. I would even reboot the system after changing the date to make the things clean.

set_parms is a collection of configuration tools with date one of them. You can use it either instead of date.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
curt larson_1
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

well all set_parms is a user interface to the date command. it allows the user to input the month day year etc. without needing to know the date command's syntax.

it also does some error checking. Like did you input numbers and didn't try using something 2/30 (feburuary 30th).

then uses the date command to set the system clock.

So, either is going use the date command to set the system clock
John Poff
Honored Contributor
Solution

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Hi,

Here is what I would try:

Stop Oracle/apps
Disable xntpd [as per Clay's suggestion]
set the correct date/time
wait 24 hours
Startup xntpd
Start Oracle/apps

I wouldn't recommend stopping the box cold for 24 hours. I've seen too many boxes and disks croak after being down that long.

Of course, if it wasn't a production server, I'd say just change the date and see what happens. See if your developers and DBAs can tell any difference. ;)

JP
Michael Tully
Honored Contributor

Re: How Would you Handle This - Date/Time inadvertently set 24 hours ahead. - Need to Correct

Just to add:
If you don't take the system to single user mode, I would strongly suggest you stop and restart both cron and syslogd.
Anyone for a Mutiny ?