Oracle12c用户无法登录问题

1. 环境说明

操作系统:CnetOS7.3
数据库:Oracle 12c Release 1

2. 问题说明

尝试使用system用户登录,始终显示无效的用户名/密码。猜想可能是密码不正确,或者用户被锁定了。

[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 8 16:05:32 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter user-name: system
Enter password: 
ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: 

3. 解决方案

3.1 使用dba登录

执行命令sqlplus / as sysdba登录

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 8 16:08:45 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> 
3.2 查看用户

执行select username from dba_users查看所有用户

SQL> select username from dba_users;

USERNAME
--------------------------------------------------------------------------------
ORACLE_OCM
OJVMSYS
SYSKM
XS$NULL
GSMCATUSER
MDDATA
SYSBACKUP
DIP
SYSDG
APEX_PUBLIC_USER
SPATIAL_CSW_ADMIN_USR

USERNAME
--------------------------------------------------------------------------------
SPATIAL_WFS_ADMIN_USR
GSMUSER
AUDSYS
FLOWS_FILES
DVF
3.3 解锁账户并设置密码

解锁用户命令格式为:ALTER USER 用户名 UNLOCK

SQL> alter user system account unlock;

User altered.

设置新密码命令格式为:ALTER USER 用户名 IDENTIFIED BY 新密码

SQL> alter user system identified by 123456;

User altered.
3.4 测试登录

使用system用户登录

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 8 16:25:20 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter user-name: system 
Enter password: 
Last Successful login time: Wed Nov 08 2017 16:09:27 +08:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值