Scripts

Technical Article

Script to Zip a Backup File

A handy dandy proc that can be used to zip up a backup file to location specified. Also called from a backup script to automate the compression of all backups using PKZip command line utility. Make sure pkzip is in the path and found by the shell prior to using this script.

1 (1)

You rated this post out of 5. Change rating

2001-08-20

3,715 reads

Technical Article

Script to Search SQL Error Log For a String

This script(sproc)uses xp_cmdshell from sql and FINDSTR from DOS to search the current errorlog for a specific string such as kernel or failed login. Compile this in the master db and if you do not pass an input parameter a example usage will display for you. ex: sp_dba_sqlerrorlog kernel Edward J Pochinski III

4 (1)

You rated this post out of 5. Change rating

2001-08-13

1,897 reads

Technical Article

Show Fragmentation Before and After Reindex

This will show the fragmentation and stats before and after a reindex of a specified table. Run in the context for the db that holds the table the proc will get passed and re-index. Complile in master since the master is checked first for any SP that is prefixed with SP_ and you can call […]

You rated this post out of 5. Change rating

2001-08-13

4,015 reads

Blogs

The Ireland and UK DevOps Roadshow

By

We’re taking the roadshow across the water. Hope the plane makes it. The Redgate...

SQL Aggregate Functions: Your Essential Guide & Cheat Sheet

By

SQL aggregate functions are your go-to tools for transforming raw data into actionable insights....

T-SQL Tuesday #174 – My Favorite Interview Question

By

This month is a great topic to me. I think growing and improving your...

Read the latest Blogs

Forums

Creating Statistics on XML

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Creating Statistics on XML

Managing SQL Agent in Azure Data Studio

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Managing SQL Agent in Azure...

Database design help and tips for a small app used to coach tennis players.

By JB

Hi, I hope this isn't too long of a question- I tried to make...

Visit the forum

Question of the Day

Creating Statistics on XML

I have a table in SQL Server 2022 that is an XML data type. I have an index on this column and want to create statistics using CREATE STATISTICS for some of the data in the column. What should I do?

See possible answers