As far as I know, you have to supply GMT to the rollforward command. Is the timezone of where you are located 5 hours behind GMT?
Eitherways, supply the timestamp that is returned. I have done so and successfully rolled forward.
Hope this helps.
I am living in Canada, Ontario, you are right if I use the prompted time stamp it will work but if I want to rolforward to 11 AM (backup has been taken at 8 PM ) should I add 3 hours to 2004-11-11-15.59.36.000000 and rollforward to
Anyway, to roll forward to 11am EST on Nov. 11 you need to run:
db2 "rollforward db dbadb to 2004-11-11-10.59.14.000000 using local time and stop"
provided of course that the timezone on your machine is set to EST.
8 AM was just sample but when i used 2004-11-11-10.59.14.000000 I got masage That I should use 2004-11-11-15.59.26.000000 or bigger ,it is 5 hours ahead I need just 3 hours ahead, should I use
The backup time of the image is the local server time, according to time zone, which is also the DB2 server time
In unix , we set it using TZ variable.Use echo $TZ to find it.
Now what is your DB2 server time zone in other word, the question is what time should I use to rollforward.
The rollforward command needs CUT or GMT time.
If you use db2 values current time zone , you will get like 50000 which means your local time is 5 hours ahead of GMT(CUT time).
so for your rollforward command , you should use.
Your local time - db2 values current time zone +/- 1 (if you are using daytime saving time).
Your db2diag.log file also shows your DB2 server local time (Unix time).
Same can be same to history file.
So why DB2 uses this CUT time, because it keeps track of LSN with
this CUT time to make a single global time.
Thank you Mujeed your information was very usefull, I am a lit bit confused, it means in rollforward command I should use "using local time" cluse ? could you please explain more.
Thanks alot for your help
local time is an option, but remember that its the server time(not client time). I never used the local time in my rollforward(recover command is
introduced in ver8.2).But I have seen DBA's using local time all the time.
Also,the db2diag.log file in v8.2 also shows the difference between the local time and the cut time.