#sp_shrinkdata

Unlike shrinking transaction log, shrinking a data file seems to be tough. A lot of people complained about the "shrink database" option in EM not working, or DBCC SHRINKDATABASE not working, or DBCC SHRINKFILE not working. I have found that a data file will eventually shrink given enough try, time and patience. I've put everything […]

2003-01-14

390 reads

sp_kill

This stored proc has helped me a lot when I needed to restore db, reconfigure replication, and do other database jobs. SQL server KILL command can only act on a single spid. This sp compiles KILL commands in a cursor to kill a group of spids based on database name, login name, host machine name […]

2002-11-11

3,740 reads

sp_checksqlversion

How many times have you seen @@version return a number but failed to interpret what service pack it is? Although SQL 2000 gives a gift (SERVERPROPERTY) of querying a readable value, my script will remedy the puzzle and show more parameters such as CPU speed, memory, windows version, and installation date. The limitations are:1. MSDE […]

2002-10-16

443 reads

sp_checksize

This stored procedure checks the sizes of one or all databases (including total data, total log, data used/free, data used/free percentage, log used/free, log used/free percentage). If a database name is provided, it will only check the given db. If no parameters provided, all dbs will be checked and the total size of all dbs […]

2002-10-01

1,016 reads

Blogs

Updated Pluralsight Course – Managing the Kubernetes API Server and Pods

By

My updated course “Managing the Kubernetes API Server and Pods” in now available on Pluralsight here! If...

Daily Coping 11 May 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

What do you do when technology changes? : T-SQL Tuesday #138

By

Our host for this month’s TSQL Tuesday is Andy Leonard (blog|twitter). He’d like us...

Read the latest Blogs

Forums

Where to download previous versions of CU for SQL server 2019

By sqlfriend

I see there is some defects for inline functions by CU9, and CU10. So...

How to rebuild index on Internal Table?

By mandavli

I keep on getting error : Unable to find index entry in index ID...

Division between two Summed fields giving errors

By fahad.kazi

Hi, I am trying to get a Percentage of Budget field added to my...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers