????????????????????洢????Procedure??????Щ???????????Procedure??????Щ????????????????????????????????????????????Ч???????????????????Procedure????????????????????????????????????????????衣
????1??????????
?????????????????????????????????????????????????ж??Schema?????????????????????????Щ???????????????д????????????Schema????????????????????????汾????????????????????????????????????????????汾?????????????????洢????????????Schema?????Ч????????????
????????????????????????Schema A???????????洢????Proc??A?л???????????T1????Proc?????У????????T1????????????Schema B???????????????T1??????B?????????Proc?????????synonym???A.Proc?????????????Proc??????е?Schema???岻?????????Schema????????
???????????????A????Proc???????????????A Schema??????????T1?????B????Proc???????????B Schema??????????T1??
????2??????????
??????????????????????????黷????????????????11gR2???в????
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE      11.2.0.4.0     Production
TNS for 64-bit Windows: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 – Production
???????Schema????????
SQL> create user a identified by a;
User created
SQL> create user b identified by b;
User created
SQL> grant connect?? resource to a??b;
Grant succeeded
SQL> grant create procedure to a??b;
Grant succeeded
SQL> grant create synonym to a??b;
Grant succeeded
??????Schema A???洴???????????????洢?????
SQL> conn a/a@sicsdb
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
Connected as a
SQL> create table a(col varchar2(10));
Table created
SQL> create or replace procedure Proc(i_vc_name varchar2) is
2  begin
3    insert into a values (i_vc_name);
4    commit;
5  end Proc;
6  /
Procedure created