grant

Error: ORA-00955: name is already used by an existing object in Oracle Function

こ雲淡風輕ζ 提交于 2019-12-11 08:56:54
问题 I have function which i am trying to compile and getting an error as Error: ORA-00955: name is already used by an existing object . I am really not aware of this error and try to search for this issue but did not find any solution. I dont know is this related to any grant priviledges but i dont have priviledges issue to my schema tables. create or replace FUNCTION "AK_CHECK" -- PUBLIC (ID Number) RETURN Number IS TYPE_ID Number := 0; SUCCESS Number := 0; S Number := 0; BEGIN SELECT ACTIVE(ID)

Grant create any trigger vs grant create trigger

◇◆丶佛笑我妖孽 提交于 2019-12-11 08:02:11
问题 In Oracle you can grant system privileges like GRANT CREATE TRIGGER TO MY_USER; But you can as well grant privileges this way GRANT CREATE ANY TRIGGER TO MY_USER; As system privileges are system-wide, where is the difference between the 2 statements above. Does the additional ANY -keyword grant anything else more than system? If I add a Grant ... ON SCHEMA ... it's no system privilege anymore, is it? Assumption is that there are multiple schemas/objects in the database from different users

CANNOT GRANT CREATE VIEW ON SCHEMA

家住魔仙堡 提交于 2019-12-11 06:42:06
问题 I have a user in a database who only can select datas on all tables. I want to alow him to create views and not tables. Is it possible to grant to a specific user privileges for only creating views in a database schema? Regards. 回答1: Not in PostgreSQL at time of writing, no. The CREATE right in a schema lets them create any object type. There's no way to limit what objects they can create - functions, operators, operator classes, tables, views, etc. You could implement an executor hook to

Which permission need to grant to access sys.dba_systems

落爺英雄遲暮 提交于 2019-12-11 05:58:36
问题 I am working on the application which works on Oracle. For some kind of logic I need to get the list of tables from the given db user with the specified schema. In my case, I have a user which have granted access of the given schema. So when my code creates connection using the given credential and tries to fetch the tables from the following query, its return table list. SELECT * FROM dba_objects where owner ='schema' and object_type = 'TABLE' The above query was working with user having

ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

落爺英雄遲暮 提交于 2019-12-11 01:58:27
问题 I am running the below query from RATOR_MONITORING schema which is granting the reference permission from RATOR_MONITORING_CONFIGURATION.SMSC_GATEWAY table to RATOR_MONITORING schema. GRANT REFERENCES ON "RATOR_MONITORING_CONFIGURATION"."SMSC_GATEWAY" TO "RATOR_MONITORING"; ALTER TABLE "RATOR_MONITORING"."SMSC_GATEWAY_STATUS" ADD CONSTRAINT "SMSC_GATEWAY_STATUS_FK1" FOREIGN KEY ("SMSC_GATEWAY_ID") REFERENCES "RATOR_MONITORING_CONFIGURATION"."SMSC_GATEWAY" ("ID") ON DELETE CASCADE ENABLE; When

which privileges should be set for website database user / client in mysql

谁都会走 提交于 2019-12-10 21:49:09
问题 So what privileges should be set for the mysql user that is to be used as 'main' user for the website? I'm thinking data and structure ( see below ) for the database that is used should be set. But do i need to add administration rights also? And would this be any different if you own a web server and grant privileges to a client that for example want you to host an website for them giving them rights to use phpmyadmin on there own databases. Data SELECT INSERT UPDATE DELETE FILE Structure

Mysql drop user with grants for multiple hosts

北战南征 提交于 2019-12-10 15:49:06
问题 I added a user to my mysql-db with grants to access from several hosts, like: GRANT ALL PRIVILEGES ON `db`.* TO 'dbuser'@'host1'; GRANT ALL PRIVILEGES ON `db`.* TO 'dbuser'@'host2'; GRANT ALL PRIVILEGES ON `db`.* TO 'dbuser'@'host3'; GRANT ALL PRIVILEGES ON `db`.* TO 'dbuser'@'host4'; .... What is the shortest way to remove the user completly? I tried: drop user 'dbuser'@'%'; ERROR 1396 (HY000): Operation DROP USER failed for 'dbuser'@'%' drop user 'dbuser'; ERROR 1396 (HY000): Operation DROP

User with grant option can't grant create user

穿精又带淫゛_ 提交于 2019-12-09 15:57:20
问题 I created a user (new_user) with root like this: GRANT ALL ON labor.* TO 'new_user'@'%' WITH GRANT OPTION; GRANT ALL ON labor.* TO 'new_user'@'localhost' WITH GRANT OPTION; GRANT CREATE USER ON *.* TO 'new_user'@'%'; GRANT CREATE USER ON *.* TO 'new_user'@'localhost'; GRANT RELOAD ON *.* TO 'new_user'@'localhost'; GRANT RELOAD ON *.* TO 'new_user'@'%'; FLUSH PRIVILEGES; When I try to create another user the same way but with new_user, I get an access denied error. This error occurs after the

MySQL用户管理

回眸只為那壹抹淺笑 提交于 2019-12-09 11:16:02
MySQL授权系统主要通过五个表(user、db、host、tables_priv和columns_priv)来实现,其中用于访问数据库的各种用户信息都保存在mysql库的user表中。账户权限信息被存储在mysql数据库的user、db、host、tables_priv、columns_priv和procs_priv表中。 user表——该表决定是否允许用户连接到服务器。如果允许连接,权限字段则为该用户的全局权限。 db表——用于决定哪些用户可以从哪些主机访问哪些数据库。包含在db表中的权限适用于这个表标识的数据库。 host表——当您想在db表的范围之内扩展一个条目时,就会用到这个表。举例来说,如果某个db允许通过多个主机访问的话,那么超级用户就可以让db表内将host列为空,然后用必要的主机名填充host表。 tables_priv表——该表与db表相似,不同之处是它用于表而不是数据库。这个表还包含一个其他字段类型,包括timestamp和grantor两个字段,用于存储时间戳和授权方。在本文后面我们会对这个表做进一步的讲解。 columns_priv——该表作用几乎与db和tables_priv表一样,不同之处是它提供的是针对某些表的特定列的权限。 权限表的存取过程是: 1) 先从user表中的host、 user、 password这3个字段中判断连接的IP、用户名

Grant permissions to user for any new tables created in postgresql

时间秒杀一切 提交于 2019-12-09 08:39:00
问题 Currently I am using this to grant permissions: grant select on all tables in schema public to <user_name>; alter default privileges in schema public grant select on tables to <user_name>; According to the documentation, the second statement should have resolved the problem. It does not however auto grant permissions to user_name when a new table is added to the public schema. I am using this user (user_name) to copy data over to another database. 回答1: Found the answer. It is in this line in