Wednesday, July 4, 2007

USER administration



USER administration



CRETING A USER

CREATE USER ARKA
IDENTIFIED BY STG

CREATE USER ANIS
IDENTIFIED BY STG
-------------------------------------------------------------------------------

GRANT USER PRIVILEGE

GRANT create session, alter session, create table,
create view, create procedure, create trigger, create library,
create tablespace, alter tablespace, drop tablespace,
execute any procedure, UNLIMITED TABLESPACE, create public synonym,
create sequence to ARKA with admin option;
-------------------------------------------------------------------------------

CREATE ROLE

CREATE ROLE MANAGER;
-------------------------------------------------------------------------------

GRANTING PRIVILEGE TO ROLe

GRANT create session, alter session, create ANY table,
create view, create procedure, create trigger, create library,
create tablespace, alter tablespace, drop tablespace,
execute any procedure, UNLIMITED TABLESPACE, create public synonym,
create sequence to MANAGER;
-------------------------------------------------------------------------------

granting role to user
GRANT MANAGER TO ARKA,ANIS;
-------------------------------------------------------------------------------

CHANGING PASSWORD

ALTER USER ARKA
IDENTIFIED BY STGORA
-------------------------------------------------------------------------------

expiring password

alter user arka password expire;
-------------------------------------------------------------------------------

DELETE A USER

DROP USER ARKA CASCADE;
DROP USER ANIS;
-------------------------------------------------------------------------------

CREATE TABLE AR(NAME VARCHAR2(30));

No comments: