A warning, a suggestion, and a question about Oracle

12 views
Skip to first unread message

Guyren Howe

unread,
May 14, 2013, 1:02:09 AM5/14/13
to sdr...@googlegroups.com
The warning: unless you’re going to make a career of it, run screaming from any suggestion that you install and configure Oracle. I set up Postgres and MySQL regularly. You’d think that would help, but NOOO.

The suggestion: if you *must* install and set up Oracle, it is somewhat less scream-inducing to do it on Windows than on Linux.

The question: now how do I connect to it? The only way I’ve gotten to work is from DOS:

sqlplus <user>@<database>

This comes back:

ORA-12154: TNS:could not resolve the connect identifier specified

at which point it asks me to enter user name and password. The <user> I just entered above and its password then work fine.

I can’t do this either:

sqlplus <user>/<password>@<database>

What I *really* need is to connect from IRB on my Mac. I have oci8 gem installed.

The amount of subtly and grossly different advice I get when I try to google this issue is truly astounding: listener.ora, tnsnames.ora, connection strings, setting environment variables, using various Oracle utilities (many of which I don’t appear to have), and every one advises me to do something slightly different, and assumes I understand some other thing that’s just as confusing.

Does anyone here have experience with this situation who might advise me?

Adam Grant

unread,
May 14, 2013, 6:52:54 PM5/14/13
to sdr...@googlegroups.com

Im not near my mac, but if you have instant client installed,  I have gotten it to work by setting ORACLE_HOME (instant client dir) ,LD_LIBRARY_PATH (oracle home/lib) , and TNS_ADMIN environment vars before running sqlplus or irb for oci8. Drop a tnsnames.ora into a dir in your home folder and set the TNS_ADMIN path to it.

I can help you with specifics next monday when I get home. It probably won't help, but google for "oracle 2 day dba".

--
--
SD Ruby mailing list
sdr...@googlegroups.com
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdruby+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Cynthia Kiser

unread,
May 14, 2013, 8:43:33 PM5/14/13
to sdr...@googlegroups.com
Quoting Adam Grant <adam....@gmail.com>:
> Im not near my mac, but if you have instant client installed, I have
> gotten it to work by setting ORACLE_HOME (instant client dir)
> ,LD_LIBRARY_PATH (oracle home/lib) , and TNS_ADMIN environment vars before
> running sqlplus or irb for oci8. Drop a tnsnames.ora into a dir in your
> home folder and set the TNS_ADMIN path to it.

That is also my favored option - though my team perfers to use the
forrest of parentheses connect strings instead of a TNS_Names
file. The fact that you can connect from within SQLPlus makes it seem
like just a path or syntax issue - but it seems somewhat familiar -
like I have had my machine behave that way. What Mac OS and instant
client versions are you using?

--
Cynthia N. Kiser
c...@ugcs.caltech.edu

"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better"
Worstward Ho
by Samuel Beckett

Guyren Howe

unread,
May 14, 2013, 8:50:57 PM5/14/13
to sdr...@googlegroups.com
On May 13, 2013, at 22:02 , Guyren Howe <guy...@gmail.com> wrote:

The question: now how do I connect to it? The only way I’ve gotten to work is from DOS:

sqlplus <user>@<database>

This comes back:

ORA-12154: TNS:could not resolve the connect identifier specified

at which point it asks me to enter user name and password. The <user> I just entered above and its password then work fine.

After faffing about with anything that Google mentions, I'm now able to connect.

Not sure which particular faff made it work, but I'm okay now.

Thanks to all in any event.

Reply all
Reply to author
Forward
0 new messages