SQL Server için derin DMV kapsaması

Always On Availability Group'tan Query Store'a, Hekaton'dan CDC'ye, TDE sertifika süresinden kill SPID aksiyonuna kadar — Microsoft Data Platform MVP yönlendirmesiyle hazırlanmış kapsamlı DMV ve catalog view tarama seti.

SQL Server 2008R2 2012 / 2014 / 2016 2017 / 2019 / 2022 Azure SQL DB Managed Instance Synapse Analytics
70+DMV / Catalog View
46Diagnostic Tab
14+Operasyonel Aksiyon
SQL 2022Ledger uyumlu

Query Store, plan cache, missing index — derin analiz

Query Store

Query Store entegrasyonu

Sorgu metni, plan tarihçesi ve runtime stats Query Store'dan okunur. Plan regression otomatik tespit, forced plans yönetimi.

  • get_query_store_health
  • get_query_store_regressions
  • get_query_store_forced_plans
  • force_query_plan / unforce_query_plan
Plan Cache

Plan cache & deep dive

Plan cache top tüketiciler, plan handle bazlı son aktüel istatistikler, parametre değerleri, bellek grants.

  • get_plan_cache_analysis
  • get_query_plan_stats_last(plan_handle)
  • get_query_memory_grants
  • get_execution_plan (XML parse)
Missing Index

Missing index & advisor

Missing index group analizi, impact skoru, duplicate index tespiti, fragmantasyon, online rebuild ve fill factor analizi.

  • get_missing_index_recommendations
  • get_missing_index_groups
  • get_duplicate_indexes
  • get_index_maintenance_advisor
Wait Stats

Wait analizi

Wait kategorilendirme, session bazlı wait, query bazlı wait, ve 1-168 saat trend penceresi (sparkline + min/max/avg).

  • get_wait_stats + detail
  • get_session_wait_stats
  • get_query_wait_stats
  • Wait stats trend (saatlik)
Hekaton

In-Memory OLTP & Columnstore

Memory-optimized tablolar, garbage collection, checkpoint files, columnstore segment fragmantasyonu, dictionary stats, deltastore.

  • get_hekaton_stats (SQL 2014+)
  • get_columnstore_health
  • Segment fragmentation
  • Dictionary & deltastore
Live Monitor

Active & live query

Aktif sessions, live query monitor, session input buffer (SPID'in çalıştırdığı son SQL), parallel query analizi.

  • get_active_sessions
  • get_live_query_monitor
  • get_session_input_buffer(spid)
  • get_parallel_query_analysis (CXPACKET)

Always On AG, WSFC, log shipping

AG Detail

Availability Group derinlik

AG durumu, replica role, sync mode, failover ready, log send queue, redo queue, lag KB ve süre, secondary readable durumu.

  • get_alwayson_ag_detail
  • Replica role + state
  • Lag (KB + sec)
  • Read-only routing
Endpoint

AG endpoint & routing

AG endpoint state, listener TCP port erişilebilirliği, encryption + authentication ayarları, read-only routing list.

  • get_ag_endpoint_health
  • Listener TCP test
  • Endpoint encryption
  • RO routing list
WSFC

Cluster & quorum

Windows Server Failover Cluster düğümleri, durum, quorum türü, vote count, witness sağlığı, dynamic quorum kararları.

  • get_wsfc_status
  • get_cluster_quorum_status
  • Node state + vote
  • Witness type
Log Shipping

Log shipping & backup

Log shipping primary / secondary durumu, backup chain doğrulama, kritik gecikme alarmı (> 1 saat), recovery model değişiklikleri.

  • get_log_shipping_status
  • get_backup_chain_validation(7d)
  • get_backup_history
  • Recovery model audit
Replication

Transactional replication

Publication, subscription, distribution agent backlog, latency, failed commands, agent history.

  • get_replication_status
  • Distribution backlog
  • Agent latency
  • Failed commands
Snapshots

DB Snapshots envanteri

Database snapshot listesi, source DB, sparse file büyüklüğü, oluşturma tarihi, eski snapshot uyarısı.

  • get_db_snapshots_inventory
  • Source DB ilişkisi
  • Sparse file size
  • Yaş analizi

TDE, Always Encrypted, Ledger ve audit

TDE

TDE durumu & sertifika expiry

Transparent Data Encryption aktif veritabanları, sertifika sona erme tarihleri ve erken uyarı (30 gün öncesi). Sertifika kaybı = veri erişim kaybı.

  • get_tde_status
  • get_tde_certificate_expiry
  • Encryption state per DB
  • 30/60/90 gün uyarısı
Always Encrypted

AE / DDM / RLS / Ledger

Always Encrypted column listesi, Dynamic Data Masking aktif kolonlar, Row Level Security politikaları, SQL 2022+ Ledger blockchain doğrulama.

  • Always Encrypted columns
  • Dynamic Data Masking
  • Row Level Security
  • Ledger (SQL 2022+)
Audit

SQL Server Audit

Audit specifications, target file/log, action group'lar, SQL Audit'in aktif olup olmadığı kontrolü ve audit log inceleme.

  • get_audit_status
  • get_audit_logs(limit)
  • Action group analizi
  • Failed login spike
Logins

Login security & lockout

SQL login'ler ve Windows login'ler, password policy, expiry, default DB. Login lockout politikası ve hesap durumu.

  • get_logins_security
  • get_failed_logins(24h)
  • Login lockout policy
  • Password expiry
Permissions

İzin matrisi & orphan users

User / role / login bağıntı matrisi, sysadmin sayısı, public role permissions, orphan users (login'siz user) tespiti.

  • get_permission_matrix (TTL 300s)
  • get_orphan_users
  • Excessive sysadmin uyarısı
  • Public role grants
XE & Crypto

Extended Events & crypto

Aktif XE oturumları, ring buffer event rate, XE overhead alarmı, crypto provider listesi (key management).

  • get_xe_sessions
  • get_extended_events_ring_stats
  • Crypto providers
  • Change tracking durumu

UI üzerinden güvenli müdahale

Tüm operasyonel aksiyonlar onay diyaloğu ile çalışır, audit log'a yazılır ve role bazlı izin kontrolünden geçer. SSMS açmaya gerek yok.

Kill SPID

Sorunlu oturumu sonlandır. System SPID (≤ 50) koruması.

POST /kill-spid

Update Statistics

Tablo veya istatistik bazlı FULLSCAN.

POST /update-statistics

Shrink Log File

DBCC SHRINKFILE NO_INFOMSGS.

POST /shrink-log

Force Plan

Query Store plan force / unforce.

force_plan / unforce_plan

DBCC CHECKDB

PHYSICAL_ONLY veya tam integrity check.

run_dbcc_checkdb

Rebuild Index

Online rebuild (ENT) + WAIT_AT_LOW_PRIORITY.

rebuild_index_online

Recompile Procedure

sp_recompile ile cached plan invalidation.

recompile_procedure

Resource Governor

Resource pool / workload group runtime ayarı.

update_resource_pool
api/v2/instance.py FastAPI
# Sorunlu SPID'i sonlandır — system SPID koruması otomatik
POST /api/v2/instance/{source_id}/kill-spid
Body: { "spid": 147, "reason": "long-running blocker" }

# Yanıt:
{
  "status": "killed",
  "spid": 147,
  "audit_id": "a8f3...",
  "protected": false     # sistem SPID değil
}

Bellek clerk'leri, scheduler & NUMA

Memory Clerks

Memory clerks & OS bellek

SQL Server process memory, OS commit, memory clerks (CACHESTORE, USERSTORE, MEMORYCLERK_*) tüketimi, buffer pool stats.

  • get_memory_clerks
  • get_process_memory
  • get_os_memory
  • get_buffer_pool_stats
Workers

Workers, scheduler, NUMA

Worker thread durumu, runnable kuyruğu, scheduler health, NUMA topology dağılımı, max worker threads konfigi.

  • get_workers_summary
  • get_scheduler_health
  • get_numa_topology
  • get_resource_governor
TempDB

TempDB & version store

TempDB file dağılımı, allocation contention, version store kullanımı, tempdb watchdog ile alarm.

  • get_tempdb_details
  • get_tempdb_version_store
  • Allocation contention
  • tempdb_watchdog
Loaded Modules

Yüklü modüller & modüller

SQL Server process'inde yüklü DLL'ler, third-party modüller, agent jobs ve job step failures.

  • get_loaded_modules
  • get_agent_jobs
  • get_agent_job_step_failures
  • get_database_mail_status

70+ DMV / Catalog View, 14+ aksiyon

Aşağıdaki tablo, Sentinel DB 360'ın SQL Server provider'ında implement edilmiş izleme ve aksiyon yeteneklerinin özetidir.

Yetenek Açıklama DMV / Komut
Performance & Query
Top sorgularCPU/IO/duration bazlı sıralamasys.dm_exec_query_stats
Query StorePlan history + regressionssys.query_store_*
Plan cacheTop consumers + plan handle deep divedm_exec_cached_plans
Missing indexÖnerilen index + impactdm_db_missing_index_*
Index physical statsFragmantasyon, page countdm_db_index_physical_stats
Memory grantsAktif sorgu memorydm_exec_query_memory_grants
High Availability
Always On AGReplica state, sync mode, lagdm_hadr_database_replica_states
AG endpointEndpoint state + listenersys.tcp_endpoints
WSFC quorumCluster nodes + quorumdm_hadr_cluster*
Log shippingPrimary/secondary lagmsdb.dbo.log_shipping*
Backup chain7 günlük zincir doğrulamamsdb.dbo.backupset
ReplicationDistribution backlogdistribution.dbo.MSrepl_*
Security & Compliance
TDE durumuEncryption state per DBdm_database_encryption_keys
TDE sertifika expiry30/60/90 gün uyarısys.certificates
Always EncryptedAE column listesisys.column_encryption_keys
Row Level SecurityAktif policy'lersys.security_policies
Ledger (SQL 2022+)Blockchain doğrulamasys.database_ledger_*
SQL Server AuditAudit specificationssys.server_audits
Failed logins (24h)Spike tespitixp_readerrorlog
Permission matrixUser / role / login (TTL 300s)sys.database_permissions
Storage & I/O
File I/O latencyRead/write ms per filedm_io_virtual_file_stats
I/O delta engine10s sample intervalget_io_virtual_file_stats_delta
Disk volumesSürücü kullanımıdm_os_volume_stats
DB growth tarihçesiAutogrow eventsdefault_trace
VLF countLog file VLF analiziDBCC LOGINFO
Log space usagePer-DB log used %dm_db_log_space_usage
Memory, CPU & Workers
Memory clerksCACHESTORE, USERSTORE, MEMORYCLERKdm_os_memory_clerks
OS memoryProcess commit + system commitdm_os_sys_memory
Worker threadsActive / runnable / idledm_os_workers
SchedulersHealth + work_queue_countdm_os_schedulers
NUMA topologyMemory node + CPU nodedm_os_nodes
Resource GovernorPool / workload groupdm_resource_governor_*
Operational Actions
Kill SPIDSystem SPID koruması (≤50)KILL @spid
Update statisticsFULLSCAN tablo / istatistikUPDATE STATISTICS ... WITH FULLSCAN
Shrink logNO_INFOMSGSDBCC SHRINKFILE
Force / unforce planQuery Store plan kontrolüsp_query_store_force_plan
RecompileCached plan invalidationsp_recompile
DBCC CHECKDBPHYSICAL_ONLY veya tamDBCC CHECKDB
Rebuild index onlineWAIT_AT_LOW_PRIORITYALTER INDEX REBUILD
Resource pool updateMAX_CPU_PERCENT runtimeALTER RESOURCE POOL
Cloud & Specialized
Azure SQL DBDTU/vCore statsdm_db_resource_stats
Elastic poolPool resource statsdm_elastic_pool_resource_stats
HekatonMemory-optimized statsdm_db_xtp_*
ColumnstoreSegment fragmentationdm_db_column_store_*
CDCChange Data Capture sağlığıcdc.change_tables
Service BrokerPoison message tespitisys.transmission_queue
Linked serversBağlantı + providersys.servers

SQL Server ortamınızı 15 dakikada izlemeye başlayın

SQL 2008R2'den SQL 2022 ve Azure SQL'e kadar — agentless kurulum, MVP yönlendirmesi.