不是DBA就能执行SYS的过程。以SYS登录,执行grant execute on writeblob() to username;
SQL> show user USER 为 "SYS" SQL> create user acmilan identified by acmilan;用户已创建。SQL> grant dba to acmilan;授权成功。SQL> create or replace procedure test is 2 begin 3 NULL; 4 end test; 5 /过程已创建。SQL> call sys.test();调用完成。SQL> conn acmilan/acmilan@test 已连接。 SQL> show user USER 为 "ACMILAN" SQL> select count(*) from scott.emp; COUNT(*) ---------- 14SQL> call sys.test(); call sys.test() * 第 1 行出现错误: ORA-00942: 表或视图不存在 SQL> conn sys/top10@test as sysdba 已连接。 SQL> grant execute on test to acmilan;授权成功。SQL> conn acmilan/acmilan ERROR: ORA-12560: TNS: 协议适配器错误 警告: 您不再连接到 ORACLE。 SQL> conn acmilan/acmilan@test 已连接。 SQL> call sys.test();调用完成。SQL> show user USER 为 "ACMILAN" SQL> call sys.test();调用完成。SQL> exit
比如A用户下table1就写成A.table1代替table1
USER 为 "SYS"
SQL> create user acmilan identified by acmilan;用户已创建。SQL> grant dba to acmilan;授权成功。SQL> create or replace procedure test is
2 begin
3 NULL;
4 end test;
5 /过程已创建。SQL> call sys.test();调用完成。SQL> conn acmilan/acmilan@test
已连接。
SQL> show user
USER 为 "ACMILAN"
SQL> select count(*) from scott.emp; COUNT(*)
----------
14SQL> call sys.test();
call sys.test()
*
第 1 行出现错误:
ORA-00942: 表或视图不存在
SQL> conn sys/top10@test as sysdba
已连接。
SQL> grant execute on test to acmilan;授权成功。SQL> conn acmilan/acmilan
ERROR:
ORA-12560: TNS: 协议适配器错误
警告: 您不再连接到 ORACLE。
SQL> conn acmilan/acmilan@test
已连接。
SQL> call sys.test();调用完成。SQL> show user
USER 为 "ACMILAN"
SQL> call sys.test();调用完成。SQL> exit