且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将我的架构访问权限给Oracle中的其他用户?

更新时间:2023-12-02 11:57:46

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



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

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.