BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 
 

EnterpriseDB: GRANT Database

Oracle Tips by Burleson Consulting
 

You can grant TEMP, CREATE or ALL permissions to a user.  TEMP allows the user to create temporary tables on the database, CREATE allows the user to create new schemas and ALL grants both TEMP and CREATE.

You can grant CREATE TO tom, TEMP to fred and ALL to bill on the database "edb":

GRANT CREATE ON DATABASE edb TO tom;
GRANT TEMP ON DATABASE edb TO fred;
GRANT ALL ON DATABASE edb TO bill; 

edb=# GRANT CREATE ON DATABASE edb TO tom;
GRANT
edb=# GRANT TEMP ON DATABASE edb TO fred;
GRANT
edb=# GRANT ALL ON DATABASE edb TO bill;
GRANT
edb=#
REVOKE DATABASE

You can revoke ALL from bill and ALL from fred:

REVOKE ALL ON DATABASE edb FROM fred;
REVOKE ALL ON DATABASE edb FROM bill; 

edb=# REVOKE ALL ON DATABASE edb FROM fred;
REVOKE
edb=# REVOKE ALL ON DATABASE edb FROM bill;
REVOKE
edb=#
DROP DATABASE
DROP DATABASE <database name>

You can drop the database with this command.

DROP DATABASE foo;

SCHEMA

As discussed in Chapter 2, a schema is a way to logically separate database objects.  The PUBLIC schema is automatically created and if you do not specify a schema, the PUBLIC schema is automatically used.

If you use the AUTHORIZATION keyword, you can create a default schema for a user.

CREATE SCHEMA
CREATE SCHEMA <schema name>
[ AUTHORIZATION <user name> ]
[ schema element(s) ]

You can create a schema named foo:

CREATE SCHEMA foo;

You can create a schema, tom, for user tom (tom should already exist as a user):

CREATE SCHEMA tom AUTHORIZATION tom;
ALTER SCHEMA
ALTER SCHEMA <schema name>
            RENAME TO <new schema name>
            OWNER TO <new schema owner>

You can alter the schema foo and rename it to bar:

ALTER SCHEMA foo RENAME TO bar;
edb=# CREATE SCHEMA foo;

CREATE SCHEMA
edb=# create user tom;

CREATE ROLE
edb=# CREATE SCHEMA tom AUTHORIZATION tom;

CREATE SCHEMA
edb=# ALTER SCHEMA foo RENAME TO bar;

ALTER SCHEMA
edb=#




This is an excerpt from the book "EnterpriseDB: The Definitive Reference" by Rampant TechPress.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter