• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Connect without password on Command line when using EZCONNECT

by admin

EZCONNECT is Oracle’s easy connect naming method. EZCONNECT eliminates the need for service name lookups in TNSNAMES.ORA files when connecting to an Oracle database across a TCP/IP network.

Syntax of EZCONNECT:

sqlplus username/password@[//]host[:port][/service_name]

To enable EZCONNECT “sqlnet.ora” should have naming methods “ezconnect” specified in NAMES.DIRECTORY_PATH Parameter. “sqlnet.ora” is located in $ORACLE_HOME/network/admin

Example:

NAMES.DIRECTORY_PATH=(ezconnect, tnsnames)

EZConnect without command line password

Connecting without a password on the command line is very common in order to be prompted for a password such as with:

% sqlplus [username]/@[net_alias]

With the EZCONNECT naming adapter, the following similar syntax will fail with an ORA-12514 error:

% sqlplus [username]/@[hostname]:[port]/[servicename]

Based on parsing rules, the service name is being interpreted as the password. The supplied hostname is being interpreted as the SERVICE_NAME and therefore returning the ORA-12514 error.

In order to be prompted for a password while using the EZCONNECT naming adapter, use the following syntax:

% sqlplus [username]@\"[hostname]:[port]/[service name]\"

Filed Under: oracle

Some more articles you might also be interested in …

  1. How to Remove or delete a Weblogic Server (WLS) Domain
  2. Beginners Guide to Oracle Database 18c Multitenant Architecture
  3. Oracle Database Environment Variables and Their Functions
  4. Basics of client connectivity in Oracle Data Guard configuration
  5. How To Disable the Oracle WebLogic Server Default Welcome Page
  6. How to upgrade Oracle database to 12c Pluggable database (Multitenant) using Transportable tablespace(TTS) method
  7. How to Modify spfile in Oracle Database
  8. How to move ASM spfile from External Redundancy To Normal Redundancy in version 12.1.0.2 and above
  9. Script to Automatically Start GoldenGate
  10. How to Install and configure OSWatcher Black Box (OSWbb)

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright