zoukankan      html  css  js  c++  java
  • Oracle_11g中解决被锁定的scott用户的方法(转载)

     转自:http://www.2cto.com/database/201402/277206.html

    Oracle 11g中修改被锁定的用户:scott

    在安装完Oracle11g和创建完oracle数据库之后,想用数据库自带的用户scott登录,看看连接是否成功。

    在cmd命令中,用“sqlplus  scott/ tiger”登录时,

    老是提示如下信息: ERROR:ORA-28000:账户已被锁定。

    在cmd命令提示符中可直接登录oracle,输入如下命令:

    sqlplus / as sysdba;

    接着执行如下命令:

    SQL> alter user scott account unlock;

    显示用户已更改,这样就完成解锁的操作。

    接下来,你还可以重新给scott这个用户设定密码

    修改scott的登录密码

    SQL> alter user scott identified by grace;

    显示用户已更改,(grace为新的密码) 这样就OK了,

    测试一下scott/grace能否成功登录

    SQL> conn scott/grace 显示已连接。


    初学Oracle 数据库的小总结:

    在cmd命令中输入sqlplus可以连接数据库,

    其格式为: sqlplus 用户名/密码 

    如:sqlplus scott/tiger;

    在SQL Plus 中输入conn可以连接数据库,

    其格式为: SQL> conn 用户名/密码

    如:conn scott/tiger;

    在SQL Plus修改普通用户密码,

    其格式为: alter user 用户名 identified by 密码

    如:alter user scott identified by test;

    Oracle中给用户加锁与解锁的代码:

    SQL> alter user 用户名 account lock;(加锁)

    SQL> alter user 用户名 account unlock;(解锁)

  • 相关阅读:
    造数据
    自定义注解
    利用线程池,同步线程实现并发
    ThreadPoolExecutor 线程池
    velocity 模板
    [python] 解析xml文件
    url 中需要转义的字符
    Appium 坑
    TestNG 101
    【python】print · sys.stdout · sys.stderr
  • 原文地址:https://www.cnblogs.com/wolfplan/p/3875866.html
Copyright © 2011-2022 走看看