中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle set autot的權限設置方法

發布時間:2021-08-16 20:15:04 來源:億速云 閱讀:163 作者:chen 欄目:關系型數據庫

這篇文章主要講解了“oracle set autot的權限設置方法”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“oracle set autot的權限設置方法”吧!

建plustrace權限。普通用戶沒有這個權限不能進行autot

2010-01-17 16:55

SQL> conn scott/tiger
set Connected.
          
SQL> 
SQL> 
SQL> set autot on;
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn /as sysdba 
Connected.
SQL> grant plustrace to scott;
grant plustrace to scott
      *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> @?/sqlplus/admin/plustrce.sql
SQL> 
SQL> drop role plustrace;
drop role plustrace
          *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


SQL> create role plustrace;

Role created.

SQL> 
SQL> grant select on v_$sesstat to plustrace;

Grant succeeded.

SQL> grant select on v_$statname to plustrace;

Grant succeeded.

SQL> grant select on v_$mystat to plustrace;

Grant succeeded.

SQL> grant plustrace to dba with admin option;

Grant succeeded.

SQL> 
SQL> set echo off
SQL> show user;
USER is "SYS"
SQL> grant plustrace to scott;

Grant succeeded.

SQL> conn scott/tiger
Connected.
SQL> set autot on
SQL> set autot 
Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
SQL> set autot off
SQL>


[oracle@localhost ~]$ ls /opt/oracle/product/10g/sqlplus/admin/plustrce.sql 
/opt/oracle/product/10g/sqlplus/admin/plustrce.sql
[oracle@localhost ~]$ cat /opt/oracle/product/10g/sqlplus/admin/plustrce.sql 
--
-- Copyright (c) Oracle Corporation 1995, 2002. All Rights Reserved.
--
-- NAME
--   plustrce.sql
--
-- DESCRIPTION
--   Creates a role with access to Dynamic Performance Tables
--   for the SQL*Plus SET AUTOTRACE ... STATISTICS command.
--   After this script has been run, each user requiring access to
--   the AUTOTRACE feature should be granted the PLUSTRACE role by
--   the DBA.
--
-- USAGE
--   sqlplus "/ as sysdba" @plustrce
--
--   Catalog.sql must have been run before this file is run.
--   This file must be run while connected to a DBA schema.

set echo on

drop role plustrace;
create role plustrace;

grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$mystat to plustrace;
grant plustrace to dba with admin option;

set echo off
[oracle@localhost ~]$

感謝各位的閱讀,以上就是“oracle set autot的權限設置方法”的內容了,經過本文的學習后,相信大家對oracle set autot的權限設置方法這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

道孚县| 孟州市| 富裕县| 玉环县| 库尔勒市| 大城县| 莎车县| 内江市| 文登市| 阜城县| 芒康县| 安宁市| 永安市| 新巴尔虎右旗| 怀安县| 始兴县| 融水| 台州市| 鹤壁市| 永川市| 密云县| 太仆寺旗| 衡阳县| 南岸区| 綦江县| 遵义市| 柞水县| 肃北| 都兰县| 汉沽区| 双辽市| 饶河县| 佛教| 张掖市| 汉寿县| 荣成市| 镇赉县| 庐江县| 凤城市| 大方县| 池州市|