Create Database Snapshot Dynamically
Dynamic SQL can be used to generate a database snapshot. Useful for a database with a number of files.
2018-08-23 (first published: 2016-11-04)
3,562 reads
Dynamic SQL can be used to generate a database snapshot. Useful for a database with a number of files.
2018-08-23 (first published: 2016-11-04)
3,562 reads
2018-08-13 (first published: 2018-07-18)
710 reads
2018-08-08 (first published: 2018-07-22)
442 reads
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
821 reads
2018-07-17 (first published: 2018-06-26)
931 reads
SQL Functions that simplify search and operations over strings on SQL Server (starting with 2012)
2018-07-11 (first published: 2018-07-06)
4,932 reads
This script is intended to demonstrate how we can create a stored procedure for the user responsible for backing up user databases in a default storage location.
2018-07-10 (first published: 2018-07-05)
534 reads
2018-07-09 (first published: 2018-07-04)
514 reads
The T-SQL script created a databases using the default file locations from SQL server configuration and prints them in the end.
2018-07-05 (first published: 2018-06-28)
1,968 reads
It will help to find and manage the users access on DB level
2018-07-05 (first published: 2018-06-26)
426 reads
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers