Moving TempDB
One of the common questions new SQL Server workers ask is how they can move or alter tempdb. Andy Warren takes a look at the tricks involved with this special system database.
2008-08-04
6,377 reads
One of the common questions new SQL Server workers ask is how they can move or alter tempdb. Andy Warren takes a look at the tricks involved with this special system database.
2008-08-04
6,377 reads
Searches for tables who's names contain the search string. Gives Size and Rows information as well.
2009-10-14 (first published: 2008-08-01)
2,259 reads
Searches for columns with names containing @Colname that belong to tables with names containing @TableName or schemas with names containing @SchemaName. Gives size and rowcount for tables.
2009-10-16 (first published: 2008-08-01)
1,495 reads
This is an addition to Jim Rea's "Get record count for a specific database". I modified it to loop through all databases and provide counts.
2008-08-01
1,191 reads
This tip presents two very useful stored procedures that live in the master database but are not mentioned in SQL Server Books Online. These system procedures come in very handy for jobs such as determining the space used, the number of rows, the indexes on the user tables, and so on.
2008-07-29
4,102 reads
2008-10-28 (first published: 2008-07-25)
4,027 reads
Generates a list of ALL Users and their database Roles for all Databases (Or for a specific user).
2013-12-30 (first published: 2008-07-24)
45,243 reads
This script is for the Generating a code block that makes it easier to grant various permissions on a group of objects qualified by specific Criteria.
2008-12-19 (first published: 2008-07-23)
1,317 reads
Here's a script, for killing a SPIDs against a particular database, here am using BIN as the database.
2016-12-02 (first published: 2008-07-17)
1,803 reads
We have a new author at SQLServerCentral.com, Muthusamy Anantha Kumar AKA The MAK, who starts a new series on the basics that a DBA needs to know. This installment walks over basic backup and restore.
2008-07-15
13,174 reads
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
Looking for a creative and experienced mobile game development company that brings your game...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers