How do I delete a user in Oracle?
Using drop user in Oracle to remove users, the user's objects are also deleted if you use the drop user cascade. To achieve the effect of deleting a user without affecting the use of objects under the user, you can use ALTER user Username account lock to lock the user.
Create table spaces, users, and authorize and revoke permissions for users with commands.
Create tablespace Tabllespacename
DataFile ' f:\orcl\user001.dbf size 20m
Default Storage (
Initial 512k
Next 512k
Minextents 2
Pctincrease 50%
Maxexitnts 2048)
Minimum extent 512k
Logging
Online
Permanent
extent Management dictionary;
Reclaim permissions: Revoke privilege from user;
Create Tablespace Tablespace_name
DataFile ' f:\orcl\user001.dbf size 20m
Default Storage (
initial XXXKB
Next YYKB
Minextents 2
pctincrease nnnn
maxextents mmm)
logging
Online
Extent Management Dictionary/local[autoallocate/uniform size
XXXMB];
Create user user_name
Identified by passwore/
Identified externally/
Identified globally as ' Cn=user '
Default Tablespace tablespace_name
Temporary tablespace tablespace_name
[Account Lock/unlock]
Grant connect to user_name;
Grant CREATE table to Suer_name;
Grant update on TABLE_NAME to user_name;
Revoke CREATE table from user_name;
Revoke update on TABLE_NAME from USER_NAME;
What are the usual ways to view current users in Oracle? (Hint: Show user and
SELECT * from user_users) show User;/select username from
User_users;
What is your understanding of the role and what are the common roles?
A role is a set of permissions for a database entity that does not belong to any mode or user but can be granted
Any user. Commonly used characters are connect,dba,resource,select_catalog_role.
(Query all Table view rights), Delete_catalog_role (delete permission), etc.
Role creation and authorization: and create user authorization for user is similar. Create role Role_name identified ...
Grant permissions to Role_name.
Oracle uses commands to create table spaces, users, and to authorize and revoke permissions for users.