ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 默认口令和回滚段信息查询脚本

默认口令和回滚段信息查询脚本

原创 Linux操作系统 作者:hxcqu 时间:2008-09-25 17:37:43 0 删除 编辑

1.1.    检查9i默认用户使用默认口令的脚本

select username "User(s) with Default Password!", account_status "Status"

  from dba_users

 where password in ('E066D214D5421CCC', -- dbsnmp

        '24ABAB8B06281B4C', -- ctxsys

        '72979A94BAD2AF80', -- mdsys

        '9AAEB2214DCC9A31', -- mdsys

        'C252E8FA117AF049', -- odm

        'A7A32CD03D3CE8D5', -- odm_mtr

        '88A2B2C183431F00', -- ordplugins

        '7EFA02EC7EA6B86F', -- ordsys

        '9B616F5489F90AD7', -- ordcommon

        '4A3BA55E08595C81', -- outln

        'F894844C34402B67', -- scott

        '3F9FBD883D787341', -- wk_proxy

        '79DF7A1BD138CF11', -- wk_sys

        '7C9BA362F8314299', -- wmsys

        '88D8364765FCE6AF', -- xdb

        'F9DA8977092B7B81', -- tracesvr

        '9300C0977D7DC75E', -- oas_public

        'A97282CE3D94E29E', -- websys

        'AC9700FD3F1410EB', -- lbacsys

        'E7B5D92911C831E1', -- rman

        'AC98877DE1297365', -- perfstat

        '66F4EF5650C20355', -- exfsys

        '84B8CBCA4D477FA3', -- si_informtn_schema

        'D4C5016086B2DC6A', -- sys

        '5638228DAF52805F', -- sys

        'D4DF7931AB130E37'); -- system

输出结果

User(s) with Default Password! Status

------------------------------ --------------------------------

DBSNMP                         OPEN

SCOTT                          OPEN

OUTLN                          EXPIRED & LOCKED

WMSYS                          EXPIRED & LOCKED

ORDSYS                         EXPIRED & LOCKED

ORDPLUGINS                     EXPIRED & LOCKED

MDSYS                          EXPIRED & LOCKED

XDB                            EXPIRED & LOCKED

ODM                            EXPIRED & LOCKED

ODM_MTR                        EXPIRED & LOCKED

 

10 rows selected.

 

 

1.2.    查看9i回滚段信息

set feed off

set pause off

col nm format a7 heading 'Name' trunc

col ex format 999 headin 'NrEx'

col rs format a7 heading 'Size'

col init format 999,999 heading 'Init'

col next format 999,999 heading 'Next'

col mi format 999 heading 'MinE'

col ma format 999999 heading 'MaxE'

col op format 99,999,999 heading 'Opt size'

col pct format 990 heading 'PctI'

col st format a4 heading 'Stat'

col sn format a15 heading 'Segm Name'

col ts format a12 heading 'In TabSpace'

col fn format a45 heading 'File containing header of rbs'

col ow format a4  heading 'Ownr'

 

prompt All Rollback Segments

select segment_name sn, decode(owner,'PUBLIC','Publ','Priv') ow,

       tablespace_name ts, name fn

from sys.dba_rollback_segs d, v$datafile f

where d.file_id = f.file#;

 

prompt

prompt Online Rollback Segments:

select d.segment_name nm,

       s.extents ex,

       (s.rssize/1024)||'K' rs,

       d.initial_extent init,

       d.next_extent next,

   d.pct_increase pct,

       d.min_extents mi,

       d.max_extents ma,

optsize op,

       decode(d.status,'ONLINE','OnL','OFFLINE','OffL') st

from v$rollname n, v$rollstat s, sys.dba_rollback_segs d

where n.usn = s.usn

and   d.segment_name = n.name(+);

set feed on

/* End of eval_rbs.sql */

 

输出结果

All Rollback Segments

 

Segm Name       Ownr In TabSpace  File containing header of rbs

--------------- ---- ------------ ---------------------------------

SYSTEM          Priv SYSTEM       /dev/vg_sys/rsystem

_SYSSMU2$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU3$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU4$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU5$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU6$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU8$       Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU10$      Publ UNDOTBS1     /dev/vg_undo/rundo1

_SYSSMU11$      Publ UNDOTBS1     /dev/vg_undo/rundo1

…………………

_SYSSMU371$     Publ UNDOTBS1     /dev/vg_undo/rundo4

 

Online Rollback Segments:

 

Name    NrEx Size        Init     Next PctI MinE    MaxE    Opt size Stat

------- ---- ------- -------- -------- ---- ---- ------- ----------- ----

SYSTEM     7 440K     114,688                  1   32765             OnL

_SYSSMU  100 211064K  131,072                  2   32765             OnL

_SYSSMU   89 181368K  131,072                  2   32765             OnL

_SYSSMU   88 169080K  131,072                  2   32765             OnL

_SYSSMU   72 159864K  131,072                  2   32765             OnL

_SYSSMU   84 150648K  131,072                  2   32765             OnL

_SYSSMU   67 136312K  131,072                  2   32765             OnL

_SYSSMU   77 146552K  131,072                  2   32765             OnL

_SYSSMU   76 149624K  131,072                  2   32765             OnL

_SYSSMU   61 232568K  131,072                  2   32765             OnL

_SYSSMU   78 149624K  131,072                  2   32765             OnL

_SYSSMU   79 175224K  131,072                  2   32765             OnL

_SYSSMU   85 152696K  131,072                  2   32765             OnL

_SYSSMU   52 174200K  131,072                  2   32765             OnL

……………………

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/195785/viewspace-464347/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-09-08

  • 博文量
    11
  • 访问量
    56817