-- Stored Procedure: dbo.MostRowsByDBEmailReport -- Bill Wunder use admin GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MostRowsByDBEmailReport]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[MostRowsByDBEmailReport] GO CREATE PROCEDURE [dbo].[MostRowsByDBEmailReport] @recipients varchar(100) AS /******************************************************************************************************* * admin.dbo.MostRowsByDBEmailReport * Creator: Bill Wunder * Date: * * * Description: Track large tables * Notes: 'Additional Comments or Technical Details' * * Usage: EXECUTE admin.dbo.MostRowsByDBEmailReport 'bill.wunder@wallst.com' * * * Modifications: * Developer Name Date Brief Description * ------------------ -------- ------------------------------------------------------------ * ********************************************************************************************************/ --------------------------------------------- -- declare variables --------------------------------------------- declare @message varchar(1024) --------------------------------------------- -- create temp tables --------------------------------------------- --------------------------------------------- -- set session variables --------------------------------------------- SET NOCOUNT ON --------------------------------------------- -- body of stored procedure --------------------------------------------- exec sysmon.dbo.safe_sendmail @recipients = @recipients, @subject = 'The tables with the most rows in each db', @query = 'exec admin.dbo.LargestTables', @width = 140 RETURN GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO