development: adapter: oracle_enhanced database: some.host.org:1531/sid username: user password: secret
development: adapter: oracle_enhanced database: /some.host.org:1531/sid username: user password: secret
development: adapter: oracle_enhanced host: some.host.org port: XXXX database: sid username: user password: secret
development: adapter: oracle_enhanced database: //some.host.org:XXXX/SID username: user password: secret
Another database is defined in sqldeveloper, but it does not have SID but service name defined (SID is empty), the host is the same.
And I can connect to it without problems.
Even in IntelliJ, I had to define these 2 DBs differently:
jdbc:oracle:thin:@some.host.org:XXXX:sid -> for the DB with SID defined
jdbc:oracle:thin:@//some.host.org:XXXX/service_name - for the DB without SID but with service name defined.The question is HOW to set the databse with SID properly ? Thank you.
ActiveRecord::Base.establish_connection(
adapter: 'oracle_enhanced',
host: 'some.host.org',
port: 'XXXX',
database: 'service_name',
username: 'user',
password: 'secret'
)
development: adapter: oracle_enhanced database: "(DESCRIPTION= (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))) (CONNECT_DATA=(SID=your_sid)) )" username: user password: secret
--
You received this message because you are subscribed to the Google Groups "Oracle enhanced adapter for ActiveRecord" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oracle-enhanc...@googlegroups.com.
To post to this group, send email to oracle-...@googlegroups.com.
Visit this group at https://groups.google.com/group/oracle-enhanced.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, May 18, 2016 at 5:34:54 PM UTC+2, Javix wrote:
When trying just to check it with OCI as follows, it fails:
oci = OCI8.new('user', 'secret', 'some.host.org:XXXX/SID')
puts oci.inspect
$ ruby oci_connection.rb
oci8.c:654:in oci8lib_230.so: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (OCIError)
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ruby-oci8-2.2.2-x64-mingw32/lib/oci8/oci8.rb:142:in `initialize'
from oci_connection.rb:3:in `new'
from oci_connection.rb:3:in `<main>'
--
You received this message because you are subscribed to the Google Groups "Oracle enhanced adapter for ActiveRecord" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oracle-enhanc...@googlegroups.com.
To post to this group, send email to oracle-...@googlegroups.com.
Visit this group at https://groups.google.com/group/oracle-enhanced.
For more options, visit https://groups.google.com/d/optout.