Oracle Explicit authorization

Source: Internet
Author: User

Same Database
two different users user1 User2

user1 there is a table table1

create synonym inside the user2
create synonym sy1 for user1.table1;

once created, direct access is OK.

select * from Sy1;

data can be taken.

but put it in a stored procedure.

CREATE PROCEDURE "Proc_test"
is
cursor Cur_test is
SELECT * from sy1 where rownum<10;
begin
open cur_test;
close cur_test;
end;

will error, said the table sy1 does not exist.

But if it is a different database, the establishment of such a synonym, but it is possible.

Really do not understand why this is so, please master enlighten.

As below, where CustomerInfo is the table name of the current database, the to is followed by the user to assign permissions to.

GRANT all on CustomerInfo to Esb_order

Oracle Explicit authorization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.