We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6
Users,Privileges and Roles
Password File Setting :
$ cd $ORACLE_HOME/dbs $export ORACLE_SID=sanj $orapwd file=orapwsanj password=sanj entries=5 In Pfile: remote_login_passwordfile=exclusive/shared/none create user <username> identified by <password> default tablespace <tbspname> quota 100m on <tbspname> ; create user sanj identified by sanj; alter user sanj quota unlimited on <tbspame> ; drop user <username>; drop user username cascade; (for online users) Provilieges Two types of Privilgeges : 1. System Privileges 2. Object Priviliges 1. System Privileges : grant create table to <username> grant create any table to <username> grant select any table to <username> grant update any table to grant drop any table to grant delete any table to grant create anyb index to grant alter any index to ,, grant drop any index to ., Session Privileges: grant create session to grant alter session to grant create tablespace to grant alter tablesppace to with Admin Option : grant create table to <u1> with admin option ; 2. Object Privileges: grant select on rani.emp to sanj ; grant select on rani.emp to sanj with grant option; REVOKING PRIVILEGES : Revoke select on rani.emp from u1; When grant option is revoked the corresponding users' grant option gets cancelled but not with admin option Roles: Collection of privileges are called roles set role <rolename>; grant rolename to username with admin option; revoke rolename from username ; drop role <rolename>; Predefined Roles : connect,resource,dba,exp_full_db,imp_full_db,execute_ catalog_role,select_catalog_role,recovery_catalog_owne r VIEWS: dbs_sys_privs dba_role_privs role_sys_privs user_roles session_roles; Profiles: collection of pwd mgd and resource managed parameters in a file is called a profile before creating a profile the following script should be run : @?/rdbms/admin/utlpwdmg.sql; alter system set resource_limit=true; create profile <profilename> limit -- pwd mgmt failed_login_attempts 10 password_lock_time 0 days password_life_time 3 days password_grace_time 5 days password_reuse_time 90 days password_reuse_max 3 times ; profile created create user username profile profilename; alter profile <profilename> limit password_grace_time 10 days ; dba_profiles; Resource Management Parameters: cpu_per_call - no of secs a query occupies cpu_per_session no of escs CPU utilized sessions_per_user 3 connect_time 3600 idle_time 800 logical_reads_per_session 16 no of data blocks in dbbc logical reads per call - no od db blocks/query user_password_privs user_resource_privs; dba_users;