0

I connect successfully to an Oracle Database from Oracle SQL Developer with the following settings:

enter image description here

but if I connect with the same settings from the command line

sqlplus [email protected]:1521/ORCLPDB1

I get

ERROR:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

what does this mean?

1 Answer 1

1

As indicated in the SQLPlus documentation, to use this form of connect string on the command line, you need to enclose the whole thing in double quotes:

sqlplus PDBADMIN@"172.28.59.199:1521/ORCLPDB1"

(Depending on your OS, you may also need to escape those quotes with a backslash.)

I think syntactically this is necessary to distinguish /servicename from /password.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.