Hi Again,

I have finished my implementation with the local db, but now stuck in major
issue.When i try to login to the local oracle database then it is working
perfectly fine.I am able to read the data from the db installed in the
same UNIX machine.

But when i tried to login a db installed in remote machine, which is
installed in the client side, then getting following error.

Traceback (most recent call last):
  File "test_db.py", line 8, in ?
    connection = cx_Oracle.Connection("%s/%s@%s" % ('user', 'user123',
'db'))
cx_Oracle.DatabaseError: ORA-01804: failure to initialize timezone
information

Also at the client machine the Oracle is (10.2.0)
"/opt/app/oracle/products/10.2.0", but in my machine it
is /opt/app/oracle/products/11.2.0 (11.2.0).


Earlier i was using like this in my CGI-Perl code, now i have to migrate
this in Django-Python module to use the below logic.How we can solve this
problem?

# Add ORACLE_HOME for 10g Oracle client.
BEGIN { $ENV{ORACLE_HOME} = '/opt/app/oracle/products/10.2.0' }

Any help will be highly appreciated.

Thanks,
Kamal

On Tue, Apr 26, 2011 at 10:22 PM, kamal sharma <kamalp.sha...@gmail.com>wrote:

> Thanks to all for supporting this to fix the issue.
>
> So issue is resolved by adding these 2 lines in "app.wsgi"
>
> os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"
> os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0"
>
> Thanks again for helping to fix this issue. Its really a superb forum to
> fix the issue so quickly. :-)
>
> Regards,
> Kamal
>
> On Sun, Apr 24, 2011 at 7:58 PM, Ian <ian.g.ke...@gmail.com> wrote:
>
>> On Apr 23, 12:29 pm, kamal sharma <kamalp.sha...@gmail.com> wrote:
>> > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in
>> app.wsgi
>> > as mentioned below and when I print the os.environ in the beginning of
>> > views.py then it shows that newly added value.
>>
>> It's clear that your LD_LIBRARY_PATH is fine at this point, since the
>> library must be loaded in order to get the ORA-01804 error.  The
>> problem, as Jirka and I have suggested, is that the rest of your
>> Oracle installation is still not visible to the process, which is
>> preventing the client from reading its data files.  Why this is the
>> case is unclear without knowing more details about your system.  Is
>> the Oracle directory readable by the WSGI user?  Is the WSGI process
>> running inside a chroot jail?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to