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

Source: Internet
Author: User

The following error occurred when set autotrace on when creating a new database using the HR user practice today

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/91/wKiom1VMTV6jNe2CAADbseerzf8259.jpg "title=" 2015-05-08_134400.png "alt=" Wkiom1vmtv6jne2caadbseerzf8259.jpg "/>

Because there's no plustrace permission.

Related to @oracle_home/sqlplus/admin/plustrce.sql file

The contents are as follows

-- description--   creates a role with access to dynamic  PERFORMANCE TABLES--   FOR THE SQL*PLUS SET AUTOTRACE&NBSP, .....  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. Find out if the role is in the database

Sql> SELECT * from Dba_roles where role= ' plustrace '; No rows selected

2. Build roles (using SYS users)

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. Querying the database

Sql> SELECT * from Dba_roles where role= ' plustrace '; ROLE PASSWORD authenticat-------------------------------------------------plustrace nonone

4. Grant the Operation user permission to change

Sql> Grant plustrace to HR; Grant succeeded.

5. Use HR user tests for Success

Sql> Conn hr/hrconnected.sql> sql> set autotrace on


This article is from "The girl said" blog, please be sure to keep this source http://sugarlovecxq.blog.51cto.com/6707742/1649573

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

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.