zoukankan      html  css  js  c++  java
  • Oracle用户解锁

    代码
     error: the account is locked

      然后上网查了一下之后发现这个用户被锁定了,至于它为什么被锁定,可能是下面几个原因。

      
    1.尝试多次登录未成功.(可能密码不正确)

      
    2.此用户被管理员手工锁定.

      
    3.用户密码到期.未按时修改密码.等等...

      这个用户肯定是登陆不了了,然后我用system这个用户登录,可是登了半天都没有进去,又去网上查,网上面大都是关于 oracle 9i的用

    户和密码,后来我记得在安装的时候就提示输入了,用那个试了一下就连接上了,所以在oracle 10g的system这个用户的密码不是默认的,而

    是安装的时候自己设定的。

      拿system登录进去之后,执行下面的命令:

      SQL
    > alter user scott account unlock;

      用户已更改。

      这样就完成解锁的操作。接下来,你还可以重新给scott这个用户设定密码

      修改scott的登录密码

      SQL
    > alter user scott identified by pan;

      用户已更改。

      ok了,你再拿scott 和 pan来登录就可以了!

      SQL
    > conn scott/pan

      已连接。

      新装完Oracle 10g后,用system
    /password可以正常登录,而使用scott/tiger用户却不能登录:

      conn scott
    /tiger error:Oracle 10g the account is locked Oracle 10g the password has expired

      原因:默认Oracle 10g的scott不能登陆。被禁用了。

      解决方法:

      首先确认已经安装oracle 数据库和客户端

      .在客户端DOS下执行如下语句:

      注意提示符号

      c:\sqlplus 
    /nolog sqlp\ conn sys/system@oracle10 as sysdba // sys为当前的oracle 用户 system 为该用户密码 oracle10 为SID # 

    alter user soctt account lock; // 把 scott用户锁定 # alter user scott account unlock; //把scott用户解锁 # alter user scott 

    identified 
    by scott //修改scott用户密码为 scott,scott用户默认密码为 tiger

      
    1 Dos下输入C:\sqlplus /nolog

      
    2 以DBA的身份登录

      conn sys
    /password as sysdba;

      
    3 解锁

      
    alter user scott account unlock;

      
    4 弹出一个修改密码的对话框,修改密码

      conn scott
    /tiger SQL> conn sys/sys as sysdba; Connected. SQL> alter user scott account unlock; User altered. SQL> commit

    Commit complete. SQL> conn scott/tiger//请输入新密码,并确认后OK Password changed Connected.
  • 相关阅读:
    STL:set/multiset用法详解
    STL:list用法详解
    STL:deque用法详解
    STL:vector容器用法详解
    Axure RP chrome插件显示已损坏或者无法安装的解决方法
    怎样知道自己机器的出口网关IP(即外部IP)
    [Selenium]怎样验证页面是否有无变化
    [Selenium]刷新页面 Refresh page
    [SoapUI]怎样获取隐藏元素的文本内容Get text of hidden element
    [SoapUI]怎样从应答报文中获取某个字段的值,然后用其改写某个变量
  • 原文地址:https://www.cnblogs.com/ding0910/p/1642347.html
Copyright © 2011-2022 走看看