金和顺娱乐平台-密苏里有什么大学

首页

AD联系:507867812

金和顺娱乐平台

时间:2019-11-20 02:07:18 作者:金沙糖果手机派对下载 浏览量:53662

金和顺娱乐平台ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例,见下图

ORA-02030问题解决方法又一例

ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux,见下图

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux,如下图

ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

如下图

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux,如下图

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux,见图

金和顺娱乐平台

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

ORA-02030问题解决方法又一例

ORA-02030问题解决方法又一例

ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例。

ORA-02030问题解决方法又一例

金和顺娱乐平台ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

ORA-02030问题解决方法又一例

1.

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

2.

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

3.

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

4.

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linuxORA-02030问题解决方法又一例ORA-02030问题解决方法又一例ORA-02030问题解决方法又一例

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux。金和顺娱乐平台

展开全文
相关文章
来博国际娱乐

ORA-02030问题解决方法又一例

亚洲网上娱乐

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux....

博彩论坛那个人最多

ORA-02030问题解决方法又一例....

茗彩娱乐平台官网

ORA-02030问题解决方法又一例....

大38娱乐平台

ORA-02030问题解决方法又一例....

相关资讯
娱乐注册送50

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux....

优德体育w88中午手机版

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux....

百家乐破解方法

给普通用户赋予对v$视图的查询权限,结果报 ORA-02030 错误ORA-02030: 只能从固定的表/视图查询(ORA-02030: can only select from fixed tables/views)问题背景:在一个dba用户下的存储过程中需要使用v$的视图(v$client_stats)使用命令行测试:SQL> variable total number;SQL> begin 2 select count(1) into :total from v$client_stats; 3 dbms_output.put_line('total = '|| :total); 4 end; 5 / PL/SQL procedure successfully completedtotal---------0这样并没有问题,于是编辑成过程执行使用过程SQL> create or replace procedure p_test 2 authid current_user 3 as 4 v_all number := 9999; 5 begin 6 select count(1) 7 into v_all from v$client_stats; 8 9 dbms_output.put_line('v_all =' ||v_all ); 10 end; 11 / Warning: Procedure created with compilation errors具体错位信息Compilation errors for PROCEDURE ZHANGBIN.P_TESTError: PL/SQL: ORA-00942: 表或视图不存在Line: 9Text: FROM v$client_stats;

Error: PL/SQL: SQL Statement ignoredLine: 7Text: SELECT COUNT(1)此时需要给用户赋查询权限(于是产生了ORA-02030错误)SQL> show user;User is "SYS"SQL> grant select on v$client_stats to zhangbin; grant select on v$client_stats to zhangbin ORA-02030: 只能从固定的表/视图查询解决方法:SQL> select * from dba_synonyms t where t.synonym_name = 'V$CLIENT_STATS'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK------------------------------ ------------------------------ ------------------------------ ------------------------------ -----------PUBLIC V$CLIENT_STATS SYS V_$CLIENT_STATS SQL> grant select on V_$CLIENT_STATS to zhangbin; Grant succeeded切换到普通用户SQL> show user;User is "zhangbin"SQL> create or replace procedure p_test 2 as 3 v_all number :=9999; 4 begin 5 select count(1) 6 into v_all 7 from v$client_stats; 8 dbms_output.put_line('v_all =' ||v_all ); 9 end; 10 / Procedure created SQL> set serveroutput onSQL> exec p_test; v_all =0 PL/SQL procedure successfully completed

Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm

在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Debian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux....

热门资讯