Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

SQL Server Interview Questions and Answers (21-30)

This document contains 30 questions and answers related to SQL Server concepts. Some key points covered include: - The MSDB database stores SQL Server Agent information like jobs and alerts. - The default cost threshold for parallelism is 5. - Trace flag 1118 forces uniform page allocations instead of mixed allocations. - The default port for the SQL Server Browser service is 1434. - By default, SQL Server will create 7 error log files. - The summary.txt file contains installation and upgrade logs. - The basic storage unit in SQL Server is the 8KB page. - The default fill factor value is 0, meaning pages are filled to capacity.

Uploaded by

sudheerp.sqldba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

SQL Server Interview Questions and Answers (21-30)

This document contains 30 questions and answers related to SQL Server concepts. Some key points covered include: - The MSDB database stores SQL Server Agent information like jobs and alerts. - The default cost threshold for parallelism is 5. - Trace flag 1118 forces uniform page allocations instead of mixed allocations. - The default port for the SQL Server Browser service is 1434. - By default, SQL Server will create 7 error log files. - The summary.txt file contains installation and upgrade logs. - The basic storage unit in SQL Server is the 8KB page. - The default fill factor value is 0, meaning pages are filled to capacity.

Uploaded by

sudheerp.sqldba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

SQL Server Interview Questions-(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

A. MSDB Database contains SQL Server Agent Information like


 Jobs
 Alerts
 Database Mail
 Service Broker
 Backup & Restore History
If the MSDB Database is corrupted we can’t configure Jobs and we didn’t get any alerts.

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.

 Enable Limit the number of error log files before option.


 The Maximum limit is 99
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
A. Summary.txt file contains Installation, upgradation related logs. Some of the other
information that summary.txt file contains.
 An overall summary of the execution
 SQL Server product features previously installed on the computer
 Details of the execution results
 Failed rules

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.

30. What is the default value of Fill factor in SQL Server?


a. 1
b. 0
c. 80
d. 100
A. The fill-factor option is provided for fine-tuning index data storage and performance.
 When an index is created or rebuilt, the fill-factor value determines the
percentage of space on each leaf-level page to be filled with data, reserving the
remainder on each page as free space for future growth.

 For example, specifying a fill-factor value of 80 means that 20 percent of each


leaf-level page will be left empty

 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.

You might also like