Software Testing

k2G9Eo9
RdZQRt6

Popular Posts

GRANT


SQL GRANT is a command used to provide access or privileges on the database objects to the users.
Data Control Language(DCL) is used to control privilege in Database. To perform any operation in the database, such as for creating tables, sequences or views we need privileges. Privileges are of two types:
  • System: creating a session, table etc are all types of system privilege.
  • Object : any command or query to work on tables comes under object privilege:
  • GRANT privilege_name 
    ON object_name 
    TO {user_name | PUBLIC |role_name} 
    [WITH GRANT OPTION]; 
    To Allow a User to create Session
    GRANT CREATE SESSION TO username;
    To Allow a User to create Table
    GRANT CREATE TABLE TO username;
    To provide User with some Space on Tablespace to store Table
    ALTER USER username quota UNLIMITED ON SYSTEM;
    To GRANT all privilege to a User
    GRANT sysdba TO username
    To GRANT permission to Create any Table
    GRANT CREATE any TABLE TOusername
    To GRANT permission to Drop any Table
    GRANT DROP any TABLE TOusername
    To take back Permissions
    REVOKE CREATE TABLE FROM username

    No comments:

    Post a Comment

    BESbswy