SQL Server Interview Questions and Answers (21-30)
SQL Server Interview Questions and Answers (21-30)
21. In which system database the SQL Server Agent information stores?
a. Master
b. Model
c. MSDB
d. TempDB
22. What is Default value of cost threshold for parallelism?
a. 50
b. 30
c. 5
d. 0
23. Which trace flag forces page allocations on uniform extents instead of mixed extents?
a. 1117
b. 1118
c. 661
d. 3608
24. What is default port number for SQL Server Browser service?
a. 1433
b. 1434
c. 4022
d. 443
25. How many SQL Server error log files will be created as default?
a. 7
b. 6
c. 3
d. None of the above
26. Which information stored in summary.txt file in SQL server?
a. Error Logs Info
b. Dead locks info
c. Installation logs
d. All of the above
27. The Basic storage unit for SQL Server is Page. What is the size of a page in SQL server?
a. 32KB
b. 64KB
c. 8KB
d. 16KB
28. Can we take the backup of Resource database in SQL Server?
a. Yes
b. No
29. Which SQL Server role permission is needed to run the CHECKPOINT?
a. DDL Admin
b. Security Admin
c. Db_backupoerator
d. Db_datawriter
30. What is the default value of Fill factor in SQL Server?
a. 1
b. 0
c. 80
d. 100
Answers
21. In which system database the SQL Server Agent information stores?
a. Master
b. Model
c. MSDB
d. TempDB
If MSDB Database is not available or corrupted SQL Server Agent is not accessible
22. What is Default value of cost threshold for parallelism?
a. 50
b. 30
c. 5
d. 0
A. The cost threshold for parallelism specifies the threshold at which SQL Server decides
to create and run parallel query plans for queries.
Specifically, SQL Server will opt for a parallel plan only when the estimated cost
to execute a serial plan for the same query exceeds the value set in the cost
threshold for parallelism.
The cost threshold for parallelism can be set to any value between 0 and 32767.
The default value is 5.
If the estimated cost of a serial plan exceeds the configured cost threshold for
parallelism, SQL Server considers using a parallel plan.
23. Which trace flag forces page allocations on uniform extents instead of mixed
extents?
a. 1117
b. 1118
c. 661
d. 3608
A. Trace flags are used to set specific server characteristics or to alter a particular
behaviour.
1118 trace flag Forces page allocations on uniform extents instead of mixed
extents, reducing contention on the SGAM page.
From SQL Server 2016, you change this behaviour using the
MIXED_PAGE_ALLOCATION database option, and there is no need for TF 1118.
Extents
Extents are the basic unit in which space is managed. An extent is eight physically
contiguous pages, or 64 KB. This means that SQL Server databases have 16 extents per
megabyte.
SQL Server has two types of extents:
Uniform extents are owned by a single object; all eight pages in the extent can
only be used by the owning object.
Mixed extents are shared by up to eight objects. Each of the eight pages in the
extent can be owned by a different object.
24. What is default port number for SQL Server Browser service?
a. 1433
b. 1434
c. 4022
d. 443
A. The Browser Service was introduced in SQL Server 2005 as a simple way to provide
SQL Server connection information to client applications on workstations.
The Browser Service responds to client requests by providing a list of SQL Server
Instances
The Browser Service listens on UDP Port 1434 on each computer running
Microsoft SQL Server.
25. How many SQL Server error log files will be created as default?
a. 7
b. 6
c. 3
d. None of the above
A. By default, 7 Error log files will be created by the SQL Server, we can change this
number.
We can change default error log files count.
27. The Basic storage unit for SQL Server is Page. What is the size of a page in SQL server?
a. 32KB
b. 64KB
c. 8KB
d. 16KB
A. A page is the fundamental unit of data storage in SQL Server. the page size is 8 KB
Each page begins with a 96-byte header that stores system information about the
page, including page number, type, free space, and allocation unit ID of the
owning object.
28. Can we take the backup of Resource database in SQL Server?
a. Yes
b. No
A. SQL Server cannot back up the Resource database. You can perform your own file-
based or a disk-based backup
but you cannot use SQL Server to restore your backups. Restoring a backup copy
of mssqlsystemresource.mdf can only be done manually
29. Which SQL Server role permission is needed to run the CHECKPOINT?
a. DDL Admin
b. Security Admin
c. Db_backupoerator
d. Db_datawriter
A. Db_backupoperator can take the log backup for full recovery databases so if the can
take the log backup then a checkpoint will occur and data will flush from log file to data
file.
The fill-factor value is a percentage from 1 to 100, and the server-wide default is
0 which means that the leaf-level pages are filled to capacity.