OK, I am pretty sure I found out where to put the tns_names.ora file:
$ORACLE_HOME/network/admin

But, I'm confused as to how to specify the database name. From the
Django Oracle docs (http://docs.djangoproject.com/en/dev/ref/
databases/?from=olddocs#id9) they have the SID as the DATABASE_NAME
setting.

If I set my DATABASE_NAME to my SID, and try to retrieve objects, I
get:

DatabaseError: ORA-00942: table or view does not exist

? ? ?

b

On Feb 20, 1:21 pm, Brandon Taylor <btaylordes...@gmail.com> wrote:
> Hi Matt,
>
> Ok, I modified manage.py to add two environ variables:
>
> import os
> oracle_home = '/Users/bft228/Library/Oracle/instantclient_10_2'
> os.environ['ORACLE_HOME'] = oracle_home
> os.environ['DYLD_LIBRARY_PATH'] = oracle_home
>
> Now I'm getting an error:
> DatabaseError: ORA-12505: TNS:listener does not currently know of SID
> given in connect descriptor
>
> Everything I've found online seems to point to a "tnsnames.ora" file
> that describes the connection information. A co-worker sent me their
> "tnsnames.ora" file, but I'm unsure where to put this in OS X.
>
> My ORACLE_HOME is "/Users/bft228/Library/Oracle/instantclient_10_2"
>
> Thoughts?
> Brandon
>
> On Feb 20, 11:04 am, Matt Boersma <m...@sprout.org> wrote:
>
> > Brandon,
>
> > Usually that error arises from cx_Oracle when the ORACLE_HOME
> > environment variable isn't set.  Try doing "manage.py shell" and
> > looking at what's in os.environ--if you don't see ORACLE_HOME set to
> > the correct location there, try fixing that first.
>
> > Matt
>
> > On Fri, Feb 20, 2009 at 9:41 AM, Brandon Taylor <btaylordes...@gmail.com> 
> > wrote:
>
> > > Hi everyone,
>
> > > I'm using Oracle instantclient_10_2 (Intel), cx_Oracle-5.0.1, OS X
> > > 10.5.6 (Intel), Python 2.6.1 and Django trunk.
>
> > > My built-in server will start up correct, but, when I attempt to get
> > > objects for a model, I receive the following error:
>
> > > InterfaceError: Unable to acquire Oracle environment handle
>
> > > Can anyone help me resolve this problem?
>
> > > TIA,
> > > Brandon
--~--~---------~--~----~------------~-------~--~----~
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