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