在Ubunut计算机上,我使用此命令通过11g即时客户端连接到Oracle 11g数据库:
sqlplus username/password@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = the.address.com)(PORT = theport)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = service.address.com)))
哪个工作正常...在Mac OS X Mountain Lion上,我只能运行即时客户端10g(32位版本),当我尝试使用相同的线路连接时,这会出现此错误:
-bash: syntax error near unexpected token `('
语法是否从10g变为11g?
答案 0 :(得分:2)
您需要在连接字符串周围加上引号,否则括号可以解释为括号。
类似的东西:
sqlplus user/pass@"(DESCRIPTION...)"