SQL tutorial 46: What are System Privileges & How To Grant them using Data Control Language
Skills:
SQL Analytics90%
Key Takeaways
Covers granting system privileges using Data Control Language in Oracle Database
Full Transcript
what's up internet welcome back once again this is Manish from reali.com and as I promised in my previous video today we will learn about system privileges in this SQL tutorial as we have already discussed in the previous video system privileges are some powerful special rights given to a user to perform a standard administrator task in the database as these rights are quite powerful that means you should be a bit cautious while granting them I have done a blog post over system privileges on my website where I have explained everything in detail I encourage you to read it so without wasting much time let's jump over SQL Developer and start the fun for the demonstration I will use two users Hulk and Batman which I created during my create user tutorial if you haven't watched the tutorial on how to create user then find the link in the description box Hulk and Batman both these users are normal users and don't have any rights or privileges except the create session system privilege so now I'm going to demonstrate you the different ways of granting system privilege to these user as you know to assign any privilege to any user in Oracle database we use Grant data control language statement or DCL statement and to use Grant statement you must have either Grant any privilege system privilege or you must have been granted the system privilege with admin option and if you are a CIS GBA then you can simply log on to your database using CIS user with CIS GBA privileges which I'm going to do right now I'm going to connect to my database using my CIS user and now I'm connected to my database using my sis user let me show you the user funds as you can see my user assist now let's perform our first cury in our first cury we will grant a very basic privilege which is create table to our user Hulk to Grant create table system privilege to user Hulk we will write this cury is fairly simple Grant is an oracle keyword followed by create table which is the name of system privilege which we want to Grant to our user H then we have another keyword two followed by the username hul to which we want to assign this privilege isn't it simple now let's execute Grant succeeded now let's move on to the second cury generally after creating a user we have to Grant several system privileges to them in this case you can either write separate Grant statement for granting individual privilege or we can Club all the privilege in a single Grant statement let's see how say we want to Grant create synonyms create View and create sequence system privilege to the user hul for that we will write cury is very similar to the above one except that here we write all the system privileges together and have them separated using comma but here we have to take care of a few things such as this list of privileges must only contain system Privileges and not any object privileges this is because system Privileges and object privileges cannot be granted together in a single Grant command remember this tip because if you are preparing for SQL expert exam then chances are there that you may face this question let's execute Grant succeeded now third cury in the previous quy we saw how to Grant more than one system privileges to only one user in single Grant statement what if you want to Grant privileges to more than one user in this cury we will see how to Grant system privileges to more than one user in single Grant statement let's say we want to Grant create procedure system privilege to both our user Hulk and Batman for that the cury will be cury is pretty similar to the last one except that this time we write the username separated by a comma now let's move on to our next cury cury 4 in this cury I will demonstrate you how to Grant system privilege with admin option but before moving ahead let me tell you that you can use admin option flag only while granting system privileges not with object privileges granting a system privilege with admin option flaged means that the grantee can grant or revoke the system privilege or role to or from any user or any other role in the database also the grantee can further Grant the system privilege or role with the admin option to any other user or role so let's say we want to Grant create trigger system privilege to our user Batman with admin option then for that we will write on executing this cury our user Batman not only gets create trigger system privilege but can also Grant revoke and drop the create trigger privilege to and from any user and roles so let's execute this query granted succeeded now our user Batman has create trigger system privilege with admin option means user Batman can now Grant this create trigger system privilege to any other user let me demonstrate this thing to you for that what I will do I will use my command prompt and here is our Command Prompt now what I will do I will will connect to my database using the user Batman for that I will write now I'm connected to my database using the user Batman let me show you as you can see the user is Batman now I will grant the create trigger system privilege to use a Hulk using the user batchman for that we have to write if you want you can also add with admin option here now hit enter Grant is succeeded see that is the purpose of with admin option flag that's it for today's guys follow me on my social networking for regular updates and tips and tricks on Oracle database all the links are in the description below give me thumbs up if you like this video and want me to do more such videos you can also comment and tell me how you like this video that will make me really happy don't forget to subscribe we'll see you soon guys this is Manish from Rebellion rer
Original Description
In this SQL Tutorial you will learn How To Grant System Privilege using Grant Data Control Language (DCL) along with ADMIN OPTION flag.
First SQL Tutorial in the series of user privileges in oracle database
------------------------------------------------------------------------
►►►Timeline◄◄◄
1:50- Query 1- How To grant Basic System Privilege (i.e.Create Table system privilege) to a user
2:40- Query 2 - How to Grant Multiple System Privilege To a user in Single Grant (Data Control Language) Statement
3:52- Query 3 - How To grant System Privilege To Multiple Users in Single Grant (Data Control Language) Statement
4:50- Query 4- How To Grant System Privilege WITH ADMIN OPTION flag
5:26- WITH ADMIN OPTION demonstration
------------------------------------------------------------------------
Celebrating 1000 subscribers. Thanks a lot guys for all your love and support.
------------------------------------------------------------------------
►►►LINKS◄◄◄
Blog (Link for SQL Script is at the end of this article) : http://bit.ly/system_privilege_admin_option
Link for How To create user
●SQL Tutorial 37 - Using Create User Statement
http://youtu.be/4QbK2Y-1LZw
●SQL Tutorial 38- Using SQL Developer
http://youtu.be/GS4udgR44Ls
●SQL Tutorial 39- Using Oracle Enterprise Manager
http://youtu.be/zGjh-Bb3HrI
List of few System Privileges Available in Oracle Database
http://wp.me/p3r6sw-7M
Previous Tutorial: Introduction To User Privileges
http://youtu.be/iQFb86lM1gs
-------------------------------------------------------------------------
Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage
https://copy.com?r=kb4rc1
--------------------------------------------------------------------------
►Make sure you SUBSCRIBE and be the first one to see my videos!
--------------------------------------------------------------------------
Amazon Wishlist: http://bit.ly/wishl
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Manish Sharma · Manish Sharma · 53 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
▶
54
55
56
57
58
59
60
Oracle Database tutorials 1: How to install Oracle Database 11g on windows 7
Manish Sharma
Oracle Database tutorials 2:How To install SQL Developer on windows 7
Manish Sharma
Oracle Database tutorials 3:How to enable Line numbers in SQL Developer.
Manish Sharma
Oracle Database tutorials 4: database connectivity using SQL developer and command prompt
Manish Sharma
Oracle Database tutorials 5: how to Fetch Data using SELECT - SQL statement by Manish Sharma
Manish Sharma
Oracle Database11g tutorials 6 | | How to use Concatenation operator, character String
Manish Sharma
Oracle Database11g tutorials 7 | |SQL DISTINCT keyword || SQL tutorials
Manish Sharma
Canon EOS 600D 2 lens kit/Canon rebell EOS T3i 2 lens kit Unboxing
Manish Sharma
First look: ORACLE CERTIFIED ASSOCIATE (OCA) CERTIFICATE - ORACLE DATABASE ADMINISTRATOR
Manish Sharma
Oracle Database11g tutorials 8 || SQL DISTINCT with multiple columns |SQL Distinct with Two columns
Manish Sharma
Oracle Database11g tutorials 9 || What is archive log mode and how to enable archive log mode
Manish Sharma
Oracle Database11g tutorials 10 || SQL Single Row Function (SQL Functions )
Manish Sharma
Oracle Database11g tutorials 11: SQL case manipulation function in Oracle Database
Manish Sharma
how to add channel trailer and section on your youtube channel 2014
Manish Sharma
Oracle Database11g tutorials 12 || SQL Concat Function - SQL character manipulation function
Manish Sharma
Oracle Database11g tutorials 13 || SQL substr function / SQL substring function
Manish Sharma
Oracle Database11g tutorials 14 : How to CREATE TABLE using sql developer and command prompt
Manish Sharma
SQL tutorials 15 || How To CREATE TABLE using enterprise manager 11g
Manish Sharma
Oracle Database11g tutorials 16: How to uninstall oracle 11g from windows 7 64 bit
Manish Sharma
ORACLE CERTIFIED PROFESSIONAL(OCP) CERTIFICATE First look - ORACLE DATABASE ADMINISTRATOR
Manish Sharma
Plantronics audio 655 USB headset with Mic Unboxing and Review and Plantronics audio 655 Mic test
Manish Sharma
SQL tutorials 17: SQL Primary Key constraint, Drop primary Key
Manish Sharma
SQL tutorials 18: SQL Foreign Key Constraint By Manish Sharma
Manish Sharma
SQL tutorial 19: ON DELETE SET NULL clause of Foreign Key By Manish Sharma (RebellionRider)
Manish Sharma
SQL tutorials 20: On Delete Cascade Foreign Key By Manish Sharma (RebellionRider)
Manish Sharma
SQL tutorial 21: How To Rename Table in SQL using ALTER TABLE statement By Manish Sharma
Manish Sharma
SQL tutorial 22: How to Add / Delete column from an existing table using alter table
Manish Sharma
SQL tutorial 23: Rename and Modify Column Using Alter Table By Manish Sharma (RebellionRider)
Manish Sharma
SQL tutorial 24 :SQLJoins- Natural Join With ON and USING clause By Manish/Rebellionrider
Manish Sharma
Oracle Database11g tutorials 25: How to install Oracle Database 11g Express Edition R2 on Windows 7
Manish Sharma
SQL tutorial 26: Introduction to SQL Joins in Oracle Database
Manish Sharma
Vidcon 2014 YouTube Fan Funding: How to enable fan funding on YouTube Channel
Manish Sharma
SQL tutorial 27: Right Outer Join in SQL by Manish Sharma for RebellionRider
Manish Sharma
SQL tutorial 28: Left Outer Join By Manish Sharma / RebellionRider
Manish Sharma
SQL tutorial 29: Full Outer Join with example By Manish Sharma/ RebellionRider
Manish Sharma
SQL tutorial 30: Inner Join In SQL by Manish Sharma/RebellionRider
Manish Sharma
SQL tutorial 31 : SQL Cross Join In Oracle Database By Manish Sharma from RebellionRider
Manish Sharma
SQL tutorial 32: How To Insert Data into a Table Using SQL Developer
Manish Sharma
SQL tutorial 33:How To Insert Data into a Table Using SQL INSERT INTO dml statement
Manish Sharma
SQL tutorial 34: How to copy /Insert data into a table from another table using INSERT INTO SELECT
Manish Sharma
SQL tutorial 35: DELETE and TRUNCATE how to delete data from a table
Manish Sharma
SQL tutorial 36: how to create database using database configuration assistant DBCA
Manish Sharma
SQL tutorial 37: How to create NEW USER account using Create User statement in Oracle database
Manish Sharma
SQL tutorial 38: How to create user using SQL Developer in Oracle database
Manish Sharma
SQL tutorial 39: How to create user in oracle using Enterprise Manager
Manish Sharma
SQL tutorial 40: DBA Trick, How to drop a user when it is connected to the database
Manish Sharma
Motorola Moto G 2nd Generation / G2 Unboxing and Review
Manish Sharma
SQL tutorial 41: How to UNLOCK USER in oracle Database
Manish Sharma
SQL tutorial 42: How to Unlock user using SQL Developer By Manish Sharma RebellionRider
Manish Sharma
SQL tutorial 43: How to create an EXTERNAL USER in oracle database By Manish Sharma RebellionRider
Manish Sharma
SQL tutorial 44: How to import data from Microsoft Excel to Oracle Database using SQL Developer
Manish Sharma
SQL tutorial 45: Introduction to user Privileges in Oracle Database By Manish Sharma RebellionRider
Manish Sharma
SQL tutorial 46: What are System Privileges & How To Grant them using Data Control Language
Manish Sharma
SQL tutorial 47: How to Grant Object Privileges With Grant Option in Oracle Database
Manish Sharma
SQL tutorial 48: How to create Roles in Oracle Database
Manish Sharma
SQL tutorial 49: CASE - Simple Case Expression in Oracle Database (1/2)
Manish Sharma
SQL tutorial 50: CASE - Searched Case Expression In Oracle (2/2)
Manish Sharma
SQL tutorial 51: DECODE function in Oracle Database By Manish Sharma (RebellionRider)
Manish Sharma
Oracle Database Tutorial 52 : Data Pump expdp - How to Export full database using expdp
Manish Sharma
Oracle Database Tutorial 53 : Data pump expdp - How to Export tablespace in Oracle Database
Manish Sharma
More on: SQL Analytics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
The HiPPO is always right
Dev.to · Sharmin Sirajudeen
How to Extract Saudi Arabia Property Data Across Bayut.sa, Wasalt.sa, Aqar.fm and PropertyFinder.sa
Dev.to · Omar Eldeeb
Norway vs France (1:4) — A 97% Crime Index Anomaly: When Ruthless Efficiency Buries the xG Evidence
Medium · Data Science
How to Build an H-1B Salary Database by Employer (the Real Data Source + Python)
Dev.to · Omar Eldeeb
🎓
Tutor Explanation
DeepCamp AI