oracle提示SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
2013-11-23 18:41
393 查看
scott@ORCL> set autotrace on
SP2-0618: Cannot find the Session Identifier. CheckPLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
sys@ORCL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
这是缺少PLUSTRACE 角色的原因,oracle没有自动帮你创建它,但oracle已写好了创建脚本,须要你自己去调用创建。
在$ORACLE_HOME/sqlplus/admin/plustrce.sql
vim $ORACLE_HOME/sqlplus/admin/plustrce.sql
-- the AUTOTRACE feature should be granted thePLUSTRACE role by
-- the DBA.
-- USAGE
-- sqlplus "sys/knl_test7 as sysdba"@plustrce
--
-- Catalog.sql must have been run before this fileis run.
-- This file must be run while connected to a DBAschema.
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
所以只要用sys调用一下该脚本便可以
sys@ORCL>@/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin/plustrce.sql
现在就可以把该角色授权给普通用户,让他们也能set autotrace on
sys@ORCL> grant plustrace to scott;
SP2-0618: Cannot find the Session Identifier. CheckPLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
sys@ORCL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
这是缺少PLUSTRACE 角色的原因,oracle没有自动帮你创建它,但oracle已写好了创建脚本,须要你自己去调用创建。
在$ORACLE_HOME/sqlplus/admin/plustrce.sql
vim $ORACLE_HOME/sqlplus/admin/plustrce.sql
-- the AUTOTRACE feature should be granted thePLUSTRACE role by
-- the DBA.
-- USAGE
-- sqlplus "sys/knl_test7 as sysdba"@plustrce
--
-- Catalog.sql must have been run before this fileis run.
-- This file must be run while connected to a DBAschema.
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
所以只要用sys调用一下该脚本便可以
sys@ORCL>@/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin/plustrce.sql
现在就可以把该角色授权给普通用户,让他们也能set autotrace on
sys@ORCL> grant plustrace to scott;
相关文章推荐
- Oracle 10g Auto Trace安装及SP2-0618和_SP2-0611错误处理
- 【Oracle】SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
- win7下登陆oracle10g提示:(SP2-1503: 无法初始化Oracle 调用界面;SP2-1503: 无法初始化Oracle 调SP2-0152)
- 【ORACLE错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- Oracle运行set autotrace on报错SP2-0618、SP2-0611
- Oracle Error 之SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- oracle+关于"SP2-0618:+无法找到会话标识符。启用检查+PLUSTRACE+角色"错误
- oracle+关于"SP2-0618:+无法找到会话标识符。启用检查+PLUSTRACE+角色"错误
- Oracle 使用scott用户 set autotrace on报错 SP2-0618,SP2-0611
- [Oracle] SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
- Oracle 10g安装简要提示
- 远程终端安装Windows Server 2003 SP2 x64后出现提示0x8007007f,许可证错误
- 运行项目提示oracle 需要安装 8.17 版本以上
- SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Ora
- Oracle输入用户名和密码,点击登录出现空白提示框
- Oracle Hint(提示)和INDEX(索引)的一些忠告
- oracle提示TNS:无监听程序的解决办法
- Maven打包提示“软件包 oracle.jdbc 不存在”
- system.data.oracleclinet连接方式在X64位的机器上提示TNS错误
- SP2-0611 and SP2-0618报错解决