Oracle how to give permission to an user on a different schema - oracle

I have an Oracle user user1 and a schema schema1. I want to give permissions insert, update and delete to this user on this schema.
I only find in the documentation that I can give permissions on this schema tables.
Is there a way to give permission on whole schema?

You can add roles and privileges to the user or use the grant command.
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljgrant.html
You can also use the GRANT ALL PRIVILEGES TO {USERNAME} command.

Related

How Grant all privileges on prefixed wildcard name in mysql 8

In my database, there are many database retaliated to a one project like below
flatmon
flatmon_user
flatmon_login
flatmon_transaction
.....
I just want the user to only have access to all databases beginning with "flatmon"
But, in mysql 8 it's doesn't work. (i tried in mysql 5.7 then it worked)
i set privileges like below.
CREATE USER 'flatmonuperadmin'#'%' IDENTIFIED BY '7c652ab5-5658-417a-9680-8a4265752233';
GRANT ALL PRIVILEGES ON `flatmon\_%`.* TO 'flatmonuperadmin'#'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
If you have db named "rf-facade"
You can use:
GRANT SELECT, INSERT, UPDATE, DELETE ON `rf-facade`.* TO 'rf_facade_developer';
Try This
Grant all privileges on `some_db_%`.* to 'user'#'IP' with grant option;

Upgrade a user's permissions in CockroachDB

If I create a read-only user, but want to give them write access, how do I do that in CockroachDB?
At any time you can simply grant a user new permissions via the GRANT family of SQL commands, as explained in the documentation for GRANT.
For example, to grant the user jordan INSERT permissions on all tables in the test database, run the following command in a SQL shell:
GRANT INSERT ON TABLE test.* TO jordan

Oracle- GRANT ALL PRIVILEGES?

Whenever I give a user "all privileges" in ORACLE (example below), what does this actually do?
My understanding is that it gives a user any privilege, e.g inserting, deleting etc within that schema but not to any schema in the DB?
grant all privileges to my_user;
You can grant all [privileges] on <some object>, but you aren't specifying an object; so you are granting system privileges:
The documentation for system privileges says:
Oracle Database provides the ALL PRIVILEGES shortcut for granting all the system privileges listed in Table 18-1, except the SELECT ANY DICTIONARY, ALTER DATABASE LINK, and ALTER PUBLIC DATABASE LINK privileges.
System privileges are not always restricted to a schema. That table includes a lot of ANY privileges, which are specifically not restricted to a schema. If you grant all privileges to a user they will be able to create or alter a table in any schema, for example. That probably isn't what you want.
There is no shortcut to grant only schema-restricted privileges. You'll need to grant CREATE TABLE, CREATE INDEX, etc. explicitly.
It's common practice to create a role to which you grant the necessary privileges, and then you just have to grant that role to your users. (Although you sometimes still need to grant privileges directly to users, e.g. if they are required in a stored procedure).

Grant permissions on schema to specific schema in Oracle

I would like to know if there is a way to grant permissions to, for example, create table on a schema, from a different user.
I want to do this without granting DBA role, nor granting "ANY" permissions (grant create any table to XXXX).
I use this occasionally to satisfy devs who want a read-only account. This will create DDL that will give appropriate select or execute permissions. It would not be difficult to modify that to include update and delete.

how to restrict user from grant statement in Hive

How can I grant permission to specific users in Hive?
When I try with different users and set the permission with the GRANT statement, then these users were able to change the permission on create, update and any kind of operation on the objects(database, tables etc).
So how can I configure Hive such that only the selected user is able to grant permission?

Resources