Home Database Mysql Tutorial plsql dev中Dynamic Performance Tables not accessible分析解决

plsql dev中Dynamic Performance Tables not accessible分析解决

Jun 07, 2016 pm 03:43 PM
dev dynamic performance plsql

plsql dev中Dynamic Performance Tables not accessible分析解决 相信很多使用plsql dev的朋友多遇到过类此如下面的提示: Dynamic Performance Tables not accessible,Automatic Statistics Disabled for this session You can disable statistics in the pr

plsql dev中Dynamic Performance Tables not accessible分析解决

相信很多使用plsql dev的朋友多遇到过类此如下面的提示:

Dynamic Performance Tables not accessible,Automatic Statistics Disabled for this session You can disable statistics in the preference menu,or obtanin selectpriviliges on the v$session,v$sesstat and v$statname tables

一、产生该提示原因
plsql dev在用户运行过程中,要收集用户统计信息,但是由于你现在登录的用户没有访问v$session,v$sesstat and v$statname视图的权限,所以不能收集当前用户的统计信息,和plsql dev工具中配置的Automatic Statistics相冲突,所以就出现了这个提示,试验验证:

[oracle@xifenfei ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 10 04:31:57 2011Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionssys@XFF>create user chf identified by xifenfei;User created.sys@XFF>grant create session,resource to chf;Grant succeeded.sys@XFF>conn chf/xifenfeiConnected.chf@XFF>select * from session_privs;PRIVILEGE----------------------------------------CREATE SESSIONUNLIMITED TABLESPACECREATE TABLECREATE CLUSTERCREATE SEQUENCECREATE PROCEDURECREATE TRIGGERCREATE TYPECREATE OPERATORCREATE INDEXTYPE10 rows selected.chf@XFF>SELECT TABLE_NAME FROM USER_TAB_PRIVS;no rows selected

创建一个chf用户,授权create session,resource,无v$session,v$sesstat and v$statname视图访问权限,使用plsql dev登录并查询user_tables表(登录时不会提示,只有用户执行了查询或者相关类此操作时候才会提示)
plsql dev中Dynamic Performance Tables not accessible分析解决

二、解决问题
根据警告提示,可以有两种方法解决这种警告
1、关闭plsql dev统计功能
在 Tools->Preferences->Options里 把Automatic Statistics前的那个勾子去掉,保存
2、给访问用户授权访问相关视图
授权访问v_$session,v_$sesstat,v_$statname,注意不能直接对v$视图进行授权

chf@XFF>conn / as sysdbaConnected.sys@XFF>grant select on v_$session to chf;Grant succeeded.sys@XFF>grant select on v_$sesstat to chf;Grant succeeded.sys@XFF>grant select on v_$statname to chf;Grant succeeded.sys@XFF>conn chf/xifenfeiConnected.chf@XFF>SELECT TABLE_NAME FROM USER_TAB_PRIVS;TABLE_NAME------------------------------V_$SESSIONV_$SESSTATV_$STATNAME

三、问题分析
通过上面的解决方法,为什么授权访问v$session,v$sesstat and v$statname视图就可以Statistics用户的信息了呢?请见下面的两张图
图1:通过plsql dev中的tools–>session选项看用户统计信息
plsql dev中Dynamic Performance Tables not accessible分析解决
图2:通过sql语句查询用户统计信息
plsql dev中Dynamic Performance Tables not accessible分析解决
通过两张图的比较可能会发现,他们的数值有一点点出入,那是因为我先通过tools查询出用户统计信息,再通过sql查询,所以图1中的数据有些选项会比图2小那么一点点,通过对v$session,v$sesstat and v$statname视图分析,发现其实plsql dev就是通过下面sql实现统计功能,也从而进一步说明了,为什么plsql dev收集统计信息需要对v$session,v$sesstat and v$statname视图授于访问权限

SELECT C.NAME, B.STATISTIC#, B.VALUE FROM V$SESSION A, V$SESSTAT B, V$STATNAME C WHERE A.SID = B.SID AND A.AUDSID = USERENV('SESSIONID') AND B.STATISTIC# = C.STATISTIC# ORDER BY C.STATISTIC#;
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to win10 snmp installation failure error code 0x8024402C Solution to win10 snmp installation failure error code 0x8024402C Feb 13, 2024 am 08:30 AM

The snmp protocol is a simple network management protocol. This protocol can support the network management system and is used to monitor whether the devices connected to the network have any situation that causes management concern. However, many users have recently reported that the win10 installation of snmp failed with the error code 0x8024402C. what to do? Users can start Powershell as an administrator to set up. Let this site carefully introduce to users the solution to the error code 0x8024402C when installing snmp in win10. Solution to win10 snmp installation failure error code 0x8024402C 1. Start Powershell as administrator 1. The first step is to run the win10 system

Detailed tutorial on installing Carla on Ubuntu 20.04 system. Detailed tutorial on installing Carla on Ubuntu 20.04 system. Feb 19, 2024 pm 08:20 PM

Carla is an open source autonomous driving simulation platform designed for developing and testing autonomous driving algorithms. The following is a detailed tutorial for installing Carla on Ubuntu20.04 system: Install dependencies: Open a terminal window and run the following command to install Carla’s dependencies: sudoaptupdatesudoaptinstall-ybuild-essentialclang-10llvm-10python3-pippython3-devlibpng-devlibjpeg-devlibtiff5-devlibopenexr -devlibhdf5-devlibsquish-de

How to use Dynamic Datasource to configure multiple data sources in SpringBoot How to use Dynamic Datasource to configure multiple data sources in SpringBoot May 16, 2023 pm 07:07 PM

Functional features: Supports data source grouping, suitable for various scenarios, pure multi-database read and write separation, one master and multiple slave hybrid mode. Supports startup without data source and configuration of lazy startup data source (3.3.2+). Supports database sensitive configuration information encryption ENC(). Supports independent initialization of table structure schema and database database for each database. Supports custom annotations and needs to inherit DS (3.2.0+). Provides fast integration for Druid, Mybatis-Plus, P6sy, Jndi. Simplify Druid and HikariCp configuration and provide global parameter configuration. Configure once and use it globally. Provide customized data source source scheme. Provides a solution to dynamically add and remove data sources after the project is started. Provide M

Switching from the Win11 Dev Channel to Win11 Beta is available for a limited time – here's how Switching from the Win11 Dev Channel to Win11 Beta is available for a limited time – here's how May 10, 2023 pm 06:52 PM

With the rollout of Windows 11 build 22581 to the Dev and Beta channels yesterday, this action indicates that the Dev channel will soon be moved to the CU (Copper) development branch, believed to be SunValley 3 or the third version of Windows 11 scheduled to be released sometime in 2023. The Beta channel will now use builds from the NI (Nickel) development branch, which is planned for the SunValley 2 development release later this year, or 22H2. So while they are currently the same version, if you want a more stable build you may want to consider moving to the Beta channel or even a Release Preview

Ubuntu compilation and installation pcl tutorial. Ubuntu compilation and installation pcl tutorial. Mar 16, 2024 am 11:52 AM

Compiling and installing PCL (PointCloudLibrary) is a way to install on Ubuntu with custom options. Here is a basic tutorial: Install dependencies: Before you start compiling PCL, you need to install some necessary dependencies. Open a terminal and run the following command: sudoapt-getupdatesudoapt-getinstallgitbuild-essentiallinux-libc-devcmakecmake-guilibusb-1.0-0-devlibusb-devlibudev-devmpi-default-devopenmpi-bin

Why is Tiny11 Windows so small but very secure without TPM and Secure Boot? - According to Dev's explanation Why is Tiny11 Windows so small but very secure without TPM and Secure Boot? - According to Dev's explanation Apr 23, 2023 pm 01:55 PM

Tiny Windows 11 While many people like the look or feel of Windows 11, some just want to cut back on what they consider to be bloat because their hardware may not be powerful enough to run the new operating system smoothly, or just for fun. A popular third-party Windows 11 tweak and customization app called ThisIsWin11 (TIW11) evolved into Debloos or DebloatOS, which, as the name suggests, allows the operating system to debloat. If someone isn't comfortable tweaking things themselves with it, they can also opt for Tiny11, which was released earlier today. This stripped-down Windows11Pro22H2mod requires 8G

Microsoft releases Windows 11 build 25140 in Dev channel with fixes Microsoft releases Windows 11 build 25140 in Dev channel with fixes Apr 19, 2023 pm 05:22 PM

Microsoft is rolling out a new version of Windows 11 to Insiders registered in the Dev channel, bringing the build number to 25140. After last week's build introduced tabs in File Explorer, this update is more modest and focused on fixes for various issues. There is a more obvious improvement, and it has to do with the Euphemia font, which includes some languages ​​that use Canadian syllabic scripts, such as Inuktitut. The upgraded font makes more than 200 characters more legible and improves their on-screen rendering, plus it supports new characters that are part of the Unicode14 standard. Other than that, it's all fixes, including some focused on File Explorer tabs

Microsoft is reportedly developing a Dev Home app for Windows 11. Microsoft is reportedly developing a Dev Home app for Windows 11. May 16, 2023 am 11:31 AM

Late last year, we saw that Microsoft was pushing Windows 11 to Windows 1022H2 users through OOBE. The tech giant seems to want to use the out-of-the-box experience for bigger things, and we're going to look at one option now. Before we do that, be sure to check out this month's Patch Tuesday rollout. Microsoft released a total of fixes for CVEs in September. Windows 11 OOBE reveals a lot about its upcoming plans. As you know, a few days ago Microsoft released a special OOBE (Out of the Box Experience) update for Windows 11 2H2 and 21H2, as well as all supported versions of Windows 10. In fact, these new updates address some

See all articles