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๏ผŒ ๅŒๅผ•ๅทไน‹ๅ‰้œ€่ฆๅŠ ่ฝฌไน‰็ฌฆๅท

Top comments (0)

๐Ÿ‘‹ New to DEV?

Head over to our Welcome Thread and tell us what you're working on!