특수문자 처리
패스워드에 특수문자가 포함된 경우 sqlplus 접속 시도 중 에러 발생 시 처리 방법 - sqlplus 에서 접속 시 앞뒤로 쌍따옴표(")로 막아줌 SQL> conn psk/"abc123!@" - 쉘에서 접속 시 특수문자 앞에 역슬래시(\)를 붙여줌 $ sqlplus psk/\"abc123\!\@\" |
테스트
## SP2-0306 에러 발생
SQL> create user sk identified by "abc123!@" ;
User created.
SQL> grant connect to sk ;
Grant succeeded.
SQL> conn sk
Enter password:
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SQL> conn sk/"abc123!@"
Connected.
[oracle@svr1 admin]$ sqlplus sk/"abc123!@"
-bash: !@": event not found
[oracle@svr1 admin]$ sqlplus sk/\"abc123\!\@\"
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 17 15:43:43 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Fri Jun 17 2022 15:36:38 +09:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
## ORA-12154 에러 발생
SQL> create user sk11 identified by "abc123@#" ;
User created.
SQL> grant connect to sk11 ;
Grant succeeded.
SQL> conn sk11
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
SQL> conn sk11/"abc123@#"
Connected.
SQL>
[oracle@svr1 ~]$ sqlplus sk11/"abc123@#"
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 17 15:43:34 2022
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name: ^C
[oracle@svr1 ~]$ sqlplus sk11/\"abc123\@\#\"
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 17 15:43:49 2022
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
'DBMS > ORACLE' 카테고리의 다른 글
TTS (Transportable Tablespaces) (0) | 2022.06.24 |
---|---|
listener.ora / sqlnet.ora / tnsnames.ora 차이점 (0) | 2022.06.20 |
ADR(Automatic Diagnostic Repository) (0) | 2022.06.17 |
AFD disk 추가/삭제 (0) | 2022.06.09 |
ASMLIB to AFD(ASM Filter Driver) 마이그레이션 (ASM SINGLE) (0) | 2022.06.08 |
댓글