Clinton Herring


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

119 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,036 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

247 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

304 reads

Blogs

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

Read the latest Blogs

Forums

Looking for a Recommended Azure SQL Managed Instance Book

By shew

Can anyone recommend an Azure SQL Managed Instance book? I'm looking for information about...

timeout in vs for ssas tabular deploy is 0 but i still timeout deploying

By stan

hi we run 2019 std but i'm testing this on 2016.   following some old...

Table variable declared within cursor persists across loop iterations

By Steve Collins

If you run this code it creates a 2 row cursor loop.  Within the...

Visit the forum

Question of the Day

The Backup File Extension

I run this command in SQL Server 2022. What is the extension of the backup file?

BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'

See possible answers