Mastering Transact-SQL Authorization Flashcards

Explore key concepts of Transact-SQL authorization with these engaging flashcards.

1
Q

Who can execute statements or perform operations on an entity?

A

Only authorized users are able to execute statements or perform operations on an entity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens if an unauthorized user attempts to execute a Transact-SQL statement?

A

The execution of the Transact-SQL statement or the operation on the database object will be rejected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three Transact-SQL statements related to authorization?

A

The three Transact-SQL statements are: GRANT, DENY, and REVOKE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the syntax for the GRANT statement?

A

GRANT {ALL [PRIVILEGES]} | permission_list [ON [class::] securable] TO principal_list [WITH GRANT OPTION] [AS principal]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Provide an example of a GRANT statement.

A

GRANT CREATE TABLE, CREATE PROCEDURE TO peter, mary

Example of granting multiple permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the WITH GRANT OPTION do in a GRANT statement?

A

It gives user B the additional capability of granting the privilege to other users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the DENY statement do?

A

The DENY statement prevents users from performing actions and removes existing permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the syntax for the DENY statement?

A

DENY {ALL [PRIVILEGES]} | permission_list [ON [class::] securable] TO principal_list [CASCADE] [AS principal]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Provide an example of a DENY statement.

A

DENY CREATE TABLE, CREATE PROCEDURE TO peter

Example of denying multiple permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the REVOKE statement do?

A

The REVOKE statement removes one or more previously granted or denied permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the syntax for the REVOKE statement?

A

REVOKE [GRANT OPTION FOR] { [ALL [PRIVILEGES]] | permission_list } [ON [class::] securable] FROM principal_list [CASCADE] [AS principal]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly