How to create new user in oracle and how to give permission to them in oracle?

1)       Write the syntax for Grant, Revoke and create user with appropriate option.
*       Syntax of Create User:-
             CREATE USER “<dba_set>”
PROFILE “<default>”
IDENTIFIED BY “<password>”
DEFAULT TABLESPACE “SYSTEM”
TEMPORARY TABLESPACE “TEMP”
ACCOUNT UNLOCK;          
*       Syntax of Create GRANT:-
GRANT object privileges
ON object name
FROM user name;
*       Syntax of Create REVOKE:-
    REVOKE object privileges
    ON object name
    FROM user name;
2)       Create a user Nishant with appropriate password.
*       create user "Nishant" identified by renuka default tablespace COMP12 temporary tablespace temp quota 10m on COMP12;
*       User created.

3)       Give the permission to user Nishant to view records from the table account along with all option to further grant permission on this table to other user.
*       grant select,update on account to "Nishant" with grant option;
*       Grant succeeded.

4)       Give the user Nishant to all data manipulation privileges or permission on the table P1 without an option to further grant permission to other user.
*       grant all on P1 to "Nishant";
*       Grant succeeded.

Post a Comment

0 Comments