Skip to main content

Posts

Showing posts from January, 2020

EZCONNECT without a password

this is helpful. https://perfstat.wordpress.com/2015/02/06/ezconnect-without-a-password/ EZCONNECT without a password Leave a reply After encountering this little annoyance for the nth time, I thought I should write it up once and for all, so it is committed to my electronic memory. The EZCONNECT naming method is a handy way of connecting to an Oracle database by its service name, which avoids the need for aliases in the TNSNAMES file, or lengthy SQL*Net connection strings : 1 2 SQL> connect user/password@hostname:port/service_name Connected. However, one would expect that if you don’t want to specify the password on the command line, then simply omit the password and await the prompt. But… 1 2 3 SQL> connect user@hostname:port/service_name ERROR: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA Without the password present, the command interpreter parses the string differently, and (according to Oracle