Manage Logins and Server Roles Flashcards
What is the difference between a login and a user?
A LOGIN is needed to enter the world of SQL server
A USER is needed to connect to a specific Database
What is the t-sql syntax for creating a Windows login account?
USE MASTER
GO
CREATE LOGIN [USERNAME] FROM WINDOWS WITH DEFAULT_DATABASE=[DATABASENAME]
What are the default server roles?
BULKADMIN DBCREATOR DISKADMIN PROCESSADMIN PUBLIC SECURITYADMIN SERVERADMIN SETUPADMIN SYSADMIN
What can the SYSADMIN server role do?
All permissions on the server
What can the BULKADMIN server role do?
Administer bulk operations (bulk inserts)
What can DBCREATOR server role do?
Alter any database, create any database
What can SETUPADMIN server role do?
Alter any linked server
What can SECURITYADMIN server role do?
Alter any login. Securityadmin should be considered equivalent of SYSADMIN role.
What can DISKADMIN server role do?
Alter Resources
What can SERVERADMIN server role do?
Alter Resources Alter Settings Shutdown Alter any endpoint Create Endpoint Alter Server State View Server State
What can PROCESSADMIN server role do?
Alter Server State
View Server State
Alter Any Connection
What can PUBLIC server role do?
No permissions inherent, View any database and connect permission to the endpoints is default, but can be revoked.
What is the t-sql syntax for granting a server role to a login?
ALTER SERVER ROLE [SYSADMIN] ADD MEMBER [LOGINNAME]
What are the three permissions that you can give?
GRANT
WITH GRANT
DENY
What does the WITH GRANT permission mean?
It means that the user can grant that permission to another login