SCOTT是在Oracle数据库中,一个示例用户的名称。其作用是为初学者提供一些简单的应用示例,不过其默认是锁定状态,在安装时,根据用户需要,在“数据库配置助手”界面完成后,弹出的对话框中--口令管理,里面解锁。
解锁scott用户
alter user scott account unlock
sqlplus
请输入用户名: sys as sysdba
输入口令:
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user scott account unlock;
用户已更改。
SQL> conn scott/tiger;
ERROR:
ORA-01017: invalid username/password; logon denied
警告: 您不再连接到 ORACLE。
此时可以发现用scott用户依然不可以登录,这个时候我们就需要修改scott的密码
修改scott的密码
SQL> conn sys as sysdba
输入口令:
已连接。
SQL> alter user scott identified by tiger;
用户已更改。
SQL> conn scott/tiger;
已连接。
sqlplus连接scott用户
[root@oracle ~]# sqlplus scott/tiger@你的实例名
SQL*Plus: Release 11.2.0.4.0 Production on 星期三 4月 8 10:46:29 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
这样就可以连接上scott用户了