create or replace procedure tttt is
begin
delete from ebills_gfzh.EX_CKXYZTZB;
end tttt;
10 个解决方案
#1
当然可以,报什么错误?
#2
报必须说明标识符ebills_gfzh.EX_CKXYZTZB,我的权限没有问题,这个SQL语句放在PL_SQL中单独执行没有问题!
#3
grant delete any table to user_name;
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from ebills_gfzh.EX_CKXYZTZB';
execute immediate str;
end tttt;
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from ebills_gfzh.EX_CKXYZTZB';
execute immediate str;
end tttt;
#4
执行不了,报表和视图不存在,何故!好像根本行不通!
#5
当然报错,当前用户没有足够权限,grant delete any table to user_name;
有没执行啊。
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from timecard.bb';
execute immediate str;
end tttt;
/
SQL> exec tttt;
begin tttt; end;
ORA-00942: 表或视图不存在
ORA-06512: 在"ZDWY.TTTT", line 5
ORA-06512: 在line 1
SQL> grant delete any table to zdwy;
Grant succeeded
SQL> exec tttt;
PL/SQL procedure successfully completed
SQL> select * from timecard.bb;
A B
---------- -----------
有没执行啊。
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from timecard.bb';
execute immediate str;
end tttt;
/
SQL> exec tttt;
begin tttt; end;
ORA-00942: 表或视图不存在
ORA-06512: 在"ZDWY.TTTT", line 5
ORA-06512: 在line 1
SQL> grant delete any table to zdwy;
Grant succeeded
SQL> exec tttt;
PL/SQL procedure successfully completed
SQL> select * from timecard.bb;
A B
---------- -----------
#6
搞定!
#7
问题出在那?
#8
可以,在表名前加上用户名, username.tablename,
前提是有足够的权限。
前提是有足够的权限。
#9
在oracle的pl/sql块(过程、函数和包也是命名pl/sql块)中对数据的访问权限和单纯在sqlplus中有时候是不一样的,块中访问数据必须通过显式授权,也就是通过grant ... to userxxx的方式而不是通过隐式方式(通过role授权)。
检察权限分配,就应该能解决问题了
检察权限分配,就应该能解决问题了
#10
KingSunSha(弱水三千) 可能是正确的,用SYSTEM授权没有用,必须用被访问用户授权!
#1
当然可以,报什么错误?
#2
报必须说明标识符ebills_gfzh.EX_CKXYZTZB,我的权限没有问题,这个SQL语句放在PL_SQL中单独执行没有问题!
#3
grant delete any table to user_name;
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from ebills_gfzh.EX_CKXYZTZB';
execute immediate str;
end tttt;
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from ebills_gfzh.EX_CKXYZTZB';
execute immediate str;
end tttt;
#4
执行不了,报表和视图不存在,何故!好像根本行不通!
#5
当然报错,当前用户没有足够权限,grant delete any table to user_name;
有没执行啊。
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from timecard.bb';
execute immediate str;
end tttt;
/
SQL> exec tttt;
begin tttt; end;
ORA-00942: 表或视图不存在
ORA-06512: 在"ZDWY.TTTT", line 5
ORA-06512: 在line 1
SQL> grant delete any table to zdwy;
Grant succeeded
SQL> exec tttt;
PL/SQL procedure successfully completed
SQL> select * from timecard.bb;
A B
---------- -----------
有没执行啊。
create or replace procedure tttt is
str varchar2(50);
begin
str:='delete from timecard.bb';
execute immediate str;
end tttt;
/
SQL> exec tttt;
begin tttt; end;
ORA-00942: 表或视图不存在
ORA-06512: 在"ZDWY.TTTT", line 5
ORA-06512: 在line 1
SQL> grant delete any table to zdwy;
Grant succeeded
SQL> exec tttt;
PL/SQL procedure successfully completed
SQL> select * from timecard.bb;
A B
---------- -----------
#6
搞定!
#7
问题出在那?
#8
可以,在表名前加上用户名, username.tablename,
前提是有足够的权限。
前提是有足够的权限。
#9
在oracle的pl/sql块(过程、函数和包也是命名pl/sql块)中对数据的访问权限和单纯在sqlplus中有时候是不一样的,块中访问数据必须通过显式授权,也就是通过grant ... to userxxx的方式而不是通过隐式方式(通过role授权)。
检察权限分配,就应该能解决问题了
检察权限分配,就应该能解决问题了
#10
KingSunSha(弱水三千) 可能是正确的,用SYSTEM授权没有用,必须用被访问用户授权!