zoukankan      html  css  js  c++  java
  • oracle user locke

    1:管理员登录

    sqlplus sys/pwd as sysdba

    sql->alter user jd account unlock;

    commit;

    SQL> password new;
    Changing password for new
    New password: **
    Retype new password: ** (new)
    Password changed
    SQL>

    SQL> conn new/new;
    Connected.
    SQL>

    批量所用户

    SQL> select username, DEFAULT_TABLESPACE from dba_users;

    USERNAME                       DEFAULT_TABLESPACE
    ------------------------------ ------------------------------
    SYS                            SYSTEM
    SYSTEM                         SYSTEM
    DBSNMP                         SYSAUX
    SYSMAN                         SYSAUX
    SCOTT                          USERS
    MAX                            USERS
    HR                             USERS
    TEST                           TEST
    OUTLN                          SYSTEM
    FLOWS_FILES                    SYSAUX
    MDSYS                          SYSAUX

    USERNAME                       DEFAULT_TABLESPACE
    ------------------------------ ------------------------------
    ORDSYS                         SYSAUX
    EXFSYS                         SYSAUX
    WMSYS                          SYSAUX
    APPQOSSYS                      SYSAUX
    APEX_030200                    SYSAUX
    OWBSYS_AUDIT                   SYSAUX
    ORDDATA                        SYSAUX
    CTXSYS                         SYSAUX
    ANONYMOUS                      SYSAUX
    XDB                            SYSAUX
    ORDPLUGINS                     SYSAUX

    USERNAME                       DEFAULT_TABLESPACE
    ------------------------------ ------------------------------
    OWBSYS                         SYSAUX
    SI_INFORMTN_SCHEMA             SYSAUX
    OLAPSYS                        SYSAUX
    ORACLE_OCM                     USERS
    XS$NULL                        USERS
    BI                             USERS
    PM                             USERS
    MDDATA                         USERS
    IX                             USERS
    SH                             USERS
    DIP                            USERS

    USERNAME                       DEFAULT_TABLESPACE
    ------------------------------ ------------------------------
    OE                             USERS
    APEX_PUBLIC_USER               USERS
    SPATIAL_CSW_ADMIN_USR          USERS
    SPATIAL_WFS_ADMIN_USR          USERS

    37 rows selected.

    SQL> select 'alter user ' || username || ' account lock' || ';' from dba_users
      2  where default_tablespace  ='USERS'
      3  and username like 'H%'
      4  order by username ;

    'ALTERUSER'||USERNAME||'ACCOUNTLOCK'||';'
    -------------------------------------------------------
    alter user HR account lock;

    SQL> select 'alter user ' || username || ' account lock' || ';' from dba_users
      2  where default_tablespace in ('USERS','SYSTEM')
      3  and username like 'S%'
      4  order by username ;

    'ALTERUSER'||USERNAME||'ACCOUNTLOCK'||';'
    -------------------------------------------------------
    alter user SCOTT account lock;
    alter user SH account lock;
    alter user SPATIAL_CSW_ADMIN_USR account lock;
    alter user SPATIAL_WFS_ADMIN_USR account lock;
    alter user SYS account lock;
    alter user SYSTEM account lock;

    6 rows selected.

  • 相关阅读:
    C++防止头文件反复包括
    yppasswd, ypchfn, ypchsh
    yes
    Yacc
    xxd
    xpdf -Portable Document Format(PDF)文件阅读器
    xinetd
    xargs
    x25, PF_X25
    write -在一个文件描述符上执行写操作
  • 原文地址:https://www.cnblogs.com/newcoder/p/5013348.html
Copyright © 2011-2022 走看看