grant

PL/SQL软件执行命令出现动态执行表不可访问,本会话的自动统计被禁止

▼魔方 西西 提交于 2019-12-01 21:54:16
出现这样的原因是该用户没有相关权限。 解决方法: 去除软件层面设置 2.给该用户赋权限。 解决办法二:依据提示给定用户授权或者所有用户权限。 grant select on V_session to user; grant select on V_$sesstat to user; grant select on V_$statname to user; 给公用所有用户授权 grant select on V_$session to public; grant select on V_$sesstat to public; grant select on V_$statname to public; 来源: https://www.cnblogs.com/qixiajue1993/p/11717974.html

Can wildcards be used on tablenames for a GRANT in MySQL

天大地大妈咪最大 提交于 2019-12-01 20:02:45
Is it possible in MySQL to do a GRANT to a user on a set of tables within a database, e.g. to allow CREATE AND DROP ing of some table names but not others? Neither of these seem to work: GRANT SELECT ON `testdb`.`%_testing` TO 'wildcardtest'@'localhost'; GRANT SELECT ON `testdb`.`testing%` TO 'wildcardtest'@'localhost'; and the MySQL manual doesn't seem to give an answer either way. The only wildcard that works in the GRANT statement is * GRANT SELECT ON `testdb`.* TO 'user'@'localhost'; GRANT SELECT ON *.* TO 'privilegeduser'@'localhost'; It's all or one; there's no facility for dynamic

PostgreSQL 用户和权限管理

China☆狼群 提交于 2019-12-01 19:11:09
PostgreSQL 用户和权限管理 创建 CREATE ROLE rolename; CREATE USER username; CREATE USER和CREATE ROLE的区别在于,CREATE USER指令创建的用户默认是有登录权限的,而CREATE ROLE没有。 创建用户时设定用户属性 基本语法格式 CREATE ROLE role_name WITH optional_permissions; 示例:在创建用户时设定登录权限。 CREATE ROLE username WITH LOGIN; 可以通过\h CREATE ROLE指令查看全部可设置的管理权限 修改用户属性 修改权限的命令格式 ALTER ROLE username WITH attribute_options; 例如:可通过以下方式禁止用户登录 ALTER ROLE username WITH NOLOGIN; 设置访问权限 语法格式如下: GRANT permission_type ON table_name TO role_name; 示例 GRANT UPDATE ON demo TO demo_role; --赋予demo_role demo表的update权限 GRANT SELECT ON ALL TABLES IN SCHEMA PUBLIC to demo_role; --赋予demo

How to grant execute on specific stored procedure to user

二次信任 提交于 2019-12-01 16:39:45
I have created some stored procedure on a specific schema. In this stored procedure, I want to grant execute privilege. So I wrote that : GRANT EXECUTE ON PROCEDURE schema_name.proc_name TO 'user_name'; GRANT SELECT ON mysql.proc to 'user_name'; The problem is : My user can see every stored procedure. I wish he could only see the procedure where he has the EXECUTE privilege. Is there a way to achieve that ? Thanks in advance. Yes... this works as expected if you don't grant the user the SELECT privilege on the mysql.proc table, either directly or indirectly, such as with GRANT SELECT ON *.* TO

How to grant execute on specific stored procedure to user

好久不见. 提交于 2019-12-01 15:38:00
问题 I have created some stored procedure on a specific schema. In this stored procedure, I want to grant execute privilege. So I wrote that : GRANT EXECUTE ON PROCEDURE schema_name.proc_name TO 'user_name'; GRANT SELECT ON mysql.proc to 'user_name'; The problem is : My user can see every stored procedure. I wish he could only see the procedure where he has the EXECUTE privilege. Is there a way to achieve that ? Thanks in advance. 回答1: Yes... this works as expected if you don't grant the user the

GRANT syntax for domain\user

久未见 提交于 2019-12-01 13:42:50
问题 I'm trying to give access to an active directory user to only one specific table. I want them to be able to insert, update, delete, etc. but only for that table. I know this command: GRANT Insert, Select on Tablename to user But I can't figure out how to get "domain\user" to work syntax-wise. I tried: GRANT Insert, Select on Tablename to domain\user But I get: Msg 102, Level 15, State 1 Incorrect syntax near '\'. 回答1: Assuming you have created a user in this database associated with the AD

mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

放肆的年华 提交于 2019-12-01 13:00:26
mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题 提示意思是不能用grant创建用户,mysql8.0以前的版本可以使用grant在授权的时候隐式的创建用户,8.0以后已经不支持,所以必须先创建用户,然后再授权,命令如下: mysql> create user 'zabbix'@'localhost' IDENTIFIED BY '111111'; Query OK, 0 rows affected (0.04 sec) mysql> grant all privileges on *.* to 'zabbix'@'localhost' ; Query OK, 0 rows affected (0.03 sec) 另外,如果远程连接的时候报plugin caching_sha2_password could not be loaded这个错误,可以尝试修改密码加密插件: mysql> alter user 'zabbix'@'localhost' identified with mysql_native_password by '111111'; 提示意思是不能用grant创建用户,mysql8.0以前的版本可以使用grant在授权的时候隐式的创建用户,8.0以后已经不支持,所以必须先创建用户

MySql grant user permission

喜欢而已 提交于 2019-12-01 08:17:56
I want to create a new user in MySql. I do not want that new user to do much with my existing databases [I just want to grant Select privilege to him], but he can do anything and everything with a new database which he creates. Firstly, is there a way to grant permission as per the database owner? If it is possible, then that is the ideal thing I am looking for. And if not, then how do I restrict a particular user from accessing [only Select privilege] some specific database only, allowing him to do anything he wants with the remaining ones? HeatfanJohn From the MySQL grant documentation :

create synonym ora-01031 insufficient privileges

随声附和 提交于 2019-12-01 03:52:04
I need help understanding what grants/privileges a user needs to CREATE a SYNONYM when it points to another (different) schema object. When I try the below, I get ora-01031 insufficient privileges, so obviously I am missing and failing to apply other needed privileges. I did search as well as I could but couldn't find anything specific to cross-schema synonyms. CREATE USER test IDENTIFIED BY pw DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP; ALTER USER test IDENTIFIED BY pw; GRANT CONNECT, RESOURCE TO test; -- ... create a bunch of stuff in test... CREATE USER READWRITE IDENTIFIED BY pw

Grant SELECT on multiple tables oracle

 ̄綄美尐妖づ 提交于 2019-12-01 03:13:48
I have 3 tables table1,table2,table3. I want to grant(select for example) these tables to a user, user1. I know that I can grant with: grant select on table1 to user1; grant select on table2 to user1; grant select on table3 to user1; Can I grant the 3 tables to user1 using only 1 query? Thanks Chris Saxon No. As the documentation shows , you can only grant access to one object at a time. m_abr You can do it with dynamic query, just run the following script in pl-sql or sqlplus: select 'grant select on user_name_owner.'||table_name|| 'to user_name1 ;' from dba_tables t where t.owner='user_name