Oracle数据库用户的解锁方法

来源:互联网 发布:精锐摇杆石头淘宝店 编辑:程序博客网 时间:2024/05/16 08:08

--

 

今天由于想在家里办公,需要还原数据库,但system用户的密码忘记了。最后百度了下怎么解决这个问题,以下是解决的具体办法:

 

在dos命令中

输入:sqlplus /nolog

输入:conn /as sysdba

已连接。

输入:alter user system identified by system;

用户已更改。

输入:exit;

输入:sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on 星期六 3月 16 17:40:42 2013

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

请输入用户名:system

输入口令:

ERROR:

ORA-28000: the account is locked

----------------------------------------------------------------------------------------------------------------------------------

我就郁闷了,怎么就被锁住了,想办法解锁呗。解锁的具体办法:

----------------------------------------------------------------------------------------------------------------------------------

在dos命令下

输入:sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on 星期六 3月 16 17:46:16 2013

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

输入:conn /as sysdba

输入:alter user system account unlock;

用户已更改。

输入:alter user system identified by system;

用户已更改。

输入:exit

从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

输入:sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on 星期六 3月 16 17:50:43 2013

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

请输入用户名:system

输入口令:

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

SQL>

----------------------------------------------------

有时候我们会碰到创建的用户是小写的,然后用大写的用户登录会失败,解决办法是:

alter system set sec_case_sensitive_logon=false scope=both;


-----------------------------------------------------------------------------------------------------------------------------------------