Skip to content

kisinamso/SQLServerMaintenanceBox

Repository files navigation

Database Management Scripts

This repository contains various T-SQL stored procedures that can be used for database management tasks.

Contents

  1. Index Maintenance
  2. Databases Backup
  3. Statistics Update Maintenance
  4. Shrink All Databases Log Files
  5. Database Integrity Check
  6. Send Job Failure Report E-Mail
  7. Blocking Check And Send E-Mail
  8. Analyzing Tables For Archiving

Guidelines

Index Maintenance

This stored procedure performs maintenance on indexes in specified or all databases. It checks index fragmentation and reorganizes or rebuilds indexes as needed. If you want to view guideline, please click here.

Databases Backup

This stored procedure backs up specified or all databases. It offers options for full, differential, and transaction log backups. If you want to view guideline, please click here.

Statistics Update Maintenance

This stored procedure performs maintenance on statistics in specified or all databases. If you want to view guideline, please click here.

Shrink All Databases Log Files

This stored procedure aims to shrink all database log files. If you want to view guideline, please click here.

Database Integrity Check

This stored procedure checks the integrity of a specified database. If not specified, it checks the integrity of all databases. If you want to view guideline, please click here.

Send Job Failure Report E-Mail

This stored procedure sending e-mail for failured job. If you want to view guideline, please click here.

Blocking Check And Send E-Mail

This stored procedure sending e-mail for blocking session. If you want to view guideline, please click here.

Analyzing Tables For Archiving

This stored procedure analyzing tables for archiving in specified or all databases. If you want to view guideline, please click here.