Oracle中启动Scott用户的方法

2014-11-24 08:56:06 · 作者: · 浏览: 0
Oracle 中启动Scott 用户 的方法 , 在Oracle10g, (g 代表‘网络’的意思) 数据库中 Scott 这个用户 安装时是被锁定的,安装 Oracle的时候 ,你可以直接选择 给该用户 解锁,如果忘记了解锁, 后期可以使用sqlplus工具 通过命令 将其 解锁。


默认的scott用户是被锁定的,先解锁就能登陆使用 数据库了。


使用下面的语句解锁scott:

alter user scott account unlock;

解锁之后可能会要求你该密码:

alter user scott identified by tiger;

再登陆:

sqlplus scott/tiger

之后 就可以登陆了。

注意:
用命令行启用帐户 先解锁后 一定要设密码 不然还是无法登陆 最后要进行提交。


补全给出示范操作吧:


使用system 用户 登录Oracle 数据库, 输入命令: show user; 该条命令执行结果为: 显示当前登录的用户。
SQL*Plus: Release 10.2.0.1.0 - Production on 星期日3月4 13:54:32 2012

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


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show user;
USER 为"SYSTEM"
SQL>

使用sys 用户登录Oracle 数据库, 输入命令:conn as sysdba; 该条命令执行后提示:输入用户名,之后提示输入密码, 系统核对正确后,便可以连接了。
SQL> conn as sysdba;
请输入用户名: sys
输入口令: ****
已连接。
SQL> show user;
USER 为"SYS"

使用show user; 命令查看当前登录的用户。
SQL> show user;
USER 为"SYS"



使用sys 启用Scott用户: 输入命令:
SQL> alter user scott account unlock;
用户已更改。

SQL> alter user scott identified by tiger;
用户已更改。

SQL> conn scott;
输入口令: *****
已连接。
SQL> show user;
USER 为"SCOTT"
SQL>





使用Oracle 命令 查看当前数据库中已存在的 所有用户 命令如下:


select username from dba_users;




Over!!!

作者 SongYanJun2011