|
-
The user trying to execute the procedure makes a difference. See below for the problems scott has letting james execute one of scott's procedures:
SQL>show user
USER is "SCOTT"
SQL> create or replace procedure println as
2 v_stmt varchar2(30) := 'Now is the time.';
3 begin
4 dbms_output.put_line(v_stmt);
5 end;
6 /
Procedure created.
SQL> set serveroutput on
SQL> exec println;
Now is the time.
PL/SQL procedure successfully completed.
SQL> conn james/james
Connected.
SQL> exec println;
BEGIN println; END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRINTLN' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
SQL> conn system/manager
Connected.
SQL> grant create synonym to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> create public synonym println for println;
create public synonym println for println
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn system/manager
Connected.
SQL> grant create public synonym to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> create public synonym println for println;
Synonym created.
SQL> conn james/james
Connected.
SQL> set serveroutput on
SQL> exec println
Now is the time.
PL/SQL procedure successfully completed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|