Thursday, January 1, 2009

Buenos Aires Timezone Change

This is a strictly unsupported comment

The set up:
Oracle 11g (
KUbuntu Intrepid (8.10) (Linux omega 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux)

I followed one of the many tutorials to get 11g on ubuntu and it worked flawlessly EXCEPT for the enterprise manager.

When I finished creating the database, I found that EM would not start. After checking the logs I found problems with the timezone and finally came to realize that Oracle had anticipated the Daylight Saving Time whereas KUbuntu had not. So, for the OS it was -180min and for Oracle it was -120min. You can see the problem there, EM would not start.

I've done this a few times, and there are many workarounds... here are the most 'pretty' ones.

1. use enviroment variable to force the timezone variation.
$ export TZ=etc/GMT+3

2. Set the OS timezone to an etc/GMT
# echo 'etc/GMT+3' > /etc/timezone

Note: you may need to reboot after this.

Oracle changes:

You may need to run emctl resetTZ agent.

and run the mgmt_target.set_agent_tzrgn to update the repository:

SQL> exec mgmt_target.set_agent_tzrgn('omega:3938','-03:00');

After this small 'trick' everything worked.

Note that when DST changes again, you will need to follow these steps yet again... but still better than nothing. I'm looking into an ubuntu update to take into consideration Argentina's DST policy which is rather new.

Guillermo Alan Bort
Oracle Certified Associate.

1 comment:

oracle r12 new features said...

I like your blog but I don't understand the question asked in this post. So I can't even try for the answer myself. I want you to better explain it with a example so that I can understand the logic behind it. I try working it out. Thanks.