Maintenance and Management

Script Generator for Triggers

  • Script

This Stored Procedure creates the script of all existing triggersOptionally it creates the script to drop the triggers too.Triggers may belong to different owners. This procedure takes care of it.In SQLServer Enterprise Manager there is a facility to generate scripts forTables, Views, Stored Procedures etc.But it won't generate script for triggers unless we include the […]

5 (6)

2002-03-27

2,511 reads

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

  • Script

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 […]

2002-03-14

1,102 reads

Display Rows/Space Used by all user tables

  • Script

This procedure will display the rows, reserved, data, index and unused space used in KB for all user tables in the database.  The idea is to call sp_spaceused repeatedly.  Limitation: certain versions of sp_spaceused will truncate the table name to 20 characters.Speed will depend on current activity level and locking in the database.  It will […]

2002-03-14

380 reads

Blogs

GotoWebinar (and Teams) won’t screen share after macOS update to Catalina (10.15)

By

This blog post is about the situation where after upgrading to the latest macOS...

Improving TweetDeck with Better TweetDeck

By

If you are at involved with the #sqlfamily, you are bound to hear about...

Interview with Bob Ward

By

This is the eight interview we have done. This time our guest is the...

Read the latest Blogs

Forums

STRING_SPLIT with Index as Table-Valued Function

By bteague

Comments posted to this topic are about the item STRING_SPLIT with Index as Table-Valued...

Protecting Data from the Inside

By Phil Factor

Comments posted to this topic are about the item Protecting Data from the Inside

Remove the middle of a string between wildcards

By ncraigg

I have a field called 'jsonpayload' in a table called 'auditlog' that is populated...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers