SlideShare a Scribd company logo
1 of 29
Security in
ORACLE RDBMS
By
total output power solutions
28/07/2019 total output power solutions
SECURITY IN ORACLE RDBMS
Sql * plus
Oracle Form
Visual Basic
USERNAME /
PASSWORD
ORACLE
DATABASE
ORACLE
USER
• USERNAME should be defined in the database.
• There exists a SCHEMA by the same name in the database.
• User has access to all the objects in his schema.
• To carry out any activity in Database, you need a Priviledge.
• To work on any Object belonging to other user, he must grant
the required privilege to you
USER‟S SECURITY DOMAIN
U
Direct Privileges
System & Object
Privileges
Indirect
Privileges
( Through Roles )
Default Tablespace
Tablespace Quotas
Temporary Tablespace
Resource Limits
( Defined by Profiles)
Privileges & Roles
U
System Privileges
• create user
• create session
• create table
• alter session
• drop tablespace
• create procedure
• alter database
• create ANY table
• select ANY table
• drop user
• execute any
procedure
• drop any table
Object Privileges
• select
• insert
• update
• delete
• alter
• execute
• index
• references
• all
OBJECT
ROLEROLE
Pre- Defined Roles
Connect ALTER SESSION, CREATE CLUSTER, CREATE
SEQUENCE, CREATE SESSION, CREATE SYNONYM,
CREATE TABLE, CREATE VIEW
Resource CREATE CLUSTER, CREATE PROCEDURE,
CREATE SEQUENCE, CREATE TABLE, CREATE
TRIGGER ( Take care -- Unlimited Table space )
DBA All system privileges WITH ADMIN OPTION
EXP_FULL_DATABASE , IMP_FULL_DATABASE
SELECT_CATALOG_ROLE , DELETE_CATALOG_ROLE
EXECUTE_CATALOG_ROLE
Database Administrator - Responsibilities
• Installing / Upgrading Oracle server
• Allocating system storage
• Enrolling users and maintaining system security
• Controlling and monitoring user access to the database
• Monitoring and optimizing the performance of the
database
• Manage backup and recovery of database
• Creating primary objects (tables, views, indexes) once
application developers have designed an application
• Modifying the database structure, as necessary
ORACLE - Default User Accounts
SYS Initial password : change_on_install
SYSTEM Initial password : manager
When Oracle Database is installed, some users like System,
SYS, Scott are created and assigned privileges
• Data Dictionary base tables and views are stored in SYS-schema
SCOTT Initial password : tiger
& Otherslike
PO8, DEMO etc
• Change passwords of SYS & System as soon as possible.
• Both SYS & System have the DBA role
• User tables & other objects should not be created in these
schema.
• Never use the user scott for your main Database.
Creating Users
Who can create a user ? CREATE USER system privilege
Command :
Create user < username >
identified externally / identified by <
password >
default tablespace < tablespace name >
temporary tablespace < tablespace name >
quota n k/m on< tablespace>
quota n ...... On .....
Profile < profile name >
Users & Necessary Privileges
Connect system / manager
create user ram identified by r11;
ERROR
Connect system/manager
grant create session to ram;
Connected
Connect system/manager
grant create table to ram;
Conn ram/r11
create table t1(n number);
ERRORConnect ram/ r11
Connect ram/ r11
Connect system / manager
alter user ram default
tablespace user_data quota
1m on user_data;
Conn ram/r11
create table t1(n number);
Connect system / manager
drop user ram cascade
create user ram identified by
r11;
grant create session, resource
to ram;
Resource Role
also gives Unlimited
Tablespace
alter user ram identified by r22;
DBA can change
User‟s password
When User owns objects
cascade is required
conn ram/r22
alter user ram identified by r11;
A User can change
his own password
conn system/manager
alter user ram identified by r11
account lock;
DBA can lock a user‟s
account
conn ram/r11; ORA-28000: the account is locked
Granting System Privileges
conn system/manager
grant select any table to ram;
Conn ram / r22;
select * from scott.imp;
Revoking the Privilege
conn system/manager
revoke select any table from ram;
For granting system privileges, you must
have the privilege –”With Admin Option”
or the system privilege : Grant ANY
Privilege
Administrative Powers For System Privileges :
System System Privilege S
with Admin Option
User a S
User b
S
System Revoke S
User a
S
User b
S
with
admi
n
optio
n
connect system / manager
create user a identified by a11;
create user b identified by b11;
create user c identified by c11;
grant connect to a,b,c;
grant select any table to a with admin
option;
Revoke S
S
Connect a /a11
grant select any table to b with admin option;
Connect b/b11
revoke select any table from a;
Connect b/b11
select * from scott.imp;
select * from user_sys_privs;
Try select
Connect system/manager
grant select any table to a;
Try select
Connect b/b11
revoke select any table from a;
Connect system/manager
revoke select any table from b;
B still has the
Privilege
Conn a/a11
select * from
scott.imp ;
SYSTEM PRIVILEGES
• As of Oracle 8i there are 126 system privileges
• System Privileges are broadly in following categories :
* Enabling System wide operations ( create tablespace, --
session)
* Enabling Management of User‟s own schema ( create table ,
etc)
* Enabling Management in any schema ( create Any table etc)
• System Privileges should be assigned with great caution,
especially, the Admin Option
• ANY keyword gives the user privilege in every schema. Drop
Any --- privileges can be misused to destroy the database.
• The DBA Role has all the System Privileges.
• DBA_SYS_PRIVS view displays all System Privileges.
• SESSION_PRIVS view displays all System Privileges granted
to Roles and Users at the session level.
Object Privileges
Conn system/manager
select * from dba_sys_privs where grantee in
('A','B','C');
conn scott/tiger
grant select on staff to a;
Conn a/a11
select * from scott.staff;
conn scott/tiger
grant insert on loans to a;
Conn a/a11
insert into scott.loans
(name,loanamt)
values('SATHE',20000);
conn scott/tiger
grant update(qty) on imp
to b;
conn b/b11
update scott.imp set
qty=0 where qty<5;
Object Privilege can be given selectively on a column
conn scott/tiger
revoke delete on imp from a;
conn a/a11
delete from scott.imp;
select * from scott.imp;
conn scott/tiger
grant all on imp to a;
conn a/a11
delete from scott.imp;
rollback;
“ALL” option gives all the relevant privileges on the object
conn scott/tiger
revoke all on imp from a;
Select, Insert, Delete,update Alter, Index, ReferencesTable -
scott ALL on IMP a scottRevoke delete on IMP
Object Privilege With Grant Option
Scott
Obj. Privilege O
with GrantOption
User a
O (G)
(G)
User b
O (G)
User
C OScott Revokes the
Object Privilege O
User
a
User
b
User
C
Scott
Obj. Privilege O
with GrantOption
User
a (G)
User
b(G)
User
C
User
a (G) O
User
C
Object Privilege With Grant Option
conn scott/tiger
grant select on loans to a
with grant option;
conn a/a11
grant select on scott.loans to b with
grant option;
conn b/b11
grant select on
scott.loans to c;
conn c/c11
select * from scott.loans;
conn scott/tiger
select * from
user_tab_privs;
conn c/c11
select * from scott.loans;
Conn scott/tiger
revoke select on
loans from a;
conn c/c11
select * from scott.loans;
Listing Privileges
ALL_TAB_PRIVS shows all grants on objects for which
the USER OR PUBLIC is Grantee
select * from all_tab_privs
where grantee <>'PUBLIC'
ALL_TAB_PRIVS_MADE shows all grants on objects
for which the USER is the OWNER or GRANTER
conn scott/tiger
select * from all_tab_privs_made;
COLUMN_PRIVILEGES : Shows grants on columns for
which the user is grantor or the User or Public is grantee
USER_TAB_PRIVS shows grants on objects for which the
user is Owner, Granter or Grantee
ROLES
Role is a named collection of Privileges
P1 P2 P3 P4 P1 P2 P3 P4
U1 U2 U3 U4
R
U1 U2 U3 U4
ROLE -- FEATURES
Role
S O
USER Role
S O
ROLES
O
O
S
O
O
O
S
O
O
USER
O
ROLE
S
DBA
S
USER ROLE
With Grant
Option
OWNER
ROLE
With Admin
Option
USER
ROLE
USER
O
Creating Roles
Connect system/manager
create role rs ;
grant select any table to rs;
grant rs to a;
grant rs to b with admin option;
conn a/a11;
select * from scott.imp;
Connect b/b11;
grant rs to c;
Connect c/c11
select * from scott.staff;
Create a Role
Grant Privileges
to the Role
Grant the Role
to Users
Connect system/manager
create role ru;
Connect scott/tiger
grant update on loans to ru;
Connect system/manager
grant ru to a;
Connect a/a11
update scott.loans set
loanamt=20000 ;
rollback;
Connect scott/tiger
grant update on imp
to ru;
Connect a/a11
update scott.imp set qty=50;
rollback;
Connect system/manager
grant drop any table to a;
grant drop any table to rs;
revoke drop any table from rs;
Role ru
Add one more
privilege
to role ru
User a still
has the privilege
Connect system/manager
create role rd identified by rd11;
grant delete any table to rd;
grant rd to c;
Connect c/c11
delete from scott.staff;
rollback;
set role rs;
delete from scott.imp;
ORA-01031: insufficient
privileges
set role rd identified by rd11;
delete from scott.imp;
rollback;
Setting a particular role resulted in disabling other roles
Roles -- Enabled / Disabled & Default Roles
Roles r1,r2
Roles with
passwords -r3
USER
Roles are always
enabled by default
USER
All granted roles
enabled (r1,r2,r3)
Alter user
set Default roles
r1,r2
Alter user
set Default roles
ALL except r1
Alter user
set Default roles NONE
D B A
set roles
r1,r2
set roles
r3 identified by ***
set roles
ALL except r3
The Roles NOT
mentioned in
these commands
will be disabled
Experiments With Roles
Connect system/manager
grant rs,ru,rd to b;
Connect b/b11
select * from session_roles;
select * from user_role_privs;
USERNAME GRANTED_ROLE ADMIN DEFAULT_ROLE
-------- ---------- ----- ----------
B CONNECT NO YES
B RD NO YES
B RS NO YES
B RU NO YES
Connect system/manager
alter user b default role connect,rs;
DEFAULT_ROLE
--------
YES
NO
YES
NO
Conn b/b11
select * from user_role_privs;
set role connect,rs,ru,rd identified
by rd11
Have to mention
already enabled roles
set role none;
set role all;
ORA-01979: missing or invalid
password for role 'RD'
set role all except rd;
conn system/manager;
alter user b default role all;
Role with Admin Option :
• Grantee can grant the role to other user or Role
• Grantee can revoke the role from other users
• Grantee can alter Or Drop the role
Set Role All :
• Enables all Roles except those mentioned in Except clause.
• Can not use this option to enable roles with passwords.
„View‟-ing Roles & Privileges
Dba_roles : Lists all the system &
Other roles
Session_roles : System & Other
Roles enabled for the user in session
role_sys_privs :Roles to which the
user has access, System privoleges
granted to roles
dba_role_privs :Roles granted to
users & to other roles
role_role_privs: Roles to which
user has access. Shows Roles granted
to other roles
ROLE
GRANTED_ROLE
ADMIN_OPTION
GRANTEE
GRANTED_ROLE
ADMIN_OPTION
DEFAULT_ROLE
ROLE
PRIVILEGE
ADMIN_OPTION
ROLE
PASSWORD
ROLE
user_role_privs : Shows details of
roles granted to the user
USERNAME
GRANTED_ROLE
ADMIN_OPTION
DEFAULT_ROLE
28/07/2019 total output power solutions

More Related Content

What's hot

MySQL partitioning
MySQL partitioning MySQL partitioning
MySQL partitioning OracleMySQL
 
MSBI Classroom Training with Realtime Project
MSBI Classroom Training with Realtime ProjectMSBI Classroom Training with Realtime Project
MSBI Classroom Training with Realtime ProjectSequelGate
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaEdureka!
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
 
Power BI: Types of gateways in Power BI
Power BI: Types of gateways in Power BIPower BI: Types of gateways in Power BI
Power BI: Types of gateways in Power BIAmit Kumar ☁
 
Controlling User Access -Data base
Controlling User Access -Data baseControlling User Access -Data base
Controlling User Access -Data baseSalman Memon
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST APINishanth Kadiyala
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse FundamentalsRashmi Bhat
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptxSurya937648
 
SQL window functions for MySQL
SQL window functions for MySQLSQL window functions for MySQL
SQL window functions for MySQLDag H. Wanvik
 
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Altinity Ltd
 
How to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB PostgresHow to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB PostgresAshnikbiz
 
Introduction To Oracle Sql
Introduction To Oracle SqlIntroduction To Oracle Sql
Introduction To Oracle SqlAhmed Yaseen
 
Oracle Table Partitioning - Introduction
Oracle Table Partitioning  - IntroductionOracle Table Partitioning  - Introduction
Oracle Table Partitioning - IntroductionMyOnlineITCourses
 
Converting bso formulas to aso formulas
Converting bso formulas to aso formulasConverting bso formulas to aso formulas
Converting bso formulas to aso formulasAmit Sharma
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL ISankhya_Analytics
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleGuatemala User Group
 

What's hot (20)

MySQL partitioning
MySQL partitioning MySQL partitioning
MySQL partitioning
 
MSBI Classroom Training with Realtime Project
MSBI Classroom Training with Realtime ProjectMSBI Classroom Training with Realtime Project
MSBI Classroom Training with Realtime Project
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | Edureka
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
Power BI: Types of gateways in Power BI
Power BI: Types of gateways in Power BIPower BI: Types of gateways in Power BI
Power BI: Types of gateways in Power BI
 
Controlling User Access -Data base
Controlling User Access -Data baseControlling User Access -Data base
Controlling User Access -Data base
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST API
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse Fundamentals
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
SQL window functions for MySQL
SQL window functions for MySQLSQL window functions for MySQL
SQL window functions for MySQL
 
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
 
How to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB PostgresHow to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB Postgres
 
Introduction To Oracle Sql
Introduction To Oracle SqlIntroduction To Oracle Sql
Introduction To Oracle Sql
 
Oracle Table Partitioning - Introduction
Oracle Table Partitioning  - IntroductionOracle Table Partitioning  - Introduction
Oracle Table Partitioning - Introduction
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
Converting bso formulas to aso formulas
Converting bso formulas to aso formulasConverting bso formulas to aso formulas
Converting bso formulas to aso formulas
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 
Sql views
Sql viewsSql views
Sql views
 
SAP BI/BW
SAP BI/BWSAP BI/BW
SAP BI/BW
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
 

Similar to Security in ORACLE RDBMS

e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user accessecomputernotes
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificadaTitiushko Jazz
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificadaTitiushko Jazz
 
Managing Oracle Streams Using Enterprise Manager Grid Control
Managing Oracle Streams Using Enterprise Manager Grid ControlManaging Oracle Streams Using Enterprise Manager Grid Control
Managing Oracle Streams Using Enterprise Manager Grid Controlscottb411
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Accesssiavosh kaviani
 
D73549GC10_06.pptx
D73549GC10_06.pptxD73549GC10_06.pptx
D73549GC10_06.pptxVLQuyNhn
 
Oracle Database Security For Developers
Oracle Database Security For DevelopersOracle Database Security For Developers
Oracle Database Security For DevelopersSzymon Skorupinski
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demoViaggio Italia
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4uzzal basak
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data RedactionAlex Zaballa
 
Performance schema and_ps_helper
Performance schema and_ps_helperPerformance schema and_ps_helper
Performance schema and_ps_helperMark Leith
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 

Similar to Security in ORACLE RDBMS (20)

e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user access
 
Les13
Les13Les13
Les13
 
Les14
Les14Les14
Les14
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificada
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificada
 
Managing Oracle Streams Using Enterprise Manager Grid Control
Managing Oracle Streams Using Enterprise Manager Grid ControlManaging Oracle Streams Using Enterprise Manager Grid Control
Managing Oracle Streams Using Enterprise Manager Grid Control
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Access
 
Les01
Les01Les01
Les01
 
D73549GC10_06.pptx
D73549GC10_06.pptxD73549GC10_06.pptx
D73549GC10_06.pptx
 
Oracle Database Security For Developers
Oracle Database Security For DevelopersOracle Database Security For Developers
Oracle Database Security For Developers
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
dba
dbadba
dba
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
Xpp b tspitr
Xpp b tspitrXpp b tspitr
Xpp b tspitr
 
Xpp b tspitr
Xpp b tspitrXpp b tspitr
Xpp b tspitr
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
 
Performance schema and_ps_helper
Performance schema and_ps_helperPerformance schema and_ps_helper
Performance schema and_ps_helper
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 

More from Manohar Tatwawadi

Frequently Asked Questions on TURBINE Part 3
Frequently Asked Questions on TURBINE Part 3Frequently Asked Questions on TURBINE Part 3
Frequently Asked Questions on TURBINE Part 3Manohar Tatwawadi
 
Green building concepts and good building practices
Green building concepts and good building practicesGreen building concepts and good building practices
Green building concepts and good building practicesManohar Tatwawadi
 
Auxiliary Consumption and Saving due to Increase in Boiler Efficiency
Auxiliary Consumption and Saving due to Increase in Boiler EfficiencyAuxiliary Consumption and Saving due to Increase in Boiler Efficiency
Auxiliary Consumption and Saving due to Increase in Boiler EfficiencyManohar Tatwawadi
 
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIES
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIESCOMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIES
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIESManohar Tatwawadi
 
Frequently asked questions on turbines Part 1
Frequently asked questions on turbines Part 1Frequently asked questions on turbines Part 1
Frequently asked questions on turbines Part 1Manohar Tatwawadi
 
Cooling towers in thermal power plants
Cooling towers in thermal power plantsCooling towers in thermal power plants
Cooling towers in thermal power plantsManohar Tatwawadi
 
Electrical safety in power stations
Electrical safety in power stationsElectrical safety in power stations
Electrical safety in power stationsManohar Tatwawadi
 
Cost accounting, cost control and cost reduction in TPS
Cost accounting, cost control and cost reduction in TPSCost accounting, cost control and cost reduction in TPS
Cost accounting, cost control and cost reduction in TPSManohar Tatwawadi
 
Environmental and pollution control in Thermal Power Stations
Environmental and pollution control in Thermal Power StationsEnvironmental and pollution control in Thermal Power Stations
Environmental and pollution control in Thermal Power StationsManohar Tatwawadi
 
Energy Audit & Energy Conservation Opportunities in Electrical Equipments ...
Energy Audit & Energy  Conservation  Opportunities in  Electrical Equipments ...Energy Audit & Energy  Conservation  Opportunities in  Electrical Equipments ...
Energy Audit & Energy Conservation Opportunities in Electrical Equipments ...Manohar Tatwawadi
 
Fuels and Combustion Equations
Fuels and Combustion EquationsFuels and Combustion Equations
Fuels and Combustion EquationsManohar Tatwawadi
 
Basics of thermal power stations
Basics of thermal power stationsBasics of thermal power stations
Basics of thermal power stationsManohar Tatwawadi
 
Handling of turbine during emergencies
Handling of turbine during emergenciesHandling of turbine during emergencies
Handling of turbine during emergenciesManohar Tatwawadi
 
Effect of Coal Quality and Performance of Coal pulverisers / Mills
Effect of Coal Quality and Performance of Coal pulverisers / MillsEffect of Coal Quality and Performance of Coal pulverisers / Mills
Effect of Coal Quality and Performance of Coal pulverisers / MillsManohar Tatwawadi
 
Thermal power plant efficiency
Thermal power plant efficiencyThermal power plant efficiency
Thermal power plant efficiencyManohar Tatwawadi
 
210 mw turbine cycle heat rate
210 mw turbine cycle heat rate210 mw turbine cycle heat rate
210 mw turbine cycle heat rateManohar Tatwawadi
 
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANT
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANTENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANT
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANTManohar Tatwawadi
 

More from Manohar Tatwawadi (20)

Power Plant Operations.pdf
Power Plant Operations.pdfPower Plant Operations.pdf
Power Plant Operations.pdf
 
Frequently Asked Questions on TURBINE Part 3
Frequently Asked Questions on TURBINE Part 3Frequently Asked Questions on TURBINE Part 3
Frequently Asked Questions on TURBINE Part 3
 
Green building concepts and good building practices
Green building concepts and good building practicesGreen building concepts and good building practices
Green building concepts and good building practices
 
Auxiliary Consumption and Saving due to Increase in Boiler Efficiency
Auxiliary Consumption and Saving due to Increase in Boiler EfficiencyAuxiliary Consumption and Saving due to Increase in Boiler Efficiency
Auxiliary Consumption and Saving due to Increase in Boiler Efficiency
 
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIES
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIESCOMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIES
COMPRESSED AIR SYSTEM . ENERGY CONSERVATION OPPORTUNITIES
 
FAQ on Turbines Part 2
FAQ on Turbines Part 2FAQ on Turbines Part 2
FAQ on Turbines Part 2
 
Frequently asked questions on turbines Part 1
Frequently asked questions on turbines Part 1Frequently asked questions on turbines Part 1
Frequently asked questions on turbines Part 1
 
Cooling towers in thermal power plants
Cooling towers in thermal power plantsCooling towers in thermal power plants
Cooling towers in thermal power plants
 
Electrical safety in power stations
Electrical safety in power stationsElectrical safety in power stations
Electrical safety in power stations
 
Cost accounting, cost control and cost reduction in TPS
Cost accounting, cost control and cost reduction in TPSCost accounting, cost control and cost reduction in TPS
Cost accounting, cost control and cost reduction in TPS
 
Environmental and pollution control in Thermal Power Stations
Environmental and pollution control in Thermal Power StationsEnvironmental and pollution control in Thermal Power Stations
Environmental and pollution control in Thermal Power Stations
 
Energy Audit & Energy Conservation Opportunities in Electrical Equipments ...
Energy Audit & Energy  Conservation  Opportunities in  Electrical Equipments ...Energy Audit & Energy  Conservation  Opportunities in  Electrical Equipments ...
Energy Audit & Energy Conservation Opportunities in Electrical Equipments ...
 
Fuels and Combustion Equations
Fuels and Combustion EquationsFuels and Combustion Equations
Fuels and Combustion Equations
 
Basics of thermal power stations
Basics of thermal power stationsBasics of thermal power stations
Basics of thermal power stations
 
Boiler light up & loading
Boiler light up & loadingBoiler light up & loading
Boiler light up & loading
 
Handling of turbine during emergencies
Handling of turbine during emergenciesHandling of turbine during emergencies
Handling of turbine during emergencies
 
Effect of Coal Quality and Performance of Coal pulverisers / Mills
Effect of Coal Quality and Performance of Coal pulverisers / MillsEffect of Coal Quality and Performance of Coal pulverisers / Mills
Effect of Coal Quality and Performance of Coal pulverisers / Mills
 
Thermal power plant efficiency
Thermal power plant efficiencyThermal power plant efficiency
Thermal power plant efficiency
 
210 mw turbine cycle heat rate
210 mw turbine cycle heat rate210 mw turbine cycle heat rate
210 mw turbine cycle heat rate
 
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANT
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANTENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANT
ENERGY AUDIT METHODOLOGY FOR TURBINE CYCLE IN A POWER PLANT
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Security in ORACLE RDBMS

  • 1. Security in ORACLE RDBMS By total output power solutions 28/07/2019 total output power solutions
  • 2. SECURITY IN ORACLE RDBMS Sql * plus Oracle Form Visual Basic USERNAME / PASSWORD ORACLE DATABASE ORACLE USER • USERNAME should be defined in the database. • There exists a SCHEMA by the same name in the database. • User has access to all the objects in his schema. • To carry out any activity in Database, you need a Priviledge. • To work on any Object belonging to other user, he must grant the required privilege to you
  • 3. USER‟S SECURITY DOMAIN U Direct Privileges System & Object Privileges Indirect Privileges ( Through Roles ) Default Tablespace Tablespace Quotas Temporary Tablespace Resource Limits ( Defined by Profiles)
  • 4. Privileges & Roles U System Privileges • create user • create session • create table • alter session • drop tablespace • create procedure • alter database • create ANY table • select ANY table • drop user • execute any procedure • drop any table Object Privileges • select • insert • update • delete • alter • execute • index • references • all OBJECT ROLEROLE
  • 5. Pre- Defined Roles Connect ALTER SESSION, CREATE CLUSTER, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE VIEW Resource CREATE CLUSTER, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER ( Take care -- Unlimited Table space ) DBA All system privileges WITH ADMIN OPTION EXP_FULL_DATABASE , IMP_FULL_DATABASE SELECT_CATALOG_ROLE , DELETE_CATALOG_ROLE EXECUTE_CATALOG_ROLE
  • 6. Database Administrator - Responsibilities • Installing / Upgrading Oracle server • Allocating system storage • Enrolling users and maintaining system security • Controlling and monitoring user access to the database • Monitoring and optimizing the performance of the database • Manage backup and recovery of database • Creating primary objects (tables, views, indexes) once application developers have designed an application • Modifying the database structure, as necessary
  • 7. ORACLE - Default User Accounts SYS Initial password : change_on_install SYSTEM Initial password : manager When Oracle Database is installed, some users like System, SYS, Scott are created and assigned privileges • Data Dictionary base tables and views are stored in SYS-schema SCOTT Initial password : tiger & Otherslike PO8, DEMO etc • Change passwords of SYS & System as soon as possible. • Both SYS & System have the DBA role • User tables & other objects should not be created in these schema. • Never use the user scott for your main Database.
  • 8. Creating Users Who can create a user ? CREATE USER system privilege Command : Create user < username > identified externally / identified by < password > default tablespace < tablespace name > temporary tablespace < tablespace name > quota n k/m on< tablespace> quota n ...... On ..... Profile < profile name >
  • 9. Users & Necessary Privileges Connect system / manager create user ram identified by r11; ERROR Connect system/manager grant create session to ram; Connected Connect system/manager grant create table to ram; Conn ram/r11 create table t1(n number); ERRORConnect ram/ r11 Connect ram/ r11 Connect system / manager alter user ram default tablespace user_data quota 1m on user_data; Conn ram/r11 create table t1(n number);
  • 10. Connect system / manager drop user ram cascade create user ram identified by r11; grant create session, resource to ram; Resource Role also gives Unlimited Tablespace alter user ram identified by r22; DBA can change User‟s password When User owns objects cascade is required conn ram/r22 alter user ram identified by r11; A User can change his own password conn system/manager alter user ram identified by r11 account lock; DBA can lock a user‟s account conn ram/r11; ORA-28000: the account is locked
  • 11. Granting System Privileges conn system/manager grant select any table to ram; Conn ram / r22; select * from scott.imp; Revoking the Privilege conn system/manager revoke select any table from ram; For granting system privileges, you must have the privilege –”With Admin Option” or the system privilege : Grant ANY Privilege
  • 12. Administrative Powers For System Privileges : System System Privilege S with Admin Option User a S User b S System Revoke S User a S User b S with admi n optio n connect system / manager create user a identified by a11; create user b identified by b11; create user c identified by c11; grant connect to a,b,c; grant select any table to a with admin option; Revoke S S
  • 13. Connect a /a11 grant select any table to b with admin option; Connect b/b11 revoke select any table from a; Connect b/b11 select * from scott.imp; select * from user_sys_privs; Try select Connect system/manager grant select any table to a; Try select Connect b/b11 revoke select any table from a; Connect system/manager revoke select any table from b; B still has the Privilege Conn a/a11 select * from scott.imp ;
  • 14. SYSTEM PRIVILEGES • As of Oracle 8i there are 126 system privileges • System Privileges are broadly in following categories : * Enabling System wide operations ( create tablespace, -- session) * Enabling Management of User‟s own schema ( create table , etc) * Enabling Management in any schema ( create Any table etc) • System Privileges should be assigned with great caution, especially, the Admin Option • ANY keyword gives the user privilege in every schema. Drop Any --- privileges can be misused to destroy the database. • The DBA Role has all the System Privileges. • DBA_SYS_PRIVS view displays all System Privileges. • SESSION_PRIVS view displays all System Privileges granted to Roles and Users at the session level.
  • 15. Object Privileges Conn system/manager select * from dba_sys_privs where grantee in ('A','B','C'); conn scott/tiger grant select on staff to a; Conn a/a11 select * from scott.staff; conn scott/tiger grant insert on loans to a; Conn a/a11 insert into scott.loans (name,loanamt) values('SATHE',20000); conn scott/tiger grant update(qty) on imp to b; conn b/b11 update scott.imp set qty=0 where qty<5; Object Privilege can be given selectively on a column
  • 16. conn scott/tiger revoke delete on imp from a; conn a/a11 delete from scott.imp; select * from scott.imp; conn scott/tiger grant all on imp to a; conn a/a11 delete from scott.imp; rollback; “ALL” option gives all the relevant privileges on the object conn scott/tiger revoke all on imp from a; Select, Insert, Delete,update Alter, Index, ReferencesTable - scott ALL on IMP a scottRevoke delete on IMP
  • 17. Object Privilege With Grant Option Scott Obj. Privilege O with GrantOption User a O (G) (G) User b O (G) User C OScott Revokes the Object Privilege O User a User b User C Scott Obj. Privilege O with GrantOption User a (G) User b(G) User C User a (G) O User C
  • 18. Object Privilege With Grant Option conn scott/tiger grant select on loans to a with grant option; conn a/a11 grant select on scott.loans to b with grant option; conn b/b11 grant select on scott.loans to c; conn c/c11 select * from scott.loans; conn scott/tiger select * from user_tab_privs; conn c/c11 select * from scott.loans; Conn scott/tiger revoke select on loans from a; conn c/c11 select * from scott.loans;
  • 19. Listing Privileges ALL_TAB_PRIVS shows all grants on objects for which the USER OR PUBLIC is Grantee select * from all_tab_privs where grantee <>'PUBLIC' ALL_TAB_PRIVS_MADE shows all grants on objects for which the USER is the OWNER or GRANTER conn scott/tiger select * from all_tab_privs_made; COLUMN_PRIVILEGES : Shows grants on columns for which the user is grantor or the User or Public is grantee USER_TAB_PRIVS shows grants on objects for which the user is Owner, Granter or Grantee
  • 20. ROLES Role is a named collection of Privileges P1 P2 P3 P4 P1 P2 P3 P4 U1 U2 U3 U4 R U1 U2 U3 U4
  • 21. ROLE -- FEATURES Role S O USER Role S O ROLES O O S O O O S O O USER O ROLE S DBA S USER ROLE With Grant Option OWNER ROLE With Admin Option USER ROLE USER O
  • 22. Creating Roles Connect system/manager create role rs ; grant select any table to rs; grant rs to a; grant rs to b with admin option; conn a/a11; select * from scott.imp; Connect b/b11; grant rs to c; Connect c/c11 select * from scott.staff; Create a Role Grant Privileges to the Role Grant the Role to Users
  • 23. Connect system/manager create role ru; Connect scott/tiger grant update on loans to ru; Connect system/manager grant ru to a; Connect a/a11 update scott.loans set loanamt=20000 ; rollback; Connect scott/tiger grant update on imp to ru; Connect a/a11 update scott.imp set qty=50; rollback; Connect system/manager grant drop any table to a; grant drop any table to rs; revoke drop any table from rs; Role ru Add one more privilege to role ru User a still has the privilege
  • 24. Connect system/manager create role rd identified by rd11; grant delete any table to rd; grant rd to c; Connect c/c11 delete from scott.staff; rollback; set role rs; delete from scott.imp; ORA-01031: insufficient privileges set role rd identified by rd11; delete from scott.imp; rollback; Setting a particular role resulted in disabling other roles
  • 25. Roles -- Enabled / Disabled & Default Roles Roles r1,r2 Roles with passwords -r3 USER Roles are always enabled by default USER All granted roles enabled (r1,r2,r3) Alter user set Default roles r1,r2 Alter user set Default roles ALL except r1 Alter user set Default roles NONE D B A set roles r1,r2 set roles r3 identified by *** set roles ALL except r3 The Roles NOT mentioned in these commands will be disabled
  • 26. Experiments With Roles Connect system/manager grant rs,ru,rd to b; Connect b/b11 select * from session_roles; select * from user_role_privs; USERNAME GRANTED_ROLE ADMIN DEFAULT_ROLE -------- ---------- ----- ---------- B CONNECT NO YES B RD NO YES B RS NO YES B RU NO YES Connect system/manager alter user b default role connect,rs; DEFAULT_ROLE -------- YES NO YES NO Conn b/b11 select * from user_role_privs; set role connect,rs,ru,rd identified by rd11 Have to mention already enabled roles
  • 27. set role none; set role all; ORA-01979: missing or invalid password for role 'RD' set role all except rd; conn system/manager; alter user b default role all; Role with Admin Option : • Grantee can grant the role to other user or Role • Grantee can revoke the role from other users • Grantee can alter Or Drop the role Set Role All : • Enables all Roles except those mentioned in Except clause. • Can not use this option to enable roles with passwords.
  • 28. „View‟-ing Roles & Privileges Dba_roles : Lists all the system & Other roles Session_roles : System & Other Roles enabled for the user in session role_sys_privs :Roles to which the user has access, System privoleges granted to roles dba_role_privs :Roles granted to users & to other roles role_role_privs: Roles to which user has access. Shows Roles granted to other roles ROLE GRANTED_ROLE ADMIN_OPTION GRANTEE GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE ROLE PRIVILEGE ADMIN_OPTION ROLE PASSWORD ROLE user_role_privs : Shows details of roles granted to the user USERNAME GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE
  • 29. 28/07/2019 total output power solutions