You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Oracle 18c XE创建用户后遭遇ORA-01017:无效用户名/密码;登录被拒绝问题的解决方法

ORA-01017: invalid username/password when logging into ashmeta user (Oracle 18c XE)

Let's work through this issue step by step—here are the most likely fixes based on your setup:

1. Ensure you're logging into the correct PDB (XEPDB1)

You created the ashmeta user inside the XEPDB1 pluggable database, but by default, Oracle XE connects to the root container (XE) if you don't specify the PDB. That's probably the main issue here.

To log into the right container:

  • If using SQL*Plus locally, use this command (replace localhost:1521 with your host/port if needed):
    sqlplus ashmeta/ashmeta@localhost:1521/XEPDB1
    
  • If you have a TNS entry configured for XEPDB1, you can also use:
    sqlplus ashmeta/ashmeta@XEPDB1
    

2. Verify the ashmeta user exists in XEPDB1

Double-check that the user was actually created in the correct PDB. Log into SYS in XEPDB1 and run:

ALTER SESSION SET CONTAINER=XEPDB1;
SELECT username, account_status FROM dba_users WHERE username = 'ASHMETA';
  • If the user doesn't show up, you might have run the CREATE USER command before switching to XEPDB1. Re-run the create user statement after switching containers.
  • If the account status is LOCKED, unlock it with:
    ALTER USER ashmeta ACCOUNT UNLOCK;
    

3. Confirm case-insensitive logon is active in XEPDB1

You set SEC_CASE_SENSITIVE_LOGON = FALSE at the system level, but let's confirm it's applied in the PDB. Run this in XEPDB1:

SHOW PARAMETER SEC_CASE_SENSITIVE_LOGON;

If the value isn't FALSE, set it for the current session (to test) or persistently:

-- Session-level (immediate effect for your current session)
ALTER SESSION SET SEC_CASE_SENSITIVE_LOGON = FALSE;

-- If you want it permanent for the PDB (requires restart if using SPFILE)
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE CONTAINER=CURRENT;

4. Test with explicit case (just in case)

Even with case-insensitive logon enabled, sometimes typos or hidden formatting can cause issues. Try logging in with uppercase credentials to rule this out:

sqlplus ASHMETA/ASHMETA@XEPDB1

Most of the time, the first step (specifying the PDB in your connection string) fixes this issue—since users created in a PDB aren't visible in the root container.

内容的提问来源于stack exchange,提问作者Amir251

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 23:37:31