A role is a collection of permissions.
1. System predefined roles
A real database administrator should be the owner of the entire server and its database, with all the permissions to administer the server and its databases. In a large system, the database administrator is often not only one person to bear, but the management of the task of functional division, each mention when different responsibilities. A system-predefined role is designed to accommodate this requirement.
System Administrator (Sa_role)
The Sa_role role has administrative privileges that do not relate to the specific application of the database:
◇ Install and update SQL Server
◇ managing the physical storage of the server
◇ Configure system setting parameters;
◇ Create user database;
◇ granting SQL Server user rights
◇┅┅
System security Administrator (Sso_role)
Sso_role is used to implement security-sensitive operations that perform tasks related to security:
◇ Establish the server login account;
◇ Management password;
◇ granting any role other than sa_role;
◇ Management audit system;
◇┅┅
Operator (Oper_role)
Oper_role performs server-wide database operations, such as backing up and restoring arbitrary databases, and so on:
◇ Dump DATABASE and log
◇ Reprint Database and log
◇┅┅
2. Creating and using custom roles
(1) Create a new role:
(2) Permissions granted to the role: Grant
(3) Set the logon account role permissions: Sp_role
Format: Sp_role "Grant" | " Revoke ", role name, login account name
Here's "grant" | " Revoke "refers to whether the role permissions are granted or undone.