Clinton Herring


Technical Article

Format a DOS date as yyyymmdd

Do you run jobs that call BAT files where you wish you could include a formatted date stamp in the output name of an OSQL file? Well, you can using the DOS 'FOR' command. I named a variable FILEDATE and use it as: path\Filename_%FILEDATE%.txt (Note: A BAT file requires double %% in the 'FOR' command […]

4.5 (2)

You rated this post out of 5. Change rating

2002-10-21

1,082 reads

Technical Article

sp_CompareTblCnts

This stored procedure does a quick table comparison between 2 databases that are supposed to be the same. Tables found on either db but missing from the other are reported as are record count differences for matching tables. Establish a linked-server with appropriate permissions to compare across servers. Compile in master.

You rated this post out of 5. Change rating

2002-10-09

116 reads

Technical Article

sp_GetUserInfo

Returns database user information as a runnable script for the specified database. The default is master. Great for restoring user access and permissions after a restore to a development server. Run prior to the restore and save the output to an sql file.

You rated this post out of 5. Change rating

2002-10-09

1,029 reads

Technical Article

Find and replace column constraints

I submit this script as an example of how one might go about generating 'Alter Table' statements that find and replace specific column constraints. In my case I had to find all occurrences in a production db of suser_name() as a column constraint and replace it with suser_sname(). This script is only an example and […]

You rated this post out of 5. Change rating

2002-10-08

238 reads

Technical Article

sp_spaceused2

An update to sp_spaceused2. This update fixes some problems related to dbs that are non-accessible such being offline. This stored proc can be run from any database when compiled in master and can report information on all databases at once. Get information on all dbs, one db, one db and all its tables or one […]

You rated this post out of 5. Change rating

2002-02-19

282 reads

Blogs

Set a Runtime Variable in an Azure DevOps Pipeline

By

Note: I DO NOT recommend this. Any changes to a pipeline should be in...

A New Word: Symptomania

By

symptomania – n. the fantasy that there’s some elaborate diagnosis out there that neatly...

Query Store Keeps Switching Itself Off, Getting it Moving Again

By

I recently received a complaint that Query Store for a particular database was turned...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers