T-SQL

Technical Article

Get File Info

  • Script

This script organizes information about the database files on the server.   A cursor is used to get the information from each database.  The information is reported in Megabytes, including the next allocation from disk.  No bells and whistles...and if I can find how dbcc showfilestats works I will add the amount of space used in […]

You rated this post out of 5. Change rating

2002-06-24

1,090 reads

Technical Article

sp_MSforeachtrigger-Perform action on each trigger

  • Script

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

660 reads

Technical Article

sp_MSforeachfk-Perform an action on every FK

  • Script

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

657 reads

Technical Article

sp_MSforeachsproc -Perform an action on each sproc

  • Script

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,363 reads

Technical Article

sp_MSforeachview - Perform an action on each view

  • Script

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,968 reads

Technical Article

Stored procedure for viewing trigger details

  • Script

This is a stored procedure for viewing details of trigger. It accepts trigger name as a optional parameter. When specified, it shows details of only that trigger. If no trigger name is specified shows the details of all the triggers in that database. this SP is created in master database but can be called from […]

You rated this post out of 5. Change rating

2002-06-12

319 reads

Blogs

A New Word: Vicarous

By

vicarous – adj. curious to know what someone else would do if they were...

SQL Server Cross Platform Availability Groups and Kubernetes

By

Say we have a database that we want to migrate a copy of into...

Using Managed Identities with Azure SQL DB

By

We are trying to get apps and users off of using SQL accounts to...

Read the latest Blogs

Forums

We Stink!

By Grant Fritchey

Comments posted to this topic are about the item We Stink!

View works for me ...but doesn't return results for a user in SSMS but no errors

By krypto69

Hi I have this view to check if a job is running:   SELECT...

Dark mode, other color schemes

By mjdemaris

All, if you are like me and do not care for the built-in color...

Visit the forum

Question of the Day

Internal Checkpoints

Certain internal SQL Server actions cause internal checkpoints. Which of these actions does not cause an internal checkpoint?

See possible answers