Create User

Description: How to create a user and grant privileges and roles.

Accept schema CHAR PROMPT 'Enter Schema ID: ';
CREATE USER &schema identified BY &schema;
grant CONNECT, resource TO &schema identified BY &schema;
ALTER USER &schema DEFAULT tablespace USER_DATA;
ALTER USER &schema temporary tablespace temporary;
ALTER USER &schema quota 50M ON USER_DATA;
ALTER USER &schema quota unlimited ON temporary;
ALTER USER &schema quota 45M ON CTDAT;
ALTER USER &schema quota 45M ON CTIDX;
ALTER USER &schema quota 45M ON PADAT;
ALTER USER &schema quota 45M ON PAIDX;
ALTER USER &schema quota 45M ON SDDAT;
ALTER USER &schema quota 45M ON SDIDX;
ALTER USER &schema quota 45M ON SFDAT;
ALTER USER &schema quota 45M ON SFIDX;
ALTER USER &schema quota 45M ON SYDAT;
ALTER USER &schema quota 45M ON SYIDX;
grant CREATE USER TO &schema WITH admin OPTION;
grant ALTER USER TO &schema WITH admin OPTION;
grant grant ANY role TO &schema WITH admin OPTION;
grant CREATE session TO &schema;
grant ALTER session TO &schema;
grant CREATE TABLE TO &schema;
grant CREATE VIEW TO &schema;
grant CREATE sequence TO &schema;
grant CREATE ANY PROCEDURE TO &schema;
grant CREATE ANY TRIGGER TO &schema;
grant CREATE CLUSTER TO &schema;
grant CREATE SYNONYM TO &schema;
grant CREATE Database link TO &schema;
grant CREATE snapshot TO &schema;
grant dds_acctg_super TO &schema;
grant dds_user TO &schema;
grant dds_SY_user TO &schema;
grant dds_BG_user TO &schema;
grant dds_DB_user TO &schema;
grant dds_AP_user TO &schema;
grant dds_AR_user TO &schema;
grant dds_GL_user TO &schema;
grant dds_SA_user TO &schema;
grant dds_PA_user TO &schema;
grant dds_CT_user TO &schema;
grant dds_PR_user TO &schema;
grant dds_PO_user TO &schema;
grant dds_IM_user TO &schema;
grant dds_RQ_user TO &schema;
grant dds_OE_user TO &schema;
grant dds_CU_user TO &schema;
grant dds_ER_user TO &schema;
grant dds_KT_user TO &schema;
grant dds_MC_user TO &schema;
grant dds_PS_user TO &schema;
grant dds_EA_user TO &schema;
grant dds_BM_user TO &schema;
grant dds_IF_user TO &schema;
grant dds_IB_user TO &schema;
grant dds_FA_user TO &schema;
grant dds_VX_user TO &schema;
grant dds_WO_user TO &schema;
grant dds_RE_user TO &schema;
grant dds_FX_user TO &schema;
grant dds_AX_user TO &schema;
grant dds_CO_user TO &schema;
grant dds_SF_user TO &schema;
grant dds_SD_user TO &schema;
grant dds_SD_MGR TO &schema;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.