Encrypt the stored procedure and grant it to other users for execution
Source: Internet
Author: User
Article Title: encryption stored procedure, which is performed by other users. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
As the division of labor and cooperation in society become closer and closer, different service products of several companies may run on the same server,
Sometimes services need to provide data to each other to achieve an economic win-win situation. Of course, their security and independence must also be ensured.
If such a service uses an ORACLE database in the background, you can encrypt the stored procedure and grant it to other users for execution.
First, we need to write a correct and logical stored procedure or function test_proc for the provided data. Assume that the source code is test. SQL.
Then use the wrap utility (default directory $ ORACLE_HOME/bin) to encrypt it:
The syntax for using wrap is:
$ Wrap iname = input_file [oname = output_file]
Zookeeper
The stored procedure or function after encryption. The default suffix is *. plb.
Example: $ wrap iname = test. SQL
Test. plb encryption stored procedures or functions will be generated in the current directory.
Note: For Windows and unix platforms, wrap can generate *. plb encrypted files. The version is compatible with the previous version.
Finally, compile the encrypted test. plb.
SQL> @/tmp/test. plb
And grant the execution permission to the relevant partner user (another_user ).
SQL> grant execute on test_proc to another_user;
Other considerations:
The partner users cannot have too many permissions to query data dictionaries and tables under other users. It is difficult to get the password.
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