分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
查看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> 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 OPENSYSTEM OPENOUTLN EXPIRED & LOCKEDMGMT_VIEW EXPIRED & LOCKEDFLOWS_FILES EXPIRED & LOCKEDMDSYS EXPIRED & LOCKEDORDSYS EXPIRED & LOCKEDEXFSYS EXPIRED & LOCKEDDBSNMP EXPIRED & LOCKEDWMSYS EXPIRED & LOCKEDAPPQOSSYS EXPIRED & LOCKEDAPEX_030200 EXPIRED & LOCKEDOWBSYS_AUDIT EXPIRED & LOCKEDORDDATA EXPIRED & LOCKEDCTXSYS EXPIRED & LOCKEDANONYMOUS EXPIRED & LOCKEDSYSMAN EXPIRED & LOCKEDXDB EXPIRED & LOCKEDORDPLUGINS EXPIRED & LOCKEDOWBSYS EXPIRED & LOCKEDSI_INFORMTN_SCHEMA EXPIRED & LOCKEDOLAPSYS EXPIRED & LOCKEDSCOTT EXPIRED & LOCKEDORACLE_OCM EXPIRED & LOCKEDXS$NULL EXPIRED & LOCKEDBI EXPIRED & LOCKEDPM EXPIRED & LOCKEDMDDATA EXPIRED & LOCKEDIX EXPIRED & LOCKEDSH EXPIRED & LOCKEDDIP EXPIRED & LOCKEDOE EXPIRED & LOCKEDAPEX_PUBLIC_USER EXPIRED & LOCKEDHR EXPIRED & LOCKEDSPATIAL_CSW_ADMIN_USR EXPIRED & LOCKEDSPATIAL_WFS_ADMIN_USR EXPIRED & LOCKED36 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 OPENSYSTEM OPENSH EXPIREDOUTLN EXPIRED & LOCKEDMGMT_VIEW EXPIRED & LOCKEDFLOWS_FILES EXPIRED & LOCKEDMDSYS EXPIRED & LOCKEDORDSYS EXPIRED & LOCKEDEXFSYS EXPIRED & LOCKEDDBSNMP EXPIRED & LOCKEDWMSYS EXPIRED & LOCKEDAPPQOSSYS EXPIRED & LOCKEDAPEX_030200 EXPIRED & LOCKEDOWBSYS_AUDIT EXPIRED & LOCKEDORDDATA EXPIRED & LOCKEDCTXSYS EXPIRED & LOCKEDANONYMOUS EXPIRED & LOCKEDSYSMAN EXPIRED & LOCKEDXDB EXPIRED & LOCKEDORDPLUGINS EXPIRED & LOCKEDOWBSYS EXPIRED & LOCKEDSI_INFORMTN_SCHEMA EXPIRED & LOCKEDOLAPSYS EXPIRED & LOCKEDSCOTT EXPIRED & LOCKEDORACLE_OCM EXPIRED & LOCKEDXS$NULL EXPIRED & LOCKEDBI EXPIRED & LOCKEDPM EXPIRED & LOCKEDMDDATA EXPIRED & LOCKEDIX EXPIRED & LOCKEDDIP EXPIRED & LOCKEDOE EXPIRED & LOCKEDAPEX_PUBLIC_USER EXPIRED & LOCKEDHR EXPIRED & LOCKEDSPATIAL_CSW_ADMIN_USR EXPIRED & LOCKEDSPATIAL_WFS_ADMIN_USR EXPIRED & LOCKED36 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 OPENSYSTEM OPENSH OPENOUTLN EXPIRED & LOCKEDMGMT_VIEW EXPIRED & LOCKEDFLOWS_FILES EXPIRED & LOCKEDMDSYS EXPIRED & LOCKEDORDSYS EXPIRED & LOCKEDEXFSYS EXPIRED & LOCKEDDBSNMP EXPIRED & LOCKEDWMSYS EXPIRED & LOCKEDAPPQOSSYS EXPIRED & LOCKEDAPEX_030200 EXPIRED & LOCKEDOWBSYS_AUDIT EXPIRED & LOCKEDORDDATA EXPIRED & LOCKEDCTXSYS EXPIRED & LOCKEDANONYMOUS EXPIRED & LOCKEDSYSMAN EXPIRED & LOCKEDXDB EXPIRED & LOCKEDORDPLUGINS EXPIRED & LOCKEDOWBSYS EXPIRED & LOCKEDSI_INFORMTN_SCHEMA EXPIRED & LOCKEDOLAPSYS EXPIRED & LOCKEDSCOTT EXPIRED & LOCKEDORACLE_OCM EXPIRED & LOCKEDXS$NULL EXPIRED & LOCKEDBI EXPIRED & LOCKEDPM EXPIRED & LOCKEDMDDATA EXPIRED & LOCKEDIX EXPIRED & LOCKEDDIP EXPIRED & LOCKEDOE EXPIRED & LOCKEDAPEX_PUBLIC_USER EXPIRED & LOCKEDHR EXPIRED & LOCKEDSPATIAL_CSW_ADMIN_USR EXPIRED & LOCKEDSPATIAL_WFS_ADMIN_USR EXPIRED & LOCKED36 rows selected.
查看SH用户有哪些表?
sh@TEST0924> select * from tab;TNAME TABTYPE CLUSTERID------------------------------ ------- ----------1_EMP TABLEBIN$51XUts/lTCDgQwEAAH/BlA==$0 TABLECAL_MONTH_SALES_MV TABLECHANNELS TABLECOSTS TABLECOUNTRIES TABLECUSTOMERS TABLEDIMENSION_EXCEPTIONS TABLEDR$SUP_TEXT_IDX$I TABLEDR$SUP_TEXT_IDX$K TABLEDR$SUP_TEXT_IDX$N TABLEDR$SUP_TEXT_IDX$R TABLEEMP_1 TABLEEMP_2 TABLEEMP_3 TABLEFWEEK_PSCAT_SALES_MV TABLEINVOICE TABLENEW_SALES TABLEPRICE_LIST TABLEPRODUCTS TABLEPROFITS VIEWPROMOTIONS TABLESALES TABLESALES_TRANSACTIONS_EXT TABLESUPPLEMENTARY_DEMOGRAPHICS TABLETIMES TABLETRANSACTIONS TABLETRANSACTIONS1 TABLE28 rows selected.
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/2e19ffb3303a490d20ea5d00dd397156.gif)