Problem Connecting to Oracle

Discussion in 'Ruby' started by Matthew Carlson, Jan 7, 2006.

  1. Howdy,

    I'm hoping someone can assist me with a problem I'm having connecting to
    a remote Oracle database.

    Details:
    Running windows 2000. Have Oracle 92 client installed. The install was
    successful, as I'm able to use sqlplus/toad etc without issue

    Downloaded oci8 adapter. This too was successful, as I'm able to run
    test scripts via the Ruby interpreter against the database with no
    issues.

    When I try to run scaffolding with Rails however, I run into issues.

    I took these details from the 2 wiki postings on Oracle.

    My database.yml:
    development:
    adapter: oci
    database:
    host: SID
    username: user
    password: password

    With this configuration, I get: ORA-01017: invalid username/password;
    logon denied. Both the user and password are correct though - I am sure
    of this.

    If I modify the database.yml to the following:
    development:
    adapter: oci
    database: SID
    host: HOST/PORT
    username: user
    password: password

    I get the following error: ORA-06401: NETCMN: invalid driver designator.
    I've googled the hell out of this error, and while the solution seems
    straightforward in most of the postings, none of them have been able to
    solve my problem. Either that, or I'm just not understanding some
    Oracle functionality very thoroughly...

    I've subsequently tried a number of other combinations in the yml,
    including using the IP and SID, IP alone, etc..all to no avail.

    Any help anyone can offer would be greatly appreciated. I'm happy to
    provide more details as well, as I'm anxious to get up and running on
    our corporate dbases to show rails off a bit.

    Thanks,
    Matt

    --
    Posted via http://www.ruby-forum.com/.
    Matthew Carlson, Jan 7, 2006
    #1
    1. Advertising

  2. Try taking the whole (((LOTS)OF)PARENS) definition for your DB from
    your TNSNAMES.ORA file, taking out all the line breaks (so it's a
    one-liner), and putting that on the host: line.
    (Yes, this actually works)

    Also, you can take the "database:" line out of the config. The OCI8
    adapter doesn't use it.
    On 1/6/06, Matthew Carlson <> wrote:
    > Howdy,
    >
    > I'm hoping someone can assist me with a problem I'm having connecting to
    > a remote Oracle database.
    >
    > Details:
    > Running windows 2000. Have Oracle 92 client installed. The install was
    > successful, as I'm able to use sqlplus/toad etc without issue
    >
    > Downloaded oci8 adapter. This too was successful, as I'm able to run
    > test scripts via the Ruby interpreter against the database with no
    > issues.
    >
    > When I try to run scaffolding with Rails however, I run into issues.
    >
    > I took these details from the 2 wiki postings on Oracle.
    >
    > My database.yml:
    > development:
    > adapter: oci
    > database:
    > host: SID
    > username: user
    > password: password
    >
    > With this configuration, I get: ORA-01017: invalid username/password;
    > logon denied. Both the user and password are correct though - I am sure
    > of this.
    >
    > If I modify the database.yml to the following:
    > development:
    > adapter: oci
    > database: SID
    > host: HOST/PORT
    > username: user
    > password: password
    >
    > I get the following error: ORA-06401: NETCMN: invalid driver designator.
    > I've googled the hell out of this error, and while the solution seems
    > straightforward in most of the postings, none of them have been able to
    > solve my problem. Either that, or I'm just not understanding some
    > Oracle functionality very thoroughly...
    >
    > I've subsequently tried a number of other combinations in the yml,
    > including using the IP and SID, IP alone, etc..all to no avail.
    >
    > Any help anyone can offer would be greatly appreciated. I'm happy to
    > provide more details as well, as I'm anxious to get up and running on
    > our corporate dbases to show rails off a bit.
    >
    > Thanks,
    > Matt
    >
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
    Wilson Bilkovich, Jan 7, 2006
    #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. Juha Laiho
    Replies:
    0
    Views:
    529
    Juha Laiho
    Jul 30, 2003
  2. David Rudder
    Replies:
    0
    Views:
    398
    David Rudder
    Jul 30, 2003
  3. Replies:
    1
    Views:
    3,897
    wes weston
    Mar 5, 2004
  4. akki
    Replies:
    0
    Views:
    526
  5. Feyruz
    Replies:
    4
    Views:
    2,154
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page