did you try sqlplus username/password@host:port/service sqlplus x/y@c:a/b modern versions of sqlplus (version 11 or newer) understand this syntax and you don't need a tnsnames.ora file.