本文主要是介绍oracle 11g scott用户的加解锁方法以及修改密码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
数据库默认安装时 scott用户是锁定的。
首先用超级管理员用户登录sqlplus
[oracle@dj ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 4 10:44:28 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
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>
启动数据库
SQL> startup ;
ORACLE instance started.
Total System Global Area 1185853440 bytes
Fixed Size 2252664 bytes
Variable Size 754974856 bytes
Database Buffers 419430400 bytes
Redo Buffers 9195520 bytes
Database mounted.
Database opened.
SQL>
解锁scott用户
SQL> alter user scott account unlock;
User altered.
连接scott用户 期间时会提示让你修改新密码 这里还是填写tiger默认密码
SQL> conn scott / tigerERROR:
ORA-28001: the password has expired
Changing password for scott
New password:
Retype new password:
Password changed
Connected.
SQL>
查看scott用户 显示为已经是scott用户
SQL> show user ;
USER is "SCOTT"
SQL>
也可以修改用户的密码 例如
在sqlplus修改普通用户密码,其格式为:
aler user 用户名 identified by 密码
如:alter user scott identified by grace;
对用户的加锁及解锁 例如
SQL> alter user 用户名 account lock;(加锁)
SQL> alter user 用户名 account unlock;(解锁)
-------------------- THE END----------------------------
这篇关于oracle 11g scott用户的加解锁方法以及修改密码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!