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

Oracle creates users and gives them permission to read only certain tables

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

# enter the database

Su-oraclesqlplus / as sysdba

# create a read-only user

Create user kms identified by "123-456"; grant connect to kms

# Grant permissions to tables

Grant select on ecology.hrmresource to kms;grant select on ecology.HrmDepartment to kms;grant select on ecology.HrmSubCompany to kms;grant select on ecology.hrmjobtitles to kms

# create synonyms

Grant create synonym to kms;create or replace synonym kms.hrmresource for ecology.hrmresource;create or replace synonym kms.HrmDepartment for ecology.HrmDepartment;create or replace synonym kms.HrmSubCompany for ecology.HrmSubCompany;create or replace synonym kms.hrmjobtitles for ecology.hrmjobtitles

Note: if synonyms are not created, kms users must use words such as ecology.table when querying the table, not table.

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