Cookies help us display personalized product recommendations and ensure you have great shopping experience.

By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    sales and data analytics
    How Data Analytics Improves Lead Management and Sales Results
    9 Min Read
    data analytics and truck accident claims
    How Data Analytics Reduces Truck Accidents and Speeds Up Claims
    7 Min Read
    predictive analytics for interior designers
    Interior Designers Boost Profits with Predictive Analytics
    8 Min Read
    image fx (67)
    Improving LinkedIn Ad Strategies with Data Analytics
    9 Min Read
    big data and remote work
    Data Helps Speech-Language Pathologists Deliver Better Results
    6 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-25 SmartData Collective. All Rights Reserved.
Reading: Defining SQL Server Security Roles for Better Security Management
Share
Notification
Font ResizerAa
SmartData CollectiveSmartData Collective
Font ResizerAa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > IT > Security > Defining SQL Server Security Roles for Better Security Management
Security

Defining SQL Server Security Roles for Better Security Management

Sujain Thomas
Sujain Thomas
9 Min Read
SHARE

SQL Server comes with a long list of database, application and server roles which outline data selection and modification, disk management and permissions among other aspects. These roles are important in maintaining server security.

SQL Server comes with a long list of database, application and server roles which outline data selection and modification, disk management and permissions among other aspects. These roles are important in maintaining server security.

Many SQL Server databases have multiple users accessing and viewing data, giving the administrator extra concern regarding maintenance of security. A wise administrator should take complete advantage of security roles in SQL server, diving groups of users according to their database access needs and setting permissions in a way as to reduce security risks in the system.

More Read

Business Continuity RPO and RTO: Why Should I Care?
Top Apps and Programs to Protect Google Nexus Devices
Customer Data Protection: What Businesses Can learn from Equifax Data Breach
5 Reasons SoD Protocols Are Vital to Modern Data Security
Employee Training and Other Ways to Protect Your Company’s Valuable Data

This begins with deciding the users that need to view data of any kind stored in the database, and ensuring that users can only access the data they need to do their jobs. For instance, a payroll processing clerk might need access to salary information for all other employees in the organization, while a team manager would only need to view salaries of team members under his supervision. Individual employees in other departments wouldn’t need to know the salaries of any other employees.

The second step is determining which users should be granted permissions to edit/change the data. For instance, a person in sales/fulfillment may need to view clients’ addresses, but only designated trained data entry personnel or accounts executives should get rights to change those addresses.

Factoring in the needs of many users would be a daunting task in the absence of provisions of the Windows security model, where a single role definition can accommodate multiple user groups. The role feature defines the things that users of a database can and cannot do, so that multiple users can have a similar role. This article discusses the importance of role definition in relation to Windows groups, and how these roles can be used to grant or refuse access to many users simultaneously.

Benefits of SQL server role definition

Roles form part of the Windows tiered security model which include login security controlling connection to the server, database security controlling access to the database and database objects which control access to separate database objects and data stores.

A user may access the server by keying in their authorized username and password. Once connection to the server has been established, user account information is used to determine access to stored databases. Within the actual database accessed, the user is limited only to data that he/she can view and/or modify.

Efficient account management is the most significant benefit of roles in SQL server. Picture a group of 500 viewers who need to either view or modify some data. In Windows security model, all the administrator needs to do is to take a defined Windows group and assign an SQL server role to it, rather than modifying individual accounts. Windows groups are made of users who can access the Windows network, while SQL server roles are limited only to SQL server. It’s simply allowing valid Windows user groups to access data, objects and databases in SQL Server.

Types of roles

The database roles maintained by a server administrator are applicable for the entire server system, rather than any single database/file. There is a public role which establishes default permissions accessible to all users. Every new user that is added onto the SQL Server is automatically assigned to this role – you don’t need to set this permission.

Predefined database roles

Individual databases have their separate database roles also. You may want to create your own database roles, but SQL server comes with these predefined roles:

  • db_owner – for members that have full database access
  • db_accessadmin – for members who can control SQL Server sign ins and Windows groups
  • db_datareader – members can view all data but cannot edit
  • db_datawriter – members can add, edit or delete data within database tables
  • db­_ddladmin – members are allowed to run dll (dynamic link library) statements
  • db_securityadmin – members can control permissions and edit/modify role memberships
  • db_backupoperator – members can create backups of the database
  • db_denydatareader – members that cannot view data stored in the database
  • db_denydatawriter – members that cannot add, edit or delete data in views or tables in database

Fixed roles

Fixed roles are applicable to the entire server, and some predefined roles are listed below:

  • SysAdmin – member can perform any action within the server
  • ServerAdmin – member can set and modify server configuration options
  • SetupAdmin – member can control SQL Server startup configurations and tasks as well as manage linked servers
  • SecurityAdmin – member can control server security settings
  • ProcessAdmin – member can kill running processes on SQL Server
  • DbCreator – member can create, modify, drop and/or restore databases
  • DiskAdmin – member can control disk files in SQL Server
  • BulkAdmin – member can execute the bulk insert server command

Illustration: Assigning roles

For this illustration, assume we’re using SQL Server Enterprise Manager to add a new Windows group on the Pubs database (default sample database which comes with the 2000 version) role. First, you will need to create login ID for members of the Guests group in Windows, allowing them access to the SQL Server. You can do this by:

  • Launching Enterprise Manager and expanding the security  folder
  • Right-clicking on Logins item and selecting New Login from the submenu that rolls to open the New Login dialog box. By default, the Windows Authentication mode should be checked; select it if it isn’t checked in your system. Windows authentication mode in this case is recommended rather than the SQL Server mixed mode. This is because the latter comprises both Windows’ and SQL server’s security model.
  • Clicking on the button located on the right-hand-side of the Name control which displays SQL Server Login Properties dialog box. In our case, we’ll be using the Guests account. Select the Add button and then click on OK to close this dialog box.
  • Under the General tab, find the Database drop-down menu and select Pubs Database. The Master Database is usually selected on default, but users shouldn’t be allowed to access this database – it controls SQL Server installation settings.
  • Go to the Database Access tab which gives the available databases within the current server
  • A default database must be selected for SQL Server to enable any database roles. Select the Pubs database. The Public role is the automatically-assigned role as we mentioned earlier, but you can select any of the other roles. Note that the Guests Group must be the one selected under the User column
  • To complete the process, click OK. SQL Server Enterprise Manager should now display the new login ID on the right pane, and all members of the Windows group Guests can log onto SQL Server. 
Share This Article
Facebook Pinterest LinkedIn
Share
BySujain Thomas
Follow:
Sujain Thomas is a reputable DBA expert who has been offering remote DBA services for many years. She can offer quality advice regarding cloud computing. To learn more about the author, please visit her blog here.

Follow us on Facebook

Latest News

sales and data analytics
How Data Analytics Improves Lead Management and Sales Results
Analytics Big Data Exclusive
ai in marketing
How AI and Smart Platforms Improve Email Marketing
Artificial Intelligence Exclusive Marketing
AI Document Verification for Legal Firms: Importance & Top Tools
AI Document Verification for Legal Firms: Importance & Top Tools
Artificial Intelligence Exclusive
AI supply chain
AI Tools Are Strengthening Global Supply Chains
Artificial Intelligence Exclusive

Stay Connected

1.2kFollowersLike
33.7kFollowersFollow
222FollowersPin

You Might also Like

sobm for ai-driven cybersecurity
Security

Software Bill of Materials is Crucial for AI-Driven Cybersecurity

9 Min Read
how cybersecurity is changing opportunities
ExclusiveITJobsSecurity

How Cybersecurity Is Creating Opportunities For Young People

7 Min Read
AI and cybersecurity
Artificial Intelligence

AI Leads to Powerful New Fraud Detection Software for E-commerce

5 Min Read
business data security
Security

5 Urgent Changes to Immediately Improve Business Data Security

6 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

data-driven web design
5 Great Tips for Using Data Analytics for Website UX
Big Data
ai chatbot
The Art of Conversation: Enhancing Chatbots with Advanced AI Prompts
Chatbots

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-25 SmartData Collective. All Rights Reserved.
Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?