Authorization of oracle learning records (1)

Source: Internet
Author: User

Authorization of oracle learning records (1) oracle learning records, Table query and execution of Stored Procedure authorization, and use of grant statements for reference. Www.2cto.com [SQL] -- use the sys user to connect to the database and password oracle connect sys/oracle as sysdba; -- create the test1 user with the password 123 create user test1 identified by 123; -- create Test table a (a number (10), B varchar2 (20); -- grant the permission to query table a to test1 grant select on a to test1; -- create procedure spAdd (aa in number, bb in varchar2) as begin insert into a values (aa, bb); commit; end; /www.2cto.com -- execute the Stored Procedure execute spAdd (123, 'aaa'); -- grant the stored procedure execution permission to test1 grant execute on spAdd to test1; -- grant the create session permission to test1 grant create session to test1; -- connect test1/123 to the database as test1; -- execute sys's spAdd stored procedure as test1. spAdd (124, 'bbb '); -- Query Table a of sys as test1: select * from sys. a;

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.