Brian Knight

Brian Knight, MCSE, MCDBA, is on the Board of Directors for the Professional Association for SQL Server (PASS) and runs the local SQL Server users group in Jacksonville. Brian is a contributing columnist for SQL Magazine and also maintains a weekly column for the database website SQLServerCentral.com. He is the author of Admin911: SQL Server (Osborne/McGraw-Hill Publishing) and co-author of Professional SQL Server DTS (Wrox Press). Brian is a Senior SQL Server Database Consultant at Alltel in Jacksonville and spends most of his time deep in DTS and SQL Server.

Technical Article

Set Extended Properties for Every Table

Extended properties are a neat feature in SQL Server 2000 that let you set meta data for an individual object. This stored procedure is a baseline sproc that lets you set the properties of every object in a DB to a given value. For example, if you baseline your database at 1.5.0, you can set […]

You rated this post out of 5. Change rating

2005-03-02 (first published: )

194 reads

Technical Article

sp_MSforeachfk-Perform an action on every FK

This stored procedure loops through each user defined Foreign Key and performs an action on that FK, like disabling them or printing its name. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. .Shortened version of the usage (there are […]

You rated this post out of 5. Change rating

2002-06-14

656 reads

Technical Article

sp_MSforeachsproc -Perform an action on each sproc

This stored procedure loops through each view and performs an action on that stored procedure, like printing the records or running an sp_help. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp.Shortened version of the usage (there are a lot […]

You rated this post out of 5. Change rating

2002-06-14

1,362 reads

Technical Article

sp_MSforeachtrigger-Perform action on each trigger

This stored procedure loops through each trigger and performs an action on that trigger , like disabling or printing it. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. Shortened version of the usage (there are a lot more parameters […]

You rated this post out of 5. Change rating

2002-06-14

658 reads

Technical Article

sp_MSforeachview - Perform an action on each view

This stored procedure loops through each view and performs an action on that view, like counting or printing the records. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. Shortened version of the usage (there are a lot more parameters […]

You rated this post out of 5. Change rating

2002-06-14

1,941 reads

Technical Article

Detect the Amount of Wasted Data Space in a Table for 2000

SP_WASTED_SPACE will run through each column in your database and print a report of all the character columns. It will then print a report with :* The maximum length that a column is storing* The average length of data stored in each column* The amount of wasted space in each column* Hints on how to […]

You rated this post out of 5. Change rating

2002-03-14

1,117 reads

Blogs

Announcements from the Microsoft Fabric Community Conference

By

(Shameless plug: The price of my book “Deciphering Data Architectures: Choosing Between a Modern...

The Basics of TRY CATCH Blocks–#SQLNewBlogger

By

I was working with a customer and discussing how to do error handling. This...

Working with ALS – Insights from the Ability Summit

By

The 14th annual Ability Summit is a global event that I attended a few...

Read the latest Blogs

Forums

how to return the min value of a column if a sub-query returns no results

By water490

Hi everyone My query works for most cases.  There is one edge case where...

Basic SQL Query question

By jjevans

Hello, I was given this SQL question and was hoping someone could please help...

Different logical drives in 2024?

By kevin.j.sexton

In recent days past, there was a Performance gain by placing data files, log...

Visit the forum

Question of the Day

Backing up the Resource Database

How does the Resource database in SQL Server 2022 get backed up?

See possible answers