创建用户后我无法登录,这是我的代码
ALTER SESSION SET CONTAINER = XEPDB1;
CREATE USER hello IDENTIFIED BY a;
GRANT CONNECT TO hello;
GRANT CREATE SESSION TO hello;
CONN hello/a;
脚本输出
Session altered.
User HELLO created.
Grant succeeded.
Grant succeeded.
Error starting at line : 26 in command -
connect ...
Error report -
Connection Failed
USER = hello
URL = jdbc:oracle:thin:@//localhost:1521/XEPDB1
Error Message = ORA-01017: invalid username/password; logon denied
Commit
我试过了
CONN hello/a@XEPDB1;
输出
SQL> conn hello/a@xepdb1
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
我该如何解决这个问题?我已经在 tnsnames.ora 中添加了一个 listener_xepdb1 并使用它进行了设置,但仍然无法修复它
SQL> alter system set local_listener='LISTENER_XEPDB1';
答案 0 :(得分:0)
看起来你应该用过
conn hello/a@xepdb1
-------
you're missing this