DEV Community

Roy
Roy

Posted on

Answer: SQLPLUS error:ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

I ran into the exact same problem under identical circumstances. I don't have the tnsnames.ora file, and I wanted to use SQL*Plus with Easy Connection Identifier format in command line. I solved this problem as follows.

The SQL*Plus® User's Guide and Reference gives an example:

sqlplus hr@\"sales-server:1521/sales.us.acme.com\"

Pay attention to…

我也遇到过同样的问题,connection identifier 需要用双引号引用起来,且为了让bash将双引号传递给sqlplus, 双引号之前需要加转义符号

Oldest comments (0)