Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, when using hr user exercises to create a new database, the following error occurred during set autotrace on

Because there is no PLUSTRACE permission.

Involving @ ORACLE_HOME/sqlplus/admin/plustrce.sql files

The contents are as follows

-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. Find out if the role exists in the database

SQL > select * from dba_roles where role='PLUSTRACE'; no rows selected

two。 Create 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. Query database

SQL > select * from dba_roles where role='PLUSTRACE';ROLE PASSWORD AUTHENTICAT-- PLUSTRACE NO NONE

4. Grant the operation user the right to change

SQL > grant plustrace to hr;Grant succeeded.

5. Use hr users to test for success

SQL > conn hr/hrConnected.SQL > SQL > set autotrace on

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report