Maintenance and Management

Technical Article

Job Status Revised.

  • Script

This procedure queries the sysjobs, sysjobschedules and sysjobhistory table to produce a resultset showing the jobs on a server plus their schedules(if applicable),how often the interval occurs(every X hours,min.,days,etc), the maximun duration, last duration,last status   of the job.This is a script that I modified and added to from M.Pearson.

You rated this post out of 5. Change rating

2003-12-16

387 reads

Technical Article

SQL Server DB Size Report

  • Script

This script is similar in style to my previous script SQL Server Job Status Report, but this script generates an HTML report on the size of all databases on a specific SQL Server instance. The report consists of several sections: a summary report on the size of all databases; a summary report on the size […]

You rated this post out of 5. Change rating

2003-12-04

1,130 reads

Technical Article

SQL Server Job Status Report

  • Script

This script generates an HTML report on the status of all jobs on a specific SQL Server instance. The report consists of several sections: a summary report of jobs that have passed, failed, been cancelled, or whose status is unknown; a detailed report of the status of each job.The script is designed to be included […]

You rated this post out of 5. Change rating

2003-12-01

916 reads

Technical Article

Monitor space used for disks, DBs, tables and filegroups

  • Script

I pieced this script together from solutions I found on this and from Brian Knight's excellent book. It creates 3 tables: - tblDriveLogs. Collects free drivespace info for each drive for each time the script is run. - tblIndexLogs. Collects info on spaceused for each index and table. Please note that when only af single […]

1 (1)

You rated this post out of 5. Change rating

2003-11-26

897 reads

Technical Article

User-defined data type dependencies

  • Script

MSSQLServer has got sp_depends system sp to display the dependencies for a stored procedure, table and view.  sp_depends does not support to display the User-defined data type dependencies.  For custom database, we will create user defined data types (UDDT) and add this UDDT to a column/variable in a table/stored procedure.  This sp (UDTDepends) will help […]

5 (1)

You rated this post out of 5. Change rating

2003-10-30

447 reads

Technical Article

User tables documentation - HTML format

  • Script

It creates documentation for all user tables in a specific database. A server name/ database name was added on the top of the HTML file also a column datatype field was added to the HTML file. Now the @strHTML can have 8000 chars, before only 4000 - still for tables with a lot of columns […]

You rated this post out of 5. Change rating

2003-10-27

646 reads

Technical Article

SQL Server Error Log Manager

  • Script

Provides a method to regularly recycle the sql server error logs based on a given file size.  If the current log file is larger than that size, then the current log is closed and a new log created.This proc takes one parameter, @MaxFileSize, which is the target file size.  This parameter defaults to 10 MB. […]

You rated this post out of 5. Change rating

2003-10-27

916 reads

Technical Article

Know all Database sizes in a server.

  • Script

We can know how much space a database is occupied in hard disk by using sp_spaceused function. If we want to find all database sizes at a time, we have to provide use  and sp_spaceused for all databases. It takes some time to write all those T-sql statments. My script will find each and every […]

3 (2)

You rated this post out of 5. Change rating

2003-09-16

1,657 reads

Blogs

A New Word: Mornden

By

mornden – n. the self-container pajama universe shared by two people on a long...

SQL Training: Black Friday Deals Up to 75% Off

By

This Black Week, don't just get a discount—get ahead! Whether you're a total newbie...

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

Read the latest Blogs

Forums

Announcing SQL Server 2025

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Announcing SQL Server 2025

Running Steve's Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Running Steve's Code

New SQL Server 2022 Functions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New SQL Server 2022 Functions

Visit the forum

Question of the Day

Running Steve's Code

Can you run this code in any of your SQL Server 2019 databases without error?

CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc]
AS
    
        SELECT Consumer_ID ,
               Trend_Category ,
               Bit_Trace
        FROM    NewWorldDB.dbo.MarketTrend;
    
GO

See possible answers