SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,今天新建数据库使用hr用户练习的时候,set autotrace on时出现以下错误是因为没有PLUSTRACE权限涉及到@ORACLE_HOME/sqlplus/admin/plustrce.sql
千家信息网最后更新 2026年10月31日SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
今天新建数据库使用hr用户练习的时候,set autotrace on时出现以下错误
是因为没有PLUSTRACE权限
涉及到@ORACLE_HOME/sqlplus/admin/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 "sys/knl_test7 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 ondrop 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
1. 查找数据库中是否有该角色
SQL> select * from dba_roles where role='PLUSTRACE'; no rows selected
2.建立角色 (使用sys用户)
SQL> @?/sqlplus/admin/plustrce.sqlSQL> SQL> drop role plustrace;drop role plustrace *ERROR at line 1:ORA-01919: role 'PLUSTRACE' does not existSQL> 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
3.查询数据库
SQL> select * from dba_roles where role='PLUSTRACE';ROLE PASSWORD AUTHENTICAT------------------------------ -------- -----------PLUSTRACE NO NONE
4.授予操作用户改权限
SQL> grant plustrace to hr;Grant succeeded.
5.使用hr用户测试是否成功
SQL> conn hr/hrConnected.SQL> SQL> set autotrace on
用户
数据
数据库
权限
角色
成功
内容
文件
时候
错误
时出
查询
测试
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网加科技
广东猪兼强互联网科技有限公司
齐家互联网科技
凡科互联网科技
鑫亿盛互联网科技
长亮科技互联网金融
互联网 新科技
科技伦理 互联网公司
互联网科技有哪些公司
崇明区互联网教育科技售后服务
苏州铭阳互联网科技有限公司
互联网保险科技创业
保险科技服务互联网营销体系
产业互联网科技服务公司
九思连强互联网电子科技有限公司
保山互联网科技靠谱吗
中国互联网公司的科技投入
平安好医生打造互联网科技医疗
黑龙江互联网科技公司
六子台科技互联网展会
哈尔滨大商圈互联网科技有限公司
科技互联网产品
卓越科技(互联网 )
时间互联网络科技
狮子座互联网科技培训
互联网校园科技培训
互联网科技大奖都有哪些公司
滨湖区互联网智能科技产品有哪些
上海钢联属于互联网科技股吗
雨阳互联网卡科技有限公司