如何将我的架构访问权限给Oracle中的其他用户? [英] How can I give access of my schema to other users in Oracle?

查看:87
本文介绍了如何将我的架构访问权限给Oracle中的其他用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Oracle中向用户授予我的架构访问权限?我创建了一个名为CCMS_ADMIN的用户,我创建了200个表。但我需要向所有开发人员和测试人员提供CCMS_ADMIN表的读访问权限。我怎么能这样做?

How can I give access of my schema to a user in Oracle? I had created a user named CCMS_ADMIN and I had created 200 tables in that. But I need to give read access of CCMS_ADMIN tables to all my developers and testers. How can I do this?

推荐答案

据我所知,你必须一次授予一个对象的访问权限。



这当然可以使用这样的程序来完成

As far as I know you have to grant access one object at a time.

This can of course be done using a procedure like this
PROCEDURE GRANT_SELECT_ON_TABLES
    USERID IN varchar2 
IS
BEGIN
    FOR TABLES IN (
        SELECT  TABLE_NAME
        FROM    ALL_TABLES
        WHERE   OWNER = USER)
    LOOP
       EXECUTE IMMEDIATE 'GRANT SELECT ON '|| TABLES.TABLE_NAME ||' TO USERID;
    END LOOP;
END;



您必须在以CCMS_ADMIN身份登录时运行它,并且您需要将要选择的用户授权为参数。



免责声明:我没有对它进行过测试,目前我无法访问服务器。


You have to run it while logged in as CCMS_ADMIN and it will take the user you want to grant select access to as a parameter.

Disclaimer: I haven't tested it as such and I don't have access to a server at the moment.


这篇关于如何将我的架构访问权限给Oracle中的其他用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆