Oracle 連線字串語法:CONNECT username/password@alias,@ 後視為 TNS 別名。密碼含 @ 時,解析器誤將 @ 後內容當作別名,導致 ORA-12154: TNS:could not resolve the connect identifier specified。
SQL> CREATE USER testuser2 IDENTIFIED BY "H@t";
User created.
SQL> CONNECT testuser2/h@t
ERROR: ORA-12154: TNS:could not resolve the connect identifier specified
SQL> CONNECT testuser2/"H@t"
Connected.
@ 仍需引號。PROFILE 中實作 PASSWORD_VERIFY_FUNCTION,攔截含 @ 的密碼,拒絕設定。@、/、# 等連線字串保留字元。