zoukankan      html  css  js  c++  java
  • insufficient privileges for 'SYS' when 'shutdown immediate'

    SQL> select * from v$version;

    BANNER
    -------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> conn / as sysdba
    已连接。
    SQL> set autot on;
    SQL> select count(*) from session_privs;

      COUNT(*)
    ----------
           208


    执行计划
    ----------------------------------------------------------
    Plan hash value: 3293442843

    ---------------------------------------------------------------------------------------------
    | Id  | Operation          | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |                        |     1 |    31 |     1   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |                        |     1 |    31 |            |          |
    |   2 |   NESTED LOOPS     |                        |     1 |    31 |     1   (0)| 00:00:01 |
    |*  3 |    FIXED TABLE FULL| X$KZSPR                |     1 |    26 |     0   (0)| 00:00:01 |
    |*  4 |    INDEX RANGE SCAN| I_SYSTEM_PRIVILEGE_MAP |     1 |     5 |     1   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------

    Predicate Information (identified by operation id):
    ---------------------------------------------------

       3 - filter("INST_ID"=USERENV('INSTANCE'))
       4 - access("SPM"."PRIVILEGE"=(-"KZSPRPRV"))


    统计信息
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            431  bytes sent via SQL*Net to client
            419  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed

    SQL> shutdown immediate;
    ORA-01097: 无法在事务处理过程中关闭 - 请首先提交或回退
    SQL> set autot off;
    SQL> shutdown immediate
    ORA-01031: insufficient privileges
    SQL> show user;
    USER is "SYS"
    SQL> select count(*) from session_privs;

      COUNT(*)
    ----------
           200
    SQL> create table tmp_session_privs as select * from session_privs;

    表已创建。

    SQL> conn / as sysdba
    已连接。
    SQL> select * from session_privs s where not exists (select 1 from tmp_session_privs t where s.privilege=t.privilege);

    PRIVILEGE
    --------------------------------------------------------------------------------
    SYSOPER
    EXEMPT ACCESS POLICY
    ANALYZE ANY DICTIONARY
    SELECT ANY DICTIONARY
    EXEMPT IDENTITY POLICY
    ALTER DATABASE LINK
    SYSDBA
    ALTER PUBLIC DATABASE LINK

    已选择8行。

  • 相关阅读:
    redis 写入数据 越来越慢 是什么原因
    redis slowlog
    JavaCC 规格严格
    Lucene 规格严格
    数据库建立索引要点 规格严格
    编辑距离 规格严格
    Lucene NRT (Near Real Time) 规格严格
    事件关联 规格严格
    linux下mysql5.5.19编译安装笔记【已验证】 规格严格
    关于CLOSE BY CLIENT STACK TRACE 规格严格
  • 原文地址:https://www.cnblogs.com/princessd8251/p/3536013.html
Copyright © 2011-2022 走看看