SQL Server Management Studio - Enhancements in Object Explorer Details Window with MS SQL 2008
Microsoft is improving SQL Server with every new version and with every service pack.
Now with the MS SQL Server 2008 there exists many enhancements for sql server administrators as well as sql developers.
I want to share with you what I have realized for a short time ago. I mean the Object Explorer Details window for the Databases node of a SQL Server database instance in Object Explorer window.
Do you see the list about the properties of databases created on the related SQL Server.
By the way, this view is not limited for only MS SQL2008 instances, if you are using SQL2008 SSMS you will get the same list for a SQL Server 2005 database instance.
What is important and what makes this list valuable is that you can get such a list by opening the Properties screen of each database and collect data fragments from different tabs on the database properties screen.
I run the SQL Server Profiler while refreshing the window while the databases are listed and get a huge list of sql queries.
I have copied the sql scripts that are executed by the SSMS at the bottom of this article.
You can compare the improvement in Object Explorer Details window by comparing it with a MS SQL Server 2005 SQL Server Management Studio screen.
Below I have copied down a view from SSMS 2005 Object Explorer Details window.
There is only a list of database names when you click on the Databases node of the MS SQL Server instance on the Object Explorer window.
I believe the Object Explorer Detail screen was useless before the SSMS 2008 because why you should want to get the same list that you can easily see on the Object Explorer window by expanding the Databases node.
But after the enhancements in Microsoft SQL Server 2008 for the SQL Server Management Studio (SSMS), you might want to get a clear shot of the databases on a SQL Server instance. The Object Explorer Details window now grants a summary view of the existing sql databases created.
Another point that makes SSMS Object Explorer Detail window a simple tool for monitoring databases is you can add a numerous features and properties of each database and compare them in one management window.
Let's look at what this tool grants us for monitoring from a high level and take a snapshot of the SQL Server database instance.
Name Policy Health State Recovery Model Compatibility Level Collation Owner Date Created ID Last Backup Date Last Log Backup Date Size (MB) System Database Data Space Used (KB) Index Space Used (KB) Space Available ANSI NULL Default Case Sensitive Default File Group GUID Mail Host Mirroring Status Ownership Chaining Primary File Path Read Only ANSI NULL Enabled ANSI Padding Enabled ANSI Warnings Enabled Arithabort Enabled Auto Close Enabled Auto Create Statistics Enabled Auto Shrink Enabled Auto Update Statistics Enabled Broker Enabled Full Text Enabled Mirroring Enabled Quoted Identifiers Trustworthy Enabled |
I have set the databases node Object Explorer Details window to include the ID, Last Backup Date, Size, Space Available, Mirroring Status as well as the default Policy Health State, Recovery Model, Compatibility Level and Collation.
I use the ID of the database to set filter for the related sql database in the SQL Server Profiler.
Last backup dates are important if you need to keep your backup strategy live.
Size, space used and available space values are important criterias to keep under control. So I added them also.
The SQL Server Management Studio for MS SQL Server 2008 keeps these settings in your profile data. So when you open the Object Explorer Details window later, you will get the same design of sql databases list.
But I think there is a small bug in the SSMS window. When you add a new column the list resets itself and reloads but when you remove an item / a column from the list you have to refresh the list to get the desired view.
Any way, actually this is not a bug to talk about.
SQL Server Profiler Output
I traced the MS SQL Server Profiler output while the SSMS is loading the databases properties list into the Object Explorer Details window. And you can find below the queries executed by the SQL Server engine.
By the way, the below script is executed for each database.