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
To create a new user (schema) you should login to
Oracle Instance using one of the DBA’s account and then user the CREATE
USER statement to create new user.
Example:
CREATE USER sophia
IDENTIFIED BY evergreen
DEFAULT TABLESPACE user_demo;
This statement will create a new user with the login as sophia and
password as evergreen and whatever objects (tables, views etc.) that
user sophia will create will reside in the user_demo tablespace. Such
types of accounts are called “Database-Authenticated User Accounts”
where users get verified by the database. There is another form of
authentication which is called “Externally Authenticated User Accounts”
or also known as OPS$ accounts. Such users get verified by OS once they
log in. When Oracle 6 was introduced such category of accounts were to
be prefixed with OPS$ and that’s why we call them OPS$ user accounts. If
os_authent_prefix init.ora paramenter is left as default i.e. OPS$, then
the Externally Authenticated User Account can be created as follows.
CREATE USER ops$sophia
IDENTIFIED EXTERNALLY;
Chapter 10: SQL Statements for Database Security
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: