Oracle SQL in 10 Minutes - Asim Abbasi

CH1: SQL Basics | CH2:  SQL Operators | CH3:  SQL Built-in Functions | CH4: SQL Joins | CH5: UPDATE, INSERT & DELETE Statements | CH6: CREATE, ALTER & DROP Statements | CH7: Constraints | CH8: Linking Tables vs Joining Tables | CH9: SQL Statements for Other Database Objects | CH10: SQL Statements for Database Security

Chapter 10: SQL Statements for Database Security

Page #: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

 

On the other hand if its set to blank (os_authent_prefix = “ ”) then no prefix is required as shown in the following example.

CREATE USER sophia
IDENTIFIED EXTERNALLY;

Example:

ALTER USER sophia
IDENTIFIED BY black123;

Or,

ALTER USER sophia
DEFAULT TABLESPACE hr_data;

To change the password of sophia or anything else related to user, use the ALTER USER statement.

Once you have created the user and assigned him/her default tablespace then the next thing is to grant that user is ready to go. He can now create database objects (tables, views etc) under his schema. You can also assign him access to objects under your schema using GRANT statement and you can also take that privilege back using the REVOKE statement.

Chapter 10: SQL Statements for Database Security

Page #: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

CH1: SQL Basics | CH2:  SQL Operators | CH3:  SQL Built-in Functions | CH4: SQL Joins | CH5: UPDATE, INSERT & DELETE Statements | CH6: CREATE, ALTER & DROP Statements | CH7: Constraints | CH8: Linking Tables vs Joining Tables | CH9: SQL Statements for Other Database Objects | CH10: SQL Statements for Database Security

Share with others: