70 likes | 217 Views
Module 10: Database Security. Overview. Manage access to database through user accounts Control access to data through privileges and roles Manage access to server using login accounts. Managing Users.
E N D
Overview • Manage access to database through user accounts • Control access to data through privileges and roles • Manage access to server using login accounts
Managing Users • In Oracle, a username is database system wide, SQL Server uses login accounts to access the instance and user accounts for the individual databases • Oracle usernames and SQL Server logins can be operating system authenticated or database authenticated. In addition, SQL Server logins could be authenticated by the network domain • In SQL Server, a user account has to be created in every database that a login needs access to and can be named differently from the login name
Managing Privileges • Oracle and SQL Server control access and activity within the database using system and object privileges • ALTER DATABASE and GRANT are examples of system privileges while object privileges can be SELECT, INSERT, UPDATE, DELETE. • Oracle and SQL Server use the GRANT statement to give privileges and REVOKE statement to remove privileges. In addition SQL Server has the DENY statement to suspend privileges. • Use the system catalog view sys.database_permissions and function fn_builtin_permissionsto list permissions on objects and statements in SQL Server
Managing Roles • Oracle and SQL Server provide system roles with predefined privileges and user defined roles • The SQL Server system defined roles are of two categories: • Fixed server roles which are defined for the database instance • Fixed database roles whose scope is limited to a database • Sysadmin fixed server role is equivalent to Oracle’s DBA role • In Oracle, there is a single DBA role that has database instance wide privileges spanning all schemas • In SQL Server, administrative privileges can be limited to individual databases by the use of fixed database roles
Demonstration 1: Observe Server and Database Roles In this demonstration you will learn to: • Use catalog views • Use stored procedures to analyze roles
Review • We learned how to create and maintain login accounts and user accounts • We learned the use and scope of predefined system roles and how to create and maintain user defined roles • We saw how to grant and manage system and object privileges to users directly or through roles