Translate

[Oracle][Linux] 패스워드에 특수문자가 있을 때 sqlplus 접속방법



OS: Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Oracle: 11g


오라클 계정 패스워드에 특수문자가 있는경우 SQLPLUS 접속 시 오류가 나는 증상이 있어 이것저것 시도를 해봤다.




아래와 같이 일단 sqlplus 접속 후 CONN id/"password" 라고 패스워드 앞뒤에 쌍따옴표(")만 넣어주면 접속이 가능하다.


[oracle@DB1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 13 20:26:55 2015

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, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> CONN id/password!@#
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Warning: You are no longer connected to ORACLE.
SQL>
SQL> CONN id/"password!@#"
Connected.
SQL>







하지만 sqlplus 에 해당 아이디로 바로 로그인하기 위해서는 다음과 같이 역슬래시(\)를 붙여줘야 접속이 가능했다.


[oracle@DB1 ~]$ sqlplus id/\"password\!\@\#\"

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 13 20:14:35 2015

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, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@DB1 ~]$



댓글