SQL Server Questions and Answers – Working With Transaction Log

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Working With Transaction Log”.

1. The transaction log supports which of the following operations?
a) Recovery of all incomplete transactions when SQL Server is started
b) Recovery of individual transactions
c) Supporting transactional replication
d) All of the mentioned
View Answer

Answer: b
Explanation: The transaction log also supports high availability and disaster recovery solutions.

2. Point out the correct statement.
a) The Database Engine supports two types of checkpoints
b) Long-running uncommitted transactions decrease recovery time for all types of checkpoints
c) Log truncation deletes inactive virtual log files from the logical transaction log of a SQL Server database
d) All of the mentioned
View Answer

Answer: c
Explanation: Log truncation frees space in the log file for reuse by the transaction log.

3. Which of the log_reuse_wait_desc value has log_reuse_wait value 0?
a) CHECKPOINT
b) ACTIVE_TRANSACTION
c) NOTHING
d) All of the mentioned
View Answer

Answer: c
Explanation: log_reuse_wait value 0 indicates currently there are one or more reusable virtual log files.

4. ACTIVE_TRANSACTION has log_reuse_wait value is _________
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: d
Explanation: A long-running transaction might exist at the start of the log backup. In this case, freeing the space might require another log backup.

advertisement
advertisement

5. Point out the wrong statement.
a) For performance reasons, the Database Engine performs modifications to database pages in memory
b) Log truncation does reduce the size of the physical log file
c) Log truncation is essential to keep the log from filling
d) None of the mentioned
View Answer

Answer: b
Explanation: To reduce the physical size of a physical log file, you need to shrink the log file.

6. ________ logging is not supported for memory-optimized tables.
a) Full
b) Minimal
c) Bulk
d) None of the mentioned
View Answer

Answer: b
Explanation: Minimal logging involves logging only the information that is required to recover the transaction without supporting point-in-time recovery.

Note: Join free Sanfoundry classes at Telegram or Youtube

7. Index page deallocation during a ________ operation is always fully logged.
a) DROP INDEX
b) CREATE INDEX
c) ALTER INDEX
d) None of the mentioned
View Answer

Answer: a
Explanation: The DBCC DBREINDEX statement is deprecated so you should avoid using it in new applications.

8. Which of the following checkpoint has ‘recovery interval’ less than zero?
a) Automatic
b) Direct
c) Indirect
d) All of the mentioned
View Answer

Answer: a
Explanation: Automatic checkpoints whose target recovery interval is specified by the user defined setting of the sp_configure recovery interval option.

advertisement

9. Internal checkpoint is generated in response to which of the following event?
a) A database snapshot is deleted, whether explicitly or internally for DBCC CHECK
b) Bringing a SQL Server failover cluster instance (FCI) offline
c) Bringing a SQL Server failover cluster instance (FCI) online
d) None of the mentioned
View Answer

Answer: b
Explanation: Internal Checkpoints are generated by various server components to guarantee that disk images match the current state of the log.

10. __________ backups are taken in bulk or full recovery models only.
a) Log
b) Active
c) Passive
d) Replica
View Answer

Answer: a
Explanation: A log backup is required before the transaction log can be truncated. When the next log backup is completed, some log space might become reusable.

advertisement

Sanfoundry Global Education & Learning Series – SQL Server.

To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.