Category Archives: SQL Scripts

Index Scripts

List all indexes for all tables in a SQL Server Database. USE AdventureWorks2012 GO SELECT DB_NAME() AS Database_Name , sc.name AS Schema_Name , o.name AS Table_Name , i.name AS Index_Name… Read more »

SQL DBA Scripts and Commands

For Full Backup BACKUP DATABASE [AdventureWorks2008R2] TO  DISK = N’C:\Gaurav\Backup Files\AdventureWorks2008R2_Full.bak’ WITH NOFORMAT, NOINIT,  NAME = N’AdventureWorks2008R2-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD,  STATS = 10 For Differential Backup BACKUP DATABASE… Read more »