insufficient privileges grant
程序员文章站
2022-05-08 12:13:46
...
1.创建用户并授权
SQL> create user test identified by xifenfei;
User created.
SQL> grant connect,resource to test;
Grant succeeded.
2、查看权限
SQL> SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE=’TEST’;
GRANTEE PRIVILEGE ADM
—————————— —————————————- —
TEST UNLIMITED TABLESPACE NO
SQL> SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE=’TEST’;
GRANTEE GRANTED_ROLE ADM DEF
—————————— —————————— — —
TEST CONNECT NO YES
TEST RESOURCE NO YES
SQL> CONN TEST/XIFENFEI
Connected.
SQL> SELECT * FROM SESSION_PRIVS;
PRIVILEGE
—————————————-
CREATE SESSION
ALTER SESSION
UNLIMITED TABLESPACE
CREATE TABLE
CREATE CLUSTER
CREATE SYNONYM
CREATE VIEW
CREATE SEQUENCE
CREATE DATABASE LINK
CREATE PROCEDURE
CREATE TRIGGER
PRIVILEGE
—————————————-
CREATE TYPE
CREATE OPERATOR
CREATE INDEXTYPE
14 rows selected.
注:目前create table权限是通过resource role授予test用户的
3、授权(create table权限)
SQL> conn / as sysdba
Connected.
SQL> grant create table to test;
Grant succeeded.
SQL> conn test/xifenfei
Connected.
SQL> EXEC CREATE_table(‘c’);
PL/SQL procedure successfully completed.
4.
grant connect to schema_owner;
grant unlimited tablespace to schema_owner;
grant create any trigger to schema_owner;
grant create any procedure to schema_owner;
grant create public database link to schema_owner;
grant drop public database link to schema_owner;
grant create public synonym to schema_owner;
grant drop public synonym to schema_owner;
grant create role to schema_owner;
grant drop any role to schema_owner;
SQL> create user test identified by xifenfei;
User created.
SQL> grant connect,resource to test;
Grant succeeded.
2、查看权限
SQL> SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE=’TEST’;
GRANTEE PRIVILEGE ADM
—————————— —————————————- —
TEST UNLIMITED TABLESPACE NO
SQL> SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE=’TEST’;
GRANTEE GRANTED_ROLE ADM DEF
—————————— —————————— — —
TEST CONNECT NO YES
TEST RESOURCE NO YES
SQL> CONN TEST/XIFENFEI
Connected.
SQL> SELECT * FROM SESSION_PRIVS;
PRIVILEGE
—————————————-
CREATE SESSION
ALTER SESSION
UNLIMITED TABLESPACE
CREATE TABLE
CREATE CLUSTER
CREATE SYNONYM
CREATE VIEW
CREATE SEQUENCE
CREATE DATABASE LINK
CREATE PROCEDURE
CREATE TRIGGER
PRIVILEGE
—————————————-
CREATE TYPE
CREATE OPERATOR
CREATE INDEXTYPE
14 rows selected.
注:目前create table权限是通过resource role授予test用户的
3、授权(create table权限)
SQL> conn / as sysdba
Connected.
SQL> grant create table to test;
Grant succeeded.
SQL> conn test/xifenfei
Connected.
SQL> EXEC CREATE_table(‘c’);
PL/SQL procedure successfully completed.
4.
grant connect to schema_owner;
grant unlimited tablespace to schema_owner;
grant create any trigger to schema_owner;
grant create any procedure to schema_owner;
grant create public database link to schema_owner;
grant drop public database link to schema_owner;
grant create public synonym to schema_owner;
grant drop public synonym to schema_owner;
grant create role to schema_owner;
grant drop any role to schema_owner;
推荐阅读
-
mysql server is running with the --skip-grant-tables option
-
scott登陆PLSQL时候出现insufficient privileges的解决方法
-
mysql数据库mysql: [ERROR] unknown option '--skip-grant-tables'
-
将用户A的视图查询权限赋予用户B报错,提示ORA-01720: grant option does not exist for ‘xx.xx’
-
insufficient privileges
-
03.12 Day 53 - grant 和 flush privileges 语句
-
添加新用户 GRANT 命令
-
mysql登录不上使用skip-grant-tables(linux操作方法)
-
installation failed with message INSTALL_FAILED_INSUFFICIENT_STORG
-
MySQL授权命令grant的使用方法小结