Create temporary tablespace
Create temporary tablespace test_temp
TEMPFILE 'C: oracleproduct10.1.0oradataorcltest _ temp01.dbf'
SIZE 32 M
AUTOEXTEND ON
NEXT 32 m maxsize 2048 M
Extent management local;
Create a tablespace
CREATE TABLESPACE HISTDB
Datafile 'd: oracleproduct10.2.0oradataZJGIStest _ temp03.dbf'
SIZE 32 M
AUTOEXTEND ON
NEXT 32 m maxsize 2048 M
Extent management local;
Create a user and specify a tablespace
Create user username identified by password
Default tablespace TEST_DATA
Temporary tablespace TEST_TEMP;
Grant permissions to users
GRANT
Create session, create any table, create any view, create any index, create any procedure,
Alter any table, alter any procedure,
Drop any table, drop any view, drop any index, drop any procedure,
Select any table, insert any table, update any table, DELETE ANY TABLE
TO username;
..........................
/* Divided into four steps */
/* Step 2: create a temporary tablespace */
Create temporary tablespace user_temp
Tempfile 'd: oracleoradataOracle9iuser_temp.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 2: create a data table space */
Create tablespace user_data
Logging
Datafile 'd: oracleoradataOracle9iuser_data.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 2: create a user and specify the tablespace */
Create user username identified by password
Default tablespace user_data
Temporary tablespace user_temp;
/* Step 4: grant permissions to users */
Grant connect, resource, dba to username;
Bytes ----------------------------------------------------------------------------------------------------------
----------------------------------------------- View User Permissions ---------------------------------------------------------
View All Users
View All Users
SELECT * FROM DBA_USERS;
SELECT * FROM ALL_USERS;
SELECT * FROM USER_USERS;
View User System Permissions
View User System Permissions
SELECT * FROM DBA_SYS_PRIVS;
SELECT * FROM USER_SYS_PRIVS;
View user objects or role Permissions
View user object permissions
SELECT * FROM DBA_TAB_PRIVS;
SELECT * FROM ALL_TAB_PRIVS;
SELECT * FROM USER_TAB_PRIVS;
View All roles
View All Users
SELECT * FROM DBA_ROLES;
View roles owned by a user or role
View roles owned by a user or role
SELECT * FROM DBA_ROLE_PRIVS;
SELECT * FROM USER_ROLE_PRIVS;
Delete new user
Delete a user
Drop user username
Delete new tablespace
Delete a user
Drop tablespace tablespaceName