kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

Logon Denied for Mac OSX El Capitan with Instant Client x64-12.1.0.2.0 #133

Closed erluti closed 8 years ago

erluti commented 8 years ago

Doing a basic connection with OCI8.new and executing a select statement is throwing this exception:

oci8.c:694:in oci8lib_210.bundle: ORA-01017: invalid username/password; logon denied (OCIError)
    from /Users/pbecker/.rvm/gems/ruby-2.1.5/gems/ruby-oci8-2.2.1/lib/oci8/oci8.rb:151:in `initialize'

I can connect via other tools (like SqlDeveloper), but in ruby I get the logon denied error.

kubo commented 8 years ago

ORA-01017: invalid username/password

How did you set username and password? The following commands work for me:

ruby -roci8 -e "OCI8.new('ruby/oci8@//192.168.0.3/ora121').exec('select * from dual') do |row| puts row.join(','); end"
ruby -roci8 -e "OCI8.new('ruby', 'oci8', '//192.168.0.3/ora121').exec('select * from dual') do |row| puts row.join(','); end"

Environment:

erluti commented 8 years ago

Both of those commands returned the same password error for me.

I also tried x32 of that Instant Client. Also tried 11.2.0.4.0 (64-bit). I also tried with fix_oralib.rb on both 64 bit versions. I also tried installing via homebrew and manually. Posted here because I have no idea what else to try.

kubo commented 8 years ago

Could you try sqlplus on the same OS X? If it works, I'll port ocidump to OS X tomorrow to check the difference of OCI function calls issued by sqlplus and ruby-oci8.

erluti commented 8 years ago

Looks like I'm getting the same error from SQLPlus. I'll dig into this a bit more. Thanks!

erluti commented 8 years ago

Looks like there's an issue with Instant Client. Here's some information about it here. Good news is that the gem is okay! https://blogs.oracle.com/opal/entry/using_oracle_on_os_x

kubo commented 8 years ago

FYI. Instant Client for OS X was updated. This issue was fixed by Oracle. http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html