热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

oracle用户解锁

查看oracle实例有哪些用户?涉及的表为dba_users[oracle@rtest~]$sqlplusnologSQL*Plus:Release11.2.0.3.0ProductiononMonSep211:05:492013Copyright(c)1982,2011,Oracle.Allrightsreserved.idleconnassysdbaConnected.sys@TESTDB

查看oracle实例有哪些用户? 涉及的表为dba_users [oracle@rtest ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 2 11:05:49 2013Copyright (c) 1982, 2011, Oracle. All rights reserved.idle conn /as sysdbaConnected.sys@TESTDB

查看oracle实例有哪些用户?

涉及的表为dba_users

[oracle@rtest ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 2 11:05:49 2013

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

idle> conn /as sysdba
Connected.
sys@TESTDB> desc dba_users
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 USERNAME                                              NOT NULL VARCHAR2(30)
 USER_ID                                               NOT NULL NUMBER
 PASSWORD                                                       VARCHAR2(30)
 ACCOUNT_STATUS                                        NOT NULL VARCHAR2(32)
 LOCK_DATE                                                      DATE
 EXPIRY_DATE                                                    DATE
 DEFAULT_TABLESPACE                                    NOT NULL VARCHAR2(30)
 TEMPORARY_TABLESPACE                                  NOT NULL VARCHAR2(30)
 CREATED                                               NOT NULL DATE
 PROFILE                                               NOT NULL VARCHAR2(30)
 INITIAL_RSRC_CONSUMER_GROUP                                    VARCHAR2(30)
 EXTERNAL_NAME                                                  VARCHAR2(4000)
 PASSWORD_VERSIONS                                              VARCHAR2(8)
 EDITIONS_ENABLED                                               VARCHAR2(1)
 AUTHENTICATION_TYPE                                            VARCHAR2(8)


查看用户状态:

sys@TESTDB> select username,account_status from dba_users;

USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
SYS                            OPEN
SYSTEM                         OPEN
OUTLN                          EXPIRED & LOCKED
MGMT_VIEW                      EXPIRED & LOCKED
FLOWS_FILES                    EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
DBSNMP                         EXPIRED & LOCKED
WMSYS                          EXPIRED & LOCKED
APPQOSSYS                      EXPIRED & LOCKED
APEX_030200                    EXPIRED & LOCKED
OWBSYS_AUDIT                   EXPIRED & LOCKED
ORDDATA                        EXPIRED & LOCKED
CTXSYS                         EXPIRED & LOCKED
ANONYMOUS                      EXPIRED & LOCKED
SYSMAN                         EXPIRED & LOCKED
XDB                            EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
OWBSYS                         EXPIRED & LOCKED
SI_INFORMTN_SCHEMA             EXPIRED & LOCKED
OLAPSYS                        EXPIRED & LOCKED
SCOTT                          EXPIRED & LOCKED
ORACLE_OCM                     EXPIRED & LOCKED
XS$NULL                        EXPIRED & LOCKED
BI                             EXPIRED & LOCKED
PM                             EXPIRED & LOCKED
MDDATA                         EXPIRED & LOCKED
IX                             EXPIRED & LOCKED
SH                             EXPIRED & LOCKED
DIP                            EXPIRED & LOCKED
OE                             EXPIRED & LOCKED
APEX_PUBLIC_USER               EXPIRED & LOCKED
HR                             EXPIRED & LOCKED
SPATIAL_CSW_ADMIN_USR          EXPIRED & LOCKED
SPATIAL_WFS_ADMIN_USR          EXPIRED & LOCKED

36 rows selected.


比如解锁sh账户,sh账户为OCP考试需要用到的用户,SH账户里涉及的多张表在OCP有涉及考试。

目前SH的账户的状态为:EXPIRED & LOCKED

用以下命令给SH账户解锁:

sys@TESTDB> alter user sh account unlock; --解开LOCKED

sys@TESTDB> alter user sh identified by sh;--解开EXPIRED

sys@TESTDB> alter user sh account unlock;

User altered.

sys@TESTDB> select username,account_status from dba_users;

USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
SYS                            OPEN
SYSTEM                         OPEN
SH                             EXPIRED
OUTLN                          EXPIRED & LOCKED
MGMT_VIEW                      EXPIRED & LOCKED
FLOWS_FILES                    EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
DBSNMP                         EXPIRED & LOCKED
WMSYS                          EXPIRED & LOCKED
APPQOSSYS                      EXPIRED & LOCKED
APEX_030200                    EXPIRED & LOCKED
OWBSYS_AUDIT                   EXPIRED & LOCKED
ORDDATA                        EXPIRED & LOCKED
CTXSYS                         EXPIRED & LOCKED
ANONYMOUS                      EXPIRED & LOCKED
SYSMAN                         EXPIRED & LOCKED
XDB                            EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
OWBSYS                         EXPIRED & LOCKED
SI_INFORMTN_SCHEMA             EXPIRED & LOCKED
OLAPSYS                        EXPIRED & LOCKED
SCOTT                          EXPIRED & LOCKED
ORACLE_OCM                     EXPIRED & LOCKED
XS$NULL                        EXPIRED & LOCKED
BI                             EXPIRED & LOCKED
PM                             EXPIRED & LOCKED
MDDATA                         EXPIRED & LOCKED
IX                             EXPIRED & LOCKED
DIP                            EXPIRED & LOCKED
OE                             EXPIRED & LOCKED
APEX_PUBLIC_USER               EXPIRED & LOCKED
HR                             EXPIRED & LOCKED
SPATIAL_CSW_ADMIN_USR          EXPIRED & LOCKED
SPATIAL_WFS_ADMIN_USR          EXPIRED & LOCKED

36 rows selected.

sys@TESTDB> alter user sh identified by sh;

User altered.

sys@TESTDB> select username,account_status from dba_users;

USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
SYS                            OPEN
SYSTEM                         OPEN
SH                             OPEN
OUTLN                          EXPIRED & LOCKED
MGMT_VIEW                      EXPIRED & LOCKED
FLOWS_FILES                    EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
DBSNMP                         EXPIRED & LOCKED
WMSYS                          EXPIRED & LOCKED
APPQOSSYS                      EXPIRED & LOCKED
APEX_030200                    EXPIRED & LOCKED
OWBSYS_AUDIT                   EXPIRED & LOCKED
ORDDATA                        EXPIRED & LOCKED
CTXSYS                         EXPIRED & LOCKED
ANONYMOUS                      EXPIRED & LOCKED
SYSMAN                         EXPIRED & LOCKED
XDB                            EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
OWBSYS                         EXPIRED & LOCKED
SI_INFORMTN_SCHEMA             EXPIRED & LOCKED
OLAPSYS                        EXPIRED & LOCKED
SCOTT                          EXPIRED & LOCKED
ORACLE_OCM                     EXPIRED & LOCKED
XS$NULL                        EXPIRED & LOCKED
BI                             EXPIRED & LOCKED
PM                             EXPIRED & LOCKED
MDDATA                         EXPIRED & LOCKED
IX                             EXPIRED & LOCKED
DIP                            EXPIRED & LOCKED
OE                             EXPIRED & LOCKED
APEX_PUBLIC_USER               EXPIRED & LOCKED
HR                             EXPIRED & LOCKED
SPATIAL_CSW_ADMIN_USR          EXPIRED & LOCKED
SPATIAL_WFS_ADMIN_USR          EXPIRED & LOCKED

36 rows selected.


查看SH用户有哪些表?

sh@TEST0924> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
1_EMP                          TABLE
BIN$51XUts/lTCDgQwEAAH/BlA==$0 TABLE
CAL_MONTH_SALES_MV             TABLE
CHANNELS                       TABLE
COSTS                          TABLE
COUNTRIES                      TABLE
CUSTOMERS                      TABLE
DIMENSION_EXCEPTIONS           TABLE
DR$SUP_TEXT_IDX$I              TABLE
DR$SUP_TEXT_IDX$K              TABLE
DR$SUP_TEXT_IDX$N              TABLE
DR$SUP_TEXT_IDX$R              TABLE
EMP_1                          TABLE
EMP_2                          TABLE
EMP_3                          TABLE
FWEEK_PSCAT_SALES_MV           TABLE
INVOICE                        TABLE
NEW_SALES                      TABLE
PRICE_LIST                     TABLE
PRODUCTS                       TABLE
PROFITS                        VIEW
PROMOTIONS                     TABLE
SALES                          TABLE
SALES_TRANSACTIONS_EXT         TABLE
SUPPLEMENTARY_DEMOGRAPHICS     TABLE
TIMES                          TABLE
TRANSACTIONS                   TABLE
TRANSACTIONS1                  TABLE

28 rows selected.

推荐阅读
  • Linux环境下的PHP7安装与配置指南
    本文详细介绍了如何在Linux操作系统中安装和配置PHP7,包括检查当前PHP版本、升级PHP以及配置MySQL支持等步骤,适合后端开发者参考。 ... [详细]
  • 本文探讨了在Linux系统中尝试访问远程MySQL数据库时遇到的权限拒绝错误,特别是当使用非root用户进行连接时出现的'Access denied for user'错误。 ... [详细]
  • 本文旨在为初学者提供一个详细的指南,从零开始学习如何使用 ASP.NET MVC5 和 Entity Framework 6 (EF6) 搭建项目。通过逐步指导,帮助读者理解 MVC 架构的核心概念,并掌握基本的操作方法。 ... [详细]
  • 本文提供最新的CUUG OCP 071考试题库,包含70道题目,旨在帮助考生更好地准备Oracle Certified Professional (OCP) 考试。 ... [详细]
  • 查询技巧:获取数据库中第二高薪水的方法
    本文将介绍如何使用SQL查询语句从Employee表中提取出第二高的薪水(Salary)。例如,在给定的Employee表中,通过SQL查询可以正确返回200作为第二高的薪水。 ... [详细]
  • 本文探讨了如何利用Pandas库在Python中执行复杂的多条件左连接操作,特别是当需要基于不同列的不同键进行连接时的方法。 ... [详细]
  • 本文详细介绍如何在Spring Boot项目中集成和使用JPA,涵盖JPA的基本概念、Spring Data JPA的功能以及具体的操作步骤,帮助开发者快速掌握这一强大的持久化技术。 ... [详细]
  • 设计模式系列-原型模式
    一、上篇回顾上篇创建者模式中,我们主要讲述了创建者的几类实现方案,和创建者模式的应用的场景和特点,创建者模式适合创建复杂的对象,并且这些对象的每个组成部分的详细创建步骤可以是动态的变化的,但 ... [详细]
  • 抽象工厂模式 c++
    抽象工厂模式包含如下角色:AbstractFactory:抽象工厂ConcreteFactory:具体工厂AbstractProduct:抽象产品Product:具体产品https ... [详细]
  • 代码生成器实战教程:提升编程效率的利器
    本系列文章旨在通过一系列实践案例,详细介绍如何利用代码生成器提高开发效率。本文将引导您完成从下载安装到实际应用的全过程。 ... [详细]
  • UMPlatForm.NET 5.1 版本数据字典管理功能解析
    本文介绍了 UMPlatForm.NET 5.1 版本中的数据字典管理模块,探讨了该模块如何支持平台的数据共享与管理,以及如何通过用户和角色权限来增强系统的安全性。 ... [详细]
  • 本文探讨了SQLAlchemy ORM框架中如何利用外键和关系(relationship)来建立表间联系,简化复杂的查询操作。通过示例代码详细解释了relationship的定义、使用方法及其与外键的相互作用。 ... [详细]
  • 本文介绍了Android SDK Platform Tools的核心功能及其重要性。作为Android SDK的一个关键组成部分,Platform Tools提供了开发者与Android设备进行交互所需的各种工具。 ... [详细]
  • 本文档提供了详细的MySQL安装步骤,包括解压安装文件、选择安装类型、配置MySQL服务以及设置管理员密码等关键环节,帮助用户顺利完成MySQL的安装。 ... [详细]
  • 本文探讨了HTA(HTML Application)环境中HTML5 IndexedDB的可用性问题,并提供了一种替代方案,即通过使用COM ActiveX对象来实现数据存储功能。 ... [详细]
author-avatar
西单女孩超炫
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有