SQL Server Data control language interview questions
Define Data control language.
Explain the command Grant,
Revoke and Deny with syntax.
SQL Server Server Data control - Nov 18, 2008 at
15:30 pm by Rajmeet Ghai
Define Data control language.
Answer
A data control language is a computer language used to control access
data in a database. It is used to manipulate and control the data. Examples of
commands that are a part of Data control language: SELECT, CONNECT, INSERT,
UPDATE etc
Explain the command Grant, Revoke and Deny with syntax.
Answer
a. Grant: Grant is used to grant or give access permission
to a user. These permissions can be given to a user or a role. Grant can be
used to give system privileges or object privileges.
Syntax:
Grant ALL | system_privelege on object_name to user_name
Example:
Grant update on customer to steve
b. Revoke: Removes or takes away a previously assigned or
granted privilege.
Syntax:
Revoke ALL | privilege_name
On object_name
From user_name
Example:
Revoke update
On customer
From steve
c. Deny: Used to deny permissions to a user.
Syntax:
Deny ALL | permission_name
On object_name
TO user_name
Example:
Deny update
On customer
To steve
Also read
Answer - Stored procedures provide performance
benefits through local storage, precompiling the code, and
caching......
Answer - Shared Lock allows
simultaneous access of record by multiple Select statements. Shared
Lock blocks record from updating and will remain in queue waiting
while record is accessed for reading......
Answer - It is the process of organizing data
into related table. To normalize database, we divide database into
tables.....
Answer - SQL Profiler captures SQL Server events
from a server. The events are saved.....
|