datamapper / dm-oracle-adapter

Oracle Adapter for DataMapper
http://datamapper.org/
MIT License
18 stars 8 forks source link

TNSNAMES.ora location with ojdbc #14

Open tillsc opened 11 years ago

tillsc commented 11 years ago

When you want ojdbc to use a database specified in TNSNAMES.ora you'll have to specify the location of the TNSNAMES.ora file:

if RUBY_PLATFORM =~ /java/
  java.lang.System.setProperty("oracle.net.tns_admin", "/opt/oracle/network/admin") 
end

This must be done in the application somewhere.

AFAIK @rsim's oracle-enhanced adapter for ActiveRecord is doing this in the adapter by looking at an environment variable called "TNS_ADMIN" (which is used by sqlplus to locate the TNSNAMES.ora).

tillsc commented 11 years ago

This is slightly related to #13