Maintenance and Management

Technical Article

Track Long Running Queries

  • Script

SQL2000 only.We use the attached script to schedule a SQL Agent job that sets up a Profile trace looking for long queries, and hourly imports them into a table.  This way we can historically (but with some degree of real time) look to see what queries put a load on the system.  We then allow […]

5 (1)

You rated this post out of 5. Change rating

2003-08-23

1,473 reads

Technical Article

Delete old backup files

  • Script

A stored procedure and two functions that given a path, a date and a file extension will do one of the following:-Delete all files of the supplied extension in that directory before a certain date.-Delete everything before the last full backup.I use this because disk space is tight and maintenance plans seem to delete old […]

You rated this post out of 5. Change rating

2003-08-21

713 reads

Technical Article

Get Filegrowth info from backuphistory

  • Script

This uses info in backup tables to display growth of datafiles (LDF and MDF) and actual datagrowth (backupsize)  over a period of time.  Replace parameter values with name of your database and date from when you want info displayed. Results are best viewed in grid.

5 (2)

You rated this post out of 5. Change rating

2003-08-20

397 reads

Technical Article

Script to View Server's Free HD Space

  • Script

This VBScript script lets you display the available disk space in each one of your administered DB servers.You have to call it with ONE argument: the filename of an archive that contains a list of known servers over which you have administration permissions.  If you program VBScript, you can put alarms when any drive goes […]

You rated this post out of 5. Change rating

2003-08-13

418 reads

Technical Article

Table Size Estimator

  • Script

This script will output an estimate for the space required for a given number of rows for a specified table; the estimated size is based on the data produced by the "sp_spaceused" stored procedure.The script is written as stand alone, though it also lends itself to creation as a stored procedure, and can be run […]

You rated this post out of 5. Change rating

2003-08-07

4,485 reads

Technical Article

Display Database, File, Free and Total Disk Space

  • Script

This script displays the size of each SQL Server database and database file plus the size of the next extension that will be added to each file. It also displays on each line the total and remaining free disk space for whichever disk each database file is stored on.The output is nothing fancy, and could […]

1 (1)

You rated this post out of 5. Change rating

2003-07-30

1,309 reads

Technical Article

Resize data file manually to prevent downtime

  • Script

This script will resize the data file of a passed in database name and filename by 10%. It can run in 3 modes.Resize, INFO, HELP. RESIZE is passed into parameter @Mode when we know the database name and file we wish to resize. INFO is passed in when we only know the database name and […]

You rated this post out of 5. Change rating

2003-06-19

648 reads

Blogs

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Side Projects

By

Anyone (everyone?) who has ever tried to learn a programming language knows that to...

Read the latest Blogs

Forums

Automating Export of PowerQuery to SQL Server using DAX Studio...?

By pietlinden

I wrote a PowerQuery that parses a table from a PDF, and I want...

Attaching an SQL Server database without Transaction Log Files through SQL Server Management Studio.

By Noman072

Comments posted to this topic are about the item Attaching an SQL Server database...

Superseded Indexes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Superseded Indexes

Visit the forum

Question of the Day

Superseded Indexes

Which of these indexes is superseded by another?

See possible answers