Microsoft SQL Serverda belirtilen bir veritabanı veya sunucu üzerindeki tüm veritabanları hakkındaki bilgileri raporlar.
Örnek kullanım; sistem üzerindeki tüm veritabanına ait bilgileri listeler.
EXEC sp_helpdb;
GO
Ornek sorgu detayı;
name | db_size | owner | dbid | created | status | compatibility_level |
AdventureWorks2019 | 336.00 MB | KADIRKOZAN\Administrator | 5 | May 4 2022 | Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=904, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAnsiNullsEnabled, IsAnsiPaddingEnabled, IsAnsiWarningsEnabled, IsArithmeticAbortEnabled, IsAutoCreateStatistics, IsAutoUpdateStatistics, IsFullTextEnabled, IsNullConcat, IsQuotedIdentifiersEnabled | 140 |
master | 6.44 MB | sa | 1 | Apr 8 2003 | Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=904, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics | 150 |
model | 16.00 MB | sa | 3 | Apr 8 2003 | Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=FULL, Version=904, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics | 150 |
msdb | 40.06 MB | sa | 4 | Sep 24 2019 | Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=904, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics, IsFullTextEnabled | 150 |
tempdb | 40.00 MB | sa | 2 | May 4 2022 | Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=904, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics | 150 |
Örnek kullanım; sadece “AdventureWorks2019” isimli veritananına ait bilgilere ulaşmak için;
EXEC sp_helpdb N'AdventureWorks2019';