Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle : Grant Create table in another schema?

Tags:

oracle

I have two users : Schema1 and Schema2

How to grant Create Table privilege On Schema2 to Schema1 ?

I have been turning around and I got confused. I tried :

From Schema2 I tried,

GRANT CREATE TABLE TO SCHEMA1 WITH ADMIN OPTION;

But it seems like this grants Creating table to Schema1 in its own Schema and not in the Schema2.

Any ideas please ?

Thank you.

like image 953
Thomas Carlton Avatar asked Jan 28 '14 17:01

Thomas Carlton


People also ask

How do I grant a table to create another schema?

The only other way to allow a non-DBA user to create a table in another schema is to give the user the CREATE ANY TABLE system privilege. This privilege can only be given to SCHEMA1 by a user having the CREATE ANY PRIVILEGE privilege.

How will you create a table from one schema to another schema in Oracle?

right click on table >> Table>>COPY>> select the schema where you want to copy.

How do I give a user privileges to another user in Oracle?

You can group system and object privileges using roles and then assign those roles to users and other roles. This way you can grant the privileges the roles contain to the users en masse, which simplifies the security administration (See "Privilege and Role Authorization" in Database Concepts).


2 Answers

The only other way to allow a non-DBA user to create a table in another schema is to give the user the CREATE ANY TABLE system privilege.

This privilege can only be given to SCHEMA1 by a user having the CREATE ANY PRIVILEGE privilege.

like image 109
A B Avatar answered Sep 17 '22 16:09

A B


You want to grant create ANY table:

grant create any table to schema1;

The any "modifier" allows to create tables in other than own schemas.

like image 34
René Nyffenegger Avatar answered Sep 19 '22 16:09

René Nyffenegger