OCIError: OCI Library Initialization Error

Discussion in 'Ruby' started by Dheeraj Gambhir, Jul 21, 2009.

  1. Hi,

    If i run this code to check whether i am able to connect to the Oracle
    database server or not:

    ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
    from bam_order.ec_invoice where order-id>2316027') do |r| puts r.join
    (' | '); end"

    It gives me the following error:

    C:\ruby>ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec
    ('select * f
    rom bam_order.ec_invoice where order-id>2316027') do |r| puts r.join('
    | '); end
    "
    c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
    Initialization
    Error (OCIError)
    from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52

    Regards
    D G
    --
    Posted via http://www.ruby-forum.com/.
    Dheeraj Gambhir, Jul 21, 2009
    #1
    1. Advertising

  2. Hi,


    i am using:
    Ruby 1.8.6
    Oracle 9i
    Windows XP
    and i am done with "ruby ruby-oci8-0[1].1.13-mswin.rb"

    But when i run this code to check whether i am able to connect to the
    Oracle
    database server or not:

    ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
    from bam_order.ec_invoice where order-id>2316027') do |r| puts r.join
    (' | '); end"

    Here mlbread=username, mlbread=password and MLBD=schema name

    It gives me the following error:

    C:\ruby>ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec
    ('select * f
    rom bam_order.ec_invoice where order-id>2316027') do |r| puts r.join('
    | '); end
    "
    c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
    Initialization
    Error (OCIError)
    from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52


    Plase help me and let me know where i am wrong.

    Regards
    D G
    --
    Posted via http://www.ruby-forum.com/.
    Dheeraj Gambhir, Jul 22, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RTJ
    Replies:
    2
    Views:
    4,018
    Sanjay Rana
    Sep 27, 2006
  2. RTJ
    Replies:
    4
    Views:
    708
  3. Matt Ti

    create': ERROR (OCIError)

    Matt Ti, Mar 21, 2008, in forum: Ruby
    Replies:
    1
    Views:
    110
    Jesse Hu
    Mar 26, 2008
  4. Dheeraj Gambhir
    Replies:
    2
    Views:
    493
    Dheeraj Gambhir
    Jul 27, 2009
  5. Namit Jain
    Replies:
    0
    Views:
    231
    Namit Jain
    Aug 20, 2009
Loading...

Share This Page