IT tutorials
 
Technology
 

SQL Server 2012 Security : Database Security (part 2) - Fixed Database Roles,Database Permissions

3/28/2014 1:05:54 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3. Fixed Database Roles

There are two kinds of database roles: fixed and flexible. Fixed roles cannot be deleted and are provided within every database. Table 1 lists fixed database roles.

Note The msdb database contains additional fixed roles that are not found in any other database. These roles support the SQL Server Agent and SQL Server Integration Services features.

images

images

In addition to using the UI in SSMS, numerous stored procedures and functions help DBAs work with database roles.

These fixed roles serve to define a general permission within the database. For example, the following script grants DevUser the db_datareader permission using the sp_addrolemember system stored procedure:

USE [Accounting]
GO
EXEC sp_addrolemember N'db_datareader', N'DevUser'
GO

In this example, DevUser would be able to read any table within the database regardless of whether they had SELECT permission defined.

images Note There is an exception to this global grant behavior. If the DBA issued a DENY statement against DevUser on a specific object, that object would no longer be accessible by DevUser.

The global behavior of fixed database roles addresses some scenarios; however, to reduce the surface area for attack, it’s better for you to grant specific permissions on objects to your users.

4. Database Permissions

If you are a database user in a database and are not a sysadmin or a member of the db_owner or db_datareader group, you will not be able to read any data within the database. To read data, an administrator needs to grant the user the SELECT permission. Similarly, if the user wants to add data to a table, they would need the INSERT permission. If the user wants to delete data, they would need the DELETE permission. There are many granular database permissions that you as an administrator can define for a given database user or role.

Also, there exists a permissions hierarchy within SQL Server. Some server-level permissions convey the rights of other permissions by implication. For example, if a database user is mapped to a login that was granted ALTER ANY SERVER AUDIT permission, this database user has the ALTER ANY DATABASE AUDIT permission even though that user might not have been explicitly given that permission. This implication also works within the scope of the database. For example, if a database user was granted ALTER ANY ASSEMBLY, the database user also has the CREATE ASSEMBLY permission, even without being explicitly given that permission. In both cases, ALTER ANY SERVER AUDIT and ALTER ANY ASSEMBLY are known as covering permissions.

images

images

With SQL Server, you can grant permission to a user, revoke an existing permission from a user, or deny permission from a user. To grant permission, you use the GRANT statement. An example of granting SELECT on the Customers table is as follows:

GRANT SELECT ON Customers TO BusinessAnalysts

If you wanted to remove this permission, you would use the REVOKE statement as follows:

REVOKE SELECT ON Customers TO BusinessAnalysts

What if you had a user Bob who was part of the BusinessAnalysts group and you did not want him to have the SELECT permission? You could use the DENY statement as follows:

DENY SELECT ON Customers to Bob

Bob would still have all the permissions defined for business analysts, but he would be denied from reading data from the Customers table.

 
Others
 
- SQL Server 2012 Security : Database Security (part 1) - Database Users, Schemas
- Windows Server 2012 : Performance Monitoring (part 8) - Resource Monitor - Network Tab
- Windows Server 2012 : Performance Monitoring (part 7) - Resource Monitor - Disk Tab
- Windows Server 2012 : Performance Monitoring (part 6) - Resource Monitor - Processes, Services, Associated Handles, Associated Modules , Memory Tab
- Windows Server 2012 : Performance Monitoring (part 5) - Resource Monitor - Overview Tab , CPU Tab
- Windows Server 2012 : Performance Monitoring (part 4) - Reports - Creating a User-Defined Report , Viewing Predefined System Reports
- Windows Server 2012 : Performance Monitoring (part 3) - Data Collector Sets
- Windows Server 2012 : Performance Monitoring (part 2) - Adding Counters with Performance Monitor
- Windows Server 2012 : Performance Monitoring (part 1) - Performance Monitor Overview
- Sharepoint 2013 : Using Office applications with SharePoint - Editing documents in Office (part 7) - Managing versions of a file from within Word, PowerPoint, Excel, or Visio
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us