Logshipping Report
Get Logshipping report only when secondary is more than certain time behind Primary.
2017-11-14 (first published: 2017-10-27)
498 reads
Get Logshipping report only when secondary is more than certain time behind Primary.
2017-11-14 (first published: 2017-10-27)
498 reads
With high transactions table the sys.syscommittab table does not gets deleted properly. Millions of backdated row remains. To delete the sys.syscommittab table below is the script.
2017-11-13 (first published: 2017-10-27)
936 reads
SQL Server procedure to script all tables in a given database to one or individual files on a given path.
2017-10-09 (first published: 2017-10-04)
3,060 reads
2017-10-05 (first published: 2017-10-02)
16,762 reads
Lists the job names and package names for jobs that execute SSIS packages (for packages stored in msdb).
2017-09-13 (first published: 2017-09-05)
2,109 reads
Some short & sweet PS code to add databases on AG Node 1 to AG Node2 and snap them in.
2017-09-12 (first published: 2017-09-07)
1,024 reads
Stored procedure to ensure CDC job will be started once failover happen.
2017-08-25 (first published: 2017-08-22)
837 reads
This script will give you a thorough report about sql server jobs based on historical data.
2017-07-26 (first published: 2013-09-25)
2,200 reads
Script database and object level permissions for all database users
2017-07-25 (first published: 2016-02-26)
15,637 reads
2017-07-24 (first published: 2017-07-12)
653 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers