Steps of Creating New User in Oracle
1. Create a new user providing user name and password.
Connect to the Oracle SQLPLUSW. Run the following code:
CREATE USERNAME
Example:
CREATE USER sams
IDENTIFIED BY myoracle;
While creating the user, you can define the default tablespace and default temporary space also. The combined syntax will then be like below:
CREATE USER sams
IDENTIFIED BY myoracle
DEFAULT TABLESACE system
TEMPORARY TABLESPACE temp;
2. Grant the user with essential privileges. One should consider well before granting access to the newly created user. The privileges can be assigned in many layers. For example you can assign the user with the DBA administrative privilege. On the other hand you can also limit the general user with the SELECT, INSERT, UPDATE or DELETE privileges to certain table(s).
The syntax follows:
GRANT CONNECT, RESOURCE to sams
GRANT DBA to sams
GRANT (SELECT INSERT UPDATE DELETE) ON TableName
Example:
GRANT SELECT ON Employees to sams;
Happy Oracling!
0 comments:
Post a Comment
Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!