3 Replies Latest reply: Jul 3, 2013 12:36 PM by jgarry RSS

    Is it a good idea to have @ character in DB user's password ?

    J.Kiechle

      Version: 11.2.0.3 on RHEL 5.8

       

      Our software vendor was insisting on having @ character for some of its DB users.

      But setting a password with @ character seems to have issues as the string after the @ can be misinterpreted as a TNS entry .

       

      I can connect only from within sqlplus using connect command.

       

      SQL> alter user scott identified by "ab@c_123";

       

      User altered.

       

      SQL> exit

      Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

      Data Mining and Real Application Testing options

      $

      $ sqlplus scott/ab@c_123

       

      SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 3 11:39:11 2013

       

      Copyright (c) 1982, 2011, Oracle.  All rights reserved.

       

      ERROR:

      ORA-12154: TNS:could not resolve the connect identifier specified

       

       

      Enter user-name:

      $

      $

      $ sqlplus scott/"ab@c_123"

       

      SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 3 11:39:33 2013

       

      Copyright (c) 1982, 2011, Oracle.  All rights reserved.

       

      ERROR:

      ORA-12154: TNS:could not resolve the connect identifier specified

       

       

      Enter user-name:

      $

      $

      $ sqlplus / as sysdba

       

      SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 3 11:39:46 2013

       

      Copyright (c) 1982, 2011, Oracle.  All rights reserved.

       

       

      Connected to:

      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

      Data Mining and Real Application Testing options

       

      SQL> conn scott/ab@c_123

      ERROR:

      ORA-12154: TNS:could not resolve the connect identifier specified

       

       

      Warning: You are no longer connected to ORACLE.

       

      -- The workaround is to use connect command from withing sqlplus and enclose the password in double quotes.

       

      SQL>

      SQL> conn scott/"ab@c_123"

      Connected.