0% found this document useful (0 votes)
8 views3 pages

SQL DBA Interview Preparation

The document outlines key components of SQL Server architecture, including the Relational and Storage Engines, as well as the roles of system databases and recovery models. It covers performance tuning techniques, high availability options, security roles, replication types, and monitoring practices. Additionally, it provides common interview questions and answers related to SQL Server troubleshooting and management.

Uploaded by

pavani.9957
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

SQL DBA Interview Preparation

The document outlines key components of SQL Server architecture, including the Relational and Storage Engines, as well as the roles of system databases and recovery models. It covers performance tuning techniques, high availability options, security roles, replication types, and monitoring practices. Additionally, it provides common interview questions and answers related to SQL Server troubleshooting and management.

Uploaded by

pavani.9957
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

SQL Server Architecture


SQL Server has two main engines: Relational Engine and Storage Engine.
Relational Engine: Handles query parsing, optimization, execution plans.
Storage Engine: Handles data storage, reading/writing pages, transaction logging.
SQLOS: Manages memory, scheduling, I/O, latches, spinlocks.
Query lifecycle: Parsing → Optimization → Execution → Storage access.

2. System Databases
master: Stores metadata, logins, linked servers, configuration.
msdb: Stores jobs, backup history, log shipping details.
model: Template DB, copied whenever a new DB is created.
tempdb: Used for sorting, row versioning, temporary tables, version store.
Best practices: multiple data files, set growth properly, monitor usage.

3. Backup & Recovery


Recovery Models: Full, Bulk-Logged, Simple.
Backup types: Full, Differential, Transaction Log, Copy-Only.
Restore sequence: Full → Differential → Log backups.
Point-in-time recovery using STOPAT in log restore.
Tail-log backup is taken before restore in failure scenarios.

4. Performance Tuning
Indexes: Clustered, Non-Clustered, Columnstore, Filtered.
Index fragmentation: use REORGANIZE (minor) or REBUILD (major).
Statistics help optimizer with data distribution.
Locking, Blocking, Deadlocks: handled with DMVs.
Execution plans show actual/estimated cost of queries.

5. High Availability & Disaster Recovery


Log Shipping: Copy & restore logs between servers.
Database Mirroring: High safety (sync) or performance (async).
Always On AG: Multiple replicas, automatic failover.
Failover Cluster: Instance-level HA.
RPO = data loss tolerance, RTO = downtime tolerance.

6. Security
Logins (server) vs Users (database).
Server roles: sysadmin, securityadmin, dbcreator, etc.
Database roles: db_owner, db_datareader, db_datawriter.
Permissions: GRANT, DENY, REVOKE.
Fix orphaned users: ALTER USER WITH LOGIN.

7. Replication
Types: Snapshot, Transactional, Merge.
Publisher (source), Distributor (middle), Subscriber (destination).
Transactional replication: near real-time, uses log reader.
Merge replication: supports offline updates with conflict resolution.

8. Monitoring & Maintenance


Backups, Index maintenance, Integrity checks.
DBCC CHECKDB for corruption detection.
Monitor logs: sp_readerrorlog.
Agent Alerts & Notifications with Database Mail.
Custom monitoring: DMVs for blocking, performance.

9. Cloud (Azure SQL)


Azure SQL Database: PaaS, auto backups, limited control.
Managed Instance: Closer to on-prem SQL, supports Agent.
SQL VM: Full control, same as on-prem.
Geo-replication, failover groups for DR.
Security: AAD integration, firewall rules.

10. Common Interview Q&A;


Q: How do you troubleshoot slow queries?
A: Check execution plan, statistics, missing indexes, blocking.
Q: DB in suspect mode?
A: Check logs, run emergency mode repair, restore if needed.
Q: Blocking vs Deadlock?
A: Blocking = waiting, Deadlock = circular wait; resolved by killing one process.
Q: Move login between servers?
A: Use sp_help_revlogin to script SID and password.

You might also like