SQL Server Q&A | Part 1
SQL Server Interview Questions & Answers
200 Questions: Fundamentals to Architect-Level Scenarios
Part I: Core SQL Server Questions
Topic 1: SQL Server Fundamentals
- What is SQL Server?
- What is the difference between SQL Server and SSMS?
- What is a SQL Server instance?
- What are the SQL Server system databases?
- What is
tempdb? - What is the difference between MDF, NDF and LDF files?
- What is a filegroup?
- What is a transaction?
- Explain ACID properties.
- What is a heap?
Topic 2: SQL Server Architecture & Internals
- What happens internally when SQL Server executes a query?
- What is an 8 KB data page?
- What is an extent?
- What are PFS, GAM and SGAM pages?
- What is the Buffer Pool?
- What is a checkpoint?
- What is a dirty page?
- What is Write-Ahead Logging?
- Does a clustered index physically sort a table forever?
- What happens during SQL Server crash recovery?
Topic 3: Database Files, Filegroups & Storage
- Why would you create multiple data files?
- What is the PRIMARY filegroup?
- What are user-defined filegroups?
- Can tables and indexes be placed on different filegroups?
- How does SQL Server allocate pages and extents?
- What happens when a database file becomes full?
- What is file autogrowth?
- Percentage growth vs fixed-MB growth: which is preferable?
- Can a database have multiple transaction log files?
- When are multiple log files actually useful?
Topic 4: Recovery Models & Transaction Log
- What SQL Server recovery models are available?
- What is Simple recovery?
- What is Full recovery?
- What is Bulk-Logged recovery?
- Why does the transaction log keep growing?
- Does a full backup truncate the transaction log?
- What breaks the transaction log backup chain?
- What is the transaction log?
- What are Virtual Log Files?
- Should the transaction log be shrunk regularly?
- How do you determine why log space cannot be reused?
- What does
log_reuse_wait_desctell you?
Topic 5: Backup & Restore
- What backup types are available?
- What is a Full backup?
- What is a Differential backup?
- What is a transaction log backup?
- What is a tail-log backup?
- What is a COPY_ONLY backup?
-
Explain
NORECOVERY,RECOVERYandSTANDBY. - What is Point-in-Time Recovery?
- What is a differential base?
- Why should DBAs regularly test restores?
Topic 6: Indexes & Statistics
- What is an index?
- Clustered vs nonclustered index?
- What is index fragmentation?
- Rebuild vs reorganize?
- What is a covering index?
- What is a Key Lookup?
- Index Seek vs Index Scan?
- Can adding more indexes make SQL Server slower?
- What are included columns?
- What are SQL Server statistics?
Topic 7: Query Processing & Performance Tuning
- How do you troubleshoot a slow SQL query?
- What is an execution plan?
- Estimated vs Actual Execution Plan?
- What is parameter sniffing?
- How would you troubleshoot a parameter-sensitive plan?
- What are SQL Server wait statistics?
- What does
PAGEIOLATCH_*indicate? - What does
WRITELOGindicate? - Is 99% Buffer Cache Hit Ratio always good?
- Does increasing SQL Server memory always improve performance?
- Should MAXDOP always be 1?
- What is Query Store?
Topic 8: Locks, Blocking & Deadlocks
- What is locking?
- What is blocking?
- What is a deadlock?
- Blocking vs deadlocking?
- How do you troubleshoot deadlocks?
- What is lock escalation?
- What are Shared, Update and Exclusive locks?
- Is
NOLOCKa solution to blocking?
Topic 9: Isolation & Concurrency
- What isolation levels does SQL Server support?
- What is READ UNCOMMITTED?
- What is READ COMMITTED?
- What is RCSI?
- RCSI vs SNAPSHOT isolation?
- What is a dirty read?
- What is a non-repeatable read?
- What is a phantom read?
Topic 10: Security
- Login vs database user?
- What are fixed server roles?
- What are database roles?
- What is Transparent Data Encryption?
- TDE vs Always Encrypted?
- What is the principle of least privilege?
Topic 11: HA/DR & Administration
- What SQL Server HA/DR technologies are available?
- FCI vs Availability Groups?
- What is RPO and RTO?
- What should be monitored on a production SQL Server?
Author: Ajit Kumar Patnaik
Technical Architects Zone (TAZ)
Practical Solutions | Real-World Experience | Continuous Learning
Technical Architects Zone (TAZ)
Practical Solutions | Real-World Experience | Continuous Learning