Technical Article

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

You rated this post out of 5. Change rating

2003-01-14

399 reads

Technical Article

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

You rated this post out of 5. Change rating

2002-11-11

5,557 reads

Technical Article

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

You rated this post out of 5. Change rating

2002-10-16

448 reads

Technical Article

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

You rated this post out of 5. Change rating

2002-10-01

1,022 reads

Blogs

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Going to Cloud? Look at the Shared Responsibility Model

By

The bottom line here is this: the idea that a CSP takes care of...

Read the latest Blogs

Forums

Aligning Compatibility Version Strategy

By BOR15K

I have joined a new project, where the business uses Azure SQL Hyperscale for...

azure synapse analytics

By river1

Dears, Hope this message finds you well I did not see in this foruns...

Restore dbs

By mtz676

The below code works for backup files only from local drives. When replaced with...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers