Tuesday 14 February 2017

SQL——DCL Commands

Data Control Language(DCL) is used to control privilege in Database.Data Control Language(DCL) is used to control privilege in Database.
DCL defines two commands,
  • Grant : Gives user access privileges to database.
  • Revoke : Take back permissions from user.

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 to username

TO GRANT PERMISSION TO DROP ANY TABLE

grant drop any table to username

TO TAKE BACK PERMISSIONS

revoke create table from username


No comments:

Post a Comment