Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to provide oracle interface to third party

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to provide oracle interface to third-party personnel, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.

In practical projects, you often need to provide an API for other platforms to use, and you need to provide Oracle database users to callers. This user may only be able to access some tables in our production database, and they can only query and not add or delete them. This requires us to set appropriate permissions for the interface from the Oracle database, as shown below:

Suppose our user is scott, the interface we establish for third-party users is scott_read, and the table we open to third-party users is student table.

1. Log in with the system user: sqlplus system/password@orcl.

two。 Create a scott_read user: create user scott_read (username) identified by tiger (password).

3. Assign connect and resource permissions to the scott_read user: grant connect,resource to scott_read.

Note: be careful not to assign dba permissions to scott_read here, otherwise this user can manipulate anything in our database, which is a big taboo.

4. Assign the student query permission for scott to the scott_read user: grant select on scott.student (table or view name) to scott_read.

5. Create a synonym: create or replace synonym scott_read.student for scott.student.

At this point, scott_read users can directly query all the data in the student table without any impact on our database.

Thank you for reading this article carefully. I hope the article "how to provide oracle Interface to third parties" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report