Creating Plustrace roles in a sql*plus environment

Source: Internet
Author: User
Tags sqlplus

When a normal user opens Autotrace report in Sql*plus, he encounters Sp2-0618:cannot find the Session Identifier. Check plustrace role is enabled error. As shown below:

Sql>

Sql> set autotrace on;

Sp2-0618:cannot find the Session Identifier. Check plustrace role is enabled

Sp2-0611:error Enabling STATISTICS Report

Sql>

At this point, you should check that the database has created the role Plustrace, using the following script to check if the role Plustrace exists.

SELECT * from Dba_roles WHERE role= ' Plustrace '

If the role does not exist, you should go to the $oracle_home/sqlplus/admin/directory and you will find the Plustrce.sql script file.

[[Email protected] ~]$ CD $ORACLE _home/sqlplus/admin/
Admin] $ ls
Glogin. SQL help Iplus libisqlplus.def libsqlplus.def Plustrce. SQL pupbld. SQL
Admin] $ more plustrce. SQL
--
--Copyright (c) Oracle Corporation 1995, 2002. All rights Reserved.
--
--NAME
--Plustrce. SQL
--
--DESCRIPTION
role  with  to Dynamic Performance Tables
 for SQL SET STATISTICS command.
 After  each User  to
role  by
-The DBA.
--
--USAGE
 as SYSDBA "@plustrce
--
--Catalog.sql must has been run before this file is run.
file  while  to schema.
Set  on
Drop role Plustrace;
Create role Plustrace;
Grant Select  on  to Plustrace;
Grant Select  on  to Plustrace;
Grant Select  on  to Plustrace;
Grant  to  with Admin option;
Set echo off

Executing the script creates the role Plustrace, as shown below. You can then grant the role to the corresponding user.

Creating Plustrace roles in a sql*plus environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.