SQL Server DBA MCQs

SQL Server DBA MCQs

Answer these  SQL Server DBA MCQs and assess your grip on the subject of SQL Server DBA.
Scroll below and get started!

1: What is the difference between adhoc queries from stored procedures?

A.   None

B.   Adhoc queries are placed embedded in the business logic code.

C.   There is no difference as both are fired on the databases.

D.   Stored procedures are placed embedded in the business logic code.

2: Which operation, when performed on a database can throw an error?

A.   DISABLE database

B.   Rename database

C.   DELETE database

D.   DROP database

3: How many mandatory parameters a CREATE DATABASE has?

A.   3

B.   1

C.   None

D.   2

4: Stored procedures are safe from SQL injection attacks.

A.   True

B.   False

5: How do we delete a login?

A.   DELETE LOGIN login_name

B.   A login cannot be deleted but only disabled

C.   DISABLE LOGIN login_name

D.   DROP LOGIN login_name

6: What is a MULTI_USER in sql server?

A.   Only some members are allowed to access the database.

B.   Only the system admin and some members are allowed to access the database.

C.   Users that have the appropriate permissions to connect to the database are allowed.

D.   One user at a time is allowed to connect to the database.

7: What type of user is the default in sql server?

A.   RESTRICTED_USER

B.   MULTI_USER

C.   ROOT_USER

D.   SINGLE_USER

8: In which database state, the database is in single-user mode and may be repaired or restored?

A.   OFFLINE

B.   SUSPECT

C.   All

D.   EMERGENCY

9: An index can be defined for a single column.

A.   True

B.   False

10: Which of the following are valid database states?

A.   EMERGENCY

B.   All

C.   SUSPECT

D.   OFFLINE

11: Can we temporarily disable a login name?

A.   No

B.   Yes

12: What is the syntax for creating new login on the SQL sevrer?

A.   CREATE LOGIN login_id WITH PASSWORD password

B.   CREATE LOGIN login_id WITH USE password

C.   CREATE LOGIN login_id USE password

D.   USE LOGIN login_id WITH PASSWORD password

13: For every unique constraint on a column, SQL server will creat

A.   Index for that column

B.   Non-clustered index for that column

C.   Clustered index for that column

D.   Does not create any index

14: When SQL server is installed, which of the following databases are created by default?

A.   Model

B.   Root

C.   Master

D.   Master and Model

15: ____ allow a web site to store information on the client computer for later retrieval.

A.   Phishing

B.   Cache

C.   Proxies

D.   Cookies