9000. DB::Exception: wesure_dev_rw: Not enough privileges. To execute this query it's necessary to have grant ALTER ADD COLUMN(if_renewal) ON dws.t_dws_abtest_cube_di_local. (ACCESS_DENIED)
时间: 2023-10-09 11:08:16 浏览: 91
这个错误提示表明你执行的查询需要对dws.t_dws_abtest_cube_di_local表授予ALTER ADD COLUMN(if_renewal)的权限,但是当前用户没有该权限。因此,你需要使用具有相应权限的用户执行该查询,或者请求管理员给你的当前用户授予该权限。
你可以使用以下命令授予ALTER ADD COLUMN(if_renewal)权限:
```
GRANT ALTER ADD COLUMN(if_renewal) ON dws.t_dws_abtest_cube_di_local TO <username>;
```
其中,<username>是你要授予权限的用户。
如果你不确定如何授予权限,建议咨询你们的数据库管理员进行操作。
相关问题
CREATE USER cedar IDENTIFIED BY cedar DEFAULT TABLESPACE CEDAR_DATA TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK; -- 5 Roles for cedar GRANT DBA TO cedar; GRANT RESOURCE TO cedar WITH ADMIN OPTION; GRANT AQ_ADMINISTRATOR_ROLE TO cedar; GRANT CONNECT TO cedar WITH ADMIN OPTION; GRANT AQ_USER_ROLE TO cedar; ALTER USER cedar DEFAULT ROLE ALL; -- 44 System Privileges for cedar GRANT CREATE ANY DIRECTORY TO cedar WITH ADMIN OPTION; GRANT CREATE PUBLIC SYNONYM TO cedar WITH ADMIN OPTION; GRANT EXECUTE ANY CLASS TO cedar WITH ADMIN OPTION; GRANT DROP ANY VIEW TO cedar WITH ADMIN OPTION; GRANT CREATE CLUSTER TO cedar; GRANT ALTER SYSTEM TO cedar; GRANT UPDATE ANY TABLE TO cedar; GRANT INSERT ANY TABLE TO cedar; GRANT LOCK ANY TABLE TO cedar; GRANT CREATE EXTERNAL JOB TO cedar WITH ADMIN OPTION; GRANT EXECUTE ANY PROGRAM TO cedar WITH ADMIN OPTION; GRANT CREATE JOB TO cedar WITH ADMIN OPTION; GRANT DROP ANY DIRECTORY TO cedar WITH ADMIN OPTION; GRANT ALTER ANY TRIGGER TO cedar; GRANT CREATE DATABASE LINK TO cedar; GRANT DROP ANY TABLE TO cedar WITH ADMIN OPTION; GRANT CREATE TABLE TO cedar WITH ADMIN OPTION; GRANT QUERY REWRITE TO cedar; GRANT ANALYZE ANY TO cedar; GRANT DROP ANY TRIGGER TO cedar; GRANT EXECUTE ANY PROCEDURE TO cedar; GRANT SELECT ANY TABLE TO cedar WITH ADMIN OPTION; GRANT ALTER ANY TABLE TO cedar; GRANT UNLIMITED TABLESPACE TO cedar WITH ADMIN OPTION; GRANT CREATE SESSION TO cedar; GRANT CREATE ANY TRIGGER TO cedar; GRANT DROP ANY PROCEDURE TO cedar WITH ADMIN OPTION; GRANT ALTER ANY PROCEDURE TO cedar; GRANT DROP PUBLIC SYNONYM TO cedar WITH ADMIN OPTION; GRANT DROP ANY SYNONYM TO cedar WITH ADMIN OPTION; GRANT MANAGE SCHEDULER TO cedar WITH ADMIN OPTION; GRANT CREATE ANY PROCEDURE TO cedar; GRANT CREATE PROCEDURE TO cedar WITH ADMIN OPTION; GRANT CREATE SEQUENCE TO cedar; GRANT CREATE VIEW TO cedar WITH ADMIN OPTION; GRANT CREATE SYNONYM TO cedar; GRANT DROP ANY INDEX TO cedar; GRANT DELETE ANY TABLE TO cedar; GRANT CREATE ANY TABLE TO cedar; GRANT CREATE ANY JOB TO cedar WITH ADMIN OPTION; GRANT SELECT ANY DICTIONARY TO cedar WITH ADMIN OPTION; GRANT CREATE ROLE TO cedar; GRANT CREATE ANY SYNONYM TO cedar WITH ADMIN OPTION; GRANT ALTER SESSION TO cedar WITH ADMIN OPTION; GRANT EXECUTE ON sys.dbms_aq TO cedar; GRANT EXECUTE ON sys.dbms_aqadm TO cedar; GRANT EXECUTE ON sys.dbms_network_acl_admin TO cedar; GRANT ALL ON sys.DBMS_LOCK TO cedar; 这个SQL在oracle 能用吗
这个 SQL 语句应该是可以在 Oracle 环境中执行的。它的作用是创建一个名为 cedar 的用户,并指定了该用户的默认表空间、临时表空间、角色和权限等信息。其中,该用户被授予了 DBA、RESOURCE、AQ_ADMINISTRATOR_ROLE、CONNECT、AQ_USER_ROLE 等角色,也被授予了 44 个系统权限(如 CREATE ANY DIRECTORY、EXECUTE ANY CLASS、CREATE TABLE 等)。此外,该用户还被授予了一些特殊的权限,如 EXECUTE ON sys.dbms_aq、EXECUTE ON sys.dbms_aqadm、EXECUTE ON sys.dbms_network_acl_admin 等。这些权限和角色的授予将使得该用户具有较高的系统权限,需要谨慎使用。
grant execute on dbms_crypto to system * ERROR at line 1: ORA-00942: table or view does not exist
The error "ORA-00942: table or view does not exist" indicates that the "dbms_crypto" object is not available in the current database schema.
This could be due to the following reasons:
- The object has not been created in the schema.
- The object has not been granted to the user executing the statement.
- The user executing the statement is not connected to the correct schema.
To resolve this error, you can try the following steps:
1. Check if the "dbms_crypto" object exists in the schema by running the command "DESCRIBE dbms_crypto" or "SELECT * FROM dbms_crypto". If it does not exist, you may need to create it.
2. Check if the user executing the statement has been granted access to the "dbms_crypto" object by running the command "SELECT * FROM user_tab_privs WHERE table_name = 'DBMS_CRYPTO'". If the user does not have access, you can grant the necessary privileges using the "GRANT" command.
3. Check if you are connected to the correct schema by running the command "SELECT * FROM user_users". If you are not connected to the correct schema, you can switch to the correct schema using the "ALTER SESSION SET CURRENT_SCHEMA" command.
阅读全文