Connecting to Oracle DB 11g with 10g client - syntax error

1k Views Asked by At

On a Ubunut machine, I use this command to connect to an Oracle 11g database with the 11g instant client:

sqlplus username/password@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = the.address.com)(PORT = theport)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = service.address.com)))

Which works fine… On Mac OS X Mountain Lion I could only get the instant client 10g (32bit version) running, which gives me this error when I try to connect using the same line:

-bash: syntax error near unexpected token `('

Did the syntax changed from 10g to 11g?

1

There are 1 best solutions below

3
On BEST ANSWER

You need to put quotes around the connect string, parenthesis can be interpreted by your shell otherwise.

Something like:

sqlplus user/pass@"(DESCRIPTION...)"