Published by : Obay Salah , November 19, 2024

 The basic idea is that access to the database requires the presence of a user who has access authority, otherwise the database cannot remain available to everyone.

The first thing that can be discussed here is how to create a user in the database. The database administrator must take the following into account when creating users.

1- The user name must be unique in the database and must not exceed 30 characters, and must not contain spaces and must start with a letter, not a number, for example.

2- Verification method. Whether through the database or through the operating system or otherwise.

3- Default Tablespace is the Tablespace used to create and store user objects.

4- Temporary Tablespace is the Tablespace used to create temporary objects for the user.

5- User Profile is used to manage resources and user password.

When creating a user in the database, Schema is created, which is the set of objects owned by the user, and the name of the Schema is the same as the user name.

Let's say we want to create a user named TEST.

CREATE USER TEST IDENTIFIED BY TEST DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP PROFILE DEFAULT PASSWORD EXPIRE ACCOUNT UNLOCK; 

In the previous scenario we created a user named TEST and the password for this user is also TEST, this user creates and stores his objects in the Users Tablespace,

and also stores temporary objects in the Temp Tablespace, this user must change the password upon first login, also this user is not locked i.e. he can connect directly after changing the password.

Of course, you may not need to specify the Default Tablespace and the Temporary Tablespace, in other words, if the Default Temporary Tablespace in the database is Temp

and the Default Tablespace in the database is Users, we do not need to specify that when creating the user if we do not want to change the Default.

The same is the case for the Profile, if it is not specified, the Default Profile will be granted.

Tags : Database

You May Also Like

Comments

no comment yet!