Dba Privileges
Dba Privileges
Dba Privileges
USER PRIVILEGES
Create a User and Grant the Create Session System Privilege
CREATE USER jward
IDENTIFIED BY AZ7BC2
DEFAULT TABLESPACE data_ts
QUOTA 100M ON test_ts
QUOTA 500K ON data_ts
TEMPORARY TABLESPACE temp_ts
PROFILE clerk;
GRANT create session TO jward;
Altering Users
ALTER USER avyrros
IDENTIFIED EXTERNALLY
DEFAULT TABLESPACE data_ts
TEMPORARY TABLESPACE temp_ts
QUOTA 100M ON data_ts
QUOTA 0 ON test_ts
PROFILE clerk;
CHANGING USER AUTHENTICATION:
The following data dictionary views contain information about database users and profiles:
View
Description
DBA_USERS
ALL_USERS
Lists users visible to the current user, but does not describe them
USER_USERS
DBA_TS_QUOTAS
USER_TS_QUOTAS
USER_PASSWORD_LIMIT
S
USER_RESOURCE_LIMIT
S
DBA_PROFILES
RESOURCE_COST
V$SESSION
Lists session information for each current session, includes user name
V$SESSTAT
V$STATNAME
PROXY_USERS
The following sections present some examples of using these views, and assume a
database in which the following statements have been executed:
This example enables the role clerk, which you have already been granted, and specifies the
password.
SET ROLE clerk IDENTIFIED BY bicentennial;
You can disable all roles with the following statement:
SET ROLE NONE;
Table spaces:
SQL> SELECT TABLESPACE_NAME, STATUS, CONTENTS
FROM USER_TABLESPACES;
How To View the Data Files in the Current Database?
SQL> connect SYSTEM/fyicenter
Connected.
SQL> col tablespace_name format a16;
SQL> col file_name format a36;
SQL> SELECT TABLESPACE_NAME, FILE_NAME, BYTES
FROM DBA_DATA_FILES;
CREATING TABLESPACE:
CREATE TABLESPACE lmtbsb DATAFILE '/u02/oracle/data/lmtbsb01.dbf'
SIZE 50M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
ALTER TABLE SPACE:
ALTER TABLESPACE lmtbsb
ADD DATAFILE '/u02/oracle/data/lmtbsb02.dbf' SIZE 1M;
(You can specify SIZE in kilobytes (K), megabytes (M), gigabytes (G), or
terabytes (T).)
DBA_TABLESPACES
USER_TABLESPACES
V$TABLESPACE