0% found this document useful (0 votes)
19 views

User Managment

A self help code pl/sql to manage users on oracle database.

Uploaded by

Infra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

User Managment

A self help code pl/sql to manage users on oracle database.

Uploaded by

Infra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

-----------------------------------------------------------------------------------

---
-- Name : OT (Oracle Tutorial) Sample Database
-- Link : http://www.oracletutorial.com/oracle-sample-database/
-- Version : 1.0
-- Last Updated: July-28-2017
-- Copyright : Copyright � 2017 by www.oracletutorial.com. All Rights Reserved.
-- Notice : Use this sample database for the educational purpose only.
-- Credit the site oracletutorial.com explitly in your materials that
-- use this sample database.
-----------------------------------------------------------------------------------
---
--------------------------------------------------------------------
-- execute the following statements to create a user name OT and
-- grant priviledges
--------------------------------------------------------------------
alter session set "_ORACLE_SCRIPT"=false;
-- create new user
CREATE USER OT IDENTIFIED BY yourpassword;

--CREATE ROLE RESOURCE;

-- grant priviledges
GRANT
CREATE ANY TABLE,
ALTER ANY TABLE,
DROP ANY TABLE,
DELETE ANY TABLE,
INSERT ANY TABLE,
UPDATE ANY TABLE,
SELECT ANY TABLE
TO comercial WITH admin option;

GRANT SELECT ANY TABLE TO comercial;


GRANT INSERT ANY TABLE TO comercial;
GRANT ALTER ANY TABLE TO comercial;
GRANT CREATE ANY TABLE TO comercial;

--alter session set "_ORACLE_SCRIPT"=true;


--
CREATE USER comercial IDENTIFIED BY c0m3rc14l
DEFAULT tablespace comercial_tbs;
CREATE USER c##comercial IDENTIFIED BY c0m3rc14l
DEFAULT tablespace COMERCIAL_TBS;
--
GRANT CREATE SESSION TO comercial;
GRANT admin TO comercial;
GRANT CREATE TABLE TO c##comercial;
GRANT CREATE SESSION TO c##comercial;
CREATE USER c##comercial IDENTIFIED BY c0m3rc14l;

--GRANT dba TO comercial;

You might also like