Generate RESTORE DATABASE Script without Using CMDSHELL
Use this script to generate RESTORE DATABASE scripts for all .BAK backup files from backup location during Instance or Database migration.
2016-08-31 (first published: 2014-12-10)
4,004 reads
Use this script to generate RESTORE DATABASE scripts for all .BAK backup files from backup location during Instance or Database migration.
2016-08-31 (first published: 2014-12-10)
4,004 reads
Use below query to find tables that need to be optimized based on number of forwarded records.
2016-06-16 (first published: 2016-05-05)
597 reads
Use provided script to fix orphan users for all databases after Instance Migration. Tested on SQL 2014.
2016-01-04 (first published: 2015-12-17)
1,593 reads
Use this script to set recommended Log files size growth for larger DBs. For more, please refer article: http://sqlmag.com/blog/choosing-default-sizes-your-data-and-log-files
2015-12-15 (first published: 2015-12-07)
1,231 reads
This script will drop a mail for sql drives if space on drives is below set threshold value. Log drives with 15 and data files drives with value of 10% as threshold value of free space.
2015-11-19 (first published: 2015-10-27)
2,708 reads
This script is useful to copying latest backup files from job Backup path during Instance/Database Migration
2015-01-29 (first published: 2014-12-15)
981 reads
This script is useful to remove SQL backup files except latest one for same day from Backup Path.
2015-01-26 (first published: 2014-12-12)
1,104 reads
Use this script to generate BACKUP DATABASE scripts for selective or all databases during Instance or Database migration.
2014-12-31 (first published: 2014-12-10)
1,302 reads
By Vinay Thakur
Continuing from Day 3 where we covered LLM models open/closed and their parameters, Today...
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
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