In oracle there are different type of user accounts system, sys, hr and many more. This user accounts is by default created by oracle .If you want to create your own user then you can create it by two different methods.
By using CREATE USER command:
Step 1. Login to your database as normally you would by username and password.
Step 2. Use create user command and specify username, password as you want.
Syntax:
CREATE USER user_name IDENTIFIED BY password ;
Here ‘Geeks’ is user_name and ‘Geeks123’ is password for this user_name .create and user both are the keywords followed by username.
New user ‘Geeks’ is created and which is identified by password ‘Geeks123’ .
Output:
Step 3. You can check that user is created or not in your database by simply login as shown. here we logged in successfully with new username and password. Now you can grant the role and privileges to your new user by using grant command.
By using Database Administration Setting:
Step 1. Login into your oracle database.
Step 2. Go to administration option and then go to database user option now database users is appear as shown.
Step 3. Click on the create option present on right side. As you see create database user window now create new user and set password for that user.
Step 4. Type username as you want and password for that username. confirm the password and if you want that password is expired after some time so than you can change it so you can check the expire password box .you can also set account status lock/unlock according to privacy and give the role and privileges according to the user.
Step 5. After completion click on create option .Now you get a confirmation message that user is created in your database and you can also see that new user ‘Newgeeks’ is added in the list as shown.
Source: geeksforgeeks.org
0 comments:
Post a Comment