Basic database checkup

Here is some code to determine database health. Use it for Data Pump SQL series projects.

USE ASI2353;
/* Do the basic check */
DBCC checkdb('ASI2353');
/*  See file sizes */
SELECT name, size, maxsize from sysfiles;
/* See the percentage of used files */
DBCC Updateusage ('ASI2353');
EXEC sp_spaceused;
/*  See free space on transaction log */
DBCC SQLPerf (LogSpace);
/* See if there is an open transaction */
DBCC OpenTran ('ASI2353');
/* See index fragmentation */
DBCC ShowContig (PartData) with ALL_INDEXES;