I'm creating a C# MVC project that uses Oracle Database. While trying to connect to the DB, I get following error:
ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found.
When I try to connect via SQL developer it works fine. Is there any way that I can solve this problem ?
NOTE: I'm using IIS express for testing
I was facing the same issue using ODP.NET for .NET Core on Pivotal Cloud Foundry. The core issue is missing timezone information.
Added a timezone by setting "TZ" environment variable for my instance. That fixed the issue for me.
According to this straight from an Oracle employee, set UseHourOffsetForUnsupportedTimezone property for the Connection to true, before opening it.
con.UseHourOffsetForUnsupportedTimezone = true;
con.Open();
This worked for me as I did not have control on the OracleDB server, and in my crossplatform application, the environment variable usage was not being consistent across linux distros. I had ran Weinfried's snippet on all of them to test and there was no timezone descrepency with OracleDB in my case(both on UTC, no DST) but was still failing on the same plank.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With