Get the App
SLTechnology News&Howtos  ›  Database  › 

How to provide oracle interface to third party

Shulou Source: shulou.com Published: 2022-05-31 14:41:01 10月03日 Update

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!

Tags: Users interfaces data third parties databases permissions articles queries people things values interests synonyms at the same time picture names taboos actual passwords platforms more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei vpn Apple Shulou Information