Table Counts plus Space Used by Data and Indexes

I was recently reviewing some of the Dynamic Management Views (DMVs) available since SQL Server 2005 and came across the interesting and useful sys.dm_db_partition_stats DMV.  The documentation states that this DMV will return “page and row-count information for every partition in the current database”.  In the Space Used by Filegroup... [Read More]

Migrate Databases Using Backup-Restore

Migrating a database can be a major headache, especially due to the downtime or outage incurred by all systems accessing the database.  This is exacerbated when the data files which have to be moved are considerably large.  Obtaining approval for a suitable and longish downtime might not always be possible... [Read More]

One Difference between DBCC DBREINDEX and ALTER INDEX

I was recently discussing with one of my peers the fact that following a periodical reindexing/index rebuild, the overall database performance was better when the old syntax was executed. To put you in the picture, until the SQL Server 2000 version, index fragmentation was handled using the DBCC DBREINDEX and... [Read More]

Data Driven Account Management – part 2

Two weeks ago, in the Data Driven Account Management – part 1 article, I demonstrated how a number of basic account management functions can be implemented for an SQL Server (2005 and later) database without granting elevated priviliges to end users.  The article and attached script showed how logins, users and... [Read More]