I just build the URL like this for oci8:

'oracle://user:pass@host:port/SID'

However, i prefer using the jdbc thin driver with jruby.  All you need is 
jruby, the sequel gem, and the jdbc jar from oracle's website.  No need for 
a local oracle installation:

'jdbc:oracle:thin:user/pass@host:port/SID'


On Wednesday, June 17, 2015 at 2:03:31 PM UTC-4, Tiago Cardoso wrote:
>
> exactly like that, that is the first argument of the oci8 client, the host 
> portion. oci8 itself has no support for the :sid parameter, I guess. But I 
> thought Sequel could build it. 
>
> 2015-06-17 17:25 GMT+02:00 Jeremy Evans <[email protected] <javascript:>
> >:
>
>> On Wednesday, June 17, 2015 at 1:35:46 AM UTC-7, Tiago Cardoso wrote:
>>>
>>> I'm currently struggling with "translating" my db options into a db URI, 
>>> as explained here: 
>>> http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html 
>>> . Most of the examples are only for postgres. However, this seems to be a 
>>> more difficult option for oracle. In my case, I'm passing the host, user 
>>> and password options to open the connection, in which the host value is 
>>> something like:
>>>
>>>  host: "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 
>>> \"0.0.0.0\")(PORT = 1521))(CONNECT_DATA = (SID = \"SID101\")))"
>>>
>>> This is because I haven't been able to map the SID option to the URI. Is 
>>> there a way to put it there?
>>>
>>
>> If you can show how you are connecting via the oci8 driver directly, I 
>> can probably explain how to do so with Sequel.
>>
>> Note that you don't have to use a URI, you can pass an options hash when 
>> connecting.
>>
>> Thanks,
>> Jeremy 
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "sequel-talk" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/sequel-talk/3bXsesRRdpA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/sequel-talk.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to