【ORACLE错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
2018-01-09 11:48
567 查看
执行set autotrace traceonly的时候,报错
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
切换到sysdba下,授予权限
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> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
执行完后
查看该sql脚本的内容:
-----------------------------------------------------------------------------------------------------------
[oracle@zhang admin]$ more 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
------------------------------------------------------------------------------------------------
手动执行下面的sql,可以手动生成role
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
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> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> set autotrace traceonly
成功,没有报错了
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
切换到sysdba下,授予权限
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> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
执行完后
查看该sql脚本的内容:
-----------------------------------------------------------------------------------------------------------
[oracle@zhang admin]$ more 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
------------------------------------------------------------------------------------------------
手动执行下面的sql,可以手动生成role
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
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> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> set autotrace traceonly
成功,没有报错了
相关文章推荐
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier.Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- plsql(autotrace)-SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- plsql(autotrace)-SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is
- SP2-0618:SP2-0611 Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier.
- SP2-0618: Cannot find the Session Identifier.
- SP2-0618: Cannot find the Session Identifier
- 错误提示: The project was not built since its build path is incomplete. Cannot find the class file for j
- 【Oracle】SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
- Eclipse错误提示:The project was not built since its build path is incomplete. Cannot find the class file
- php编译错误Note that the MySQL client library is not bundled anymore或者cannot find mysql header file