Kill SPIDs through automated job(while restore)
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,829 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,829 reads
Truncating tables with constraints always had been a pain, since we have to drop and recreate all the FKs. I created a script that takes care of dropping and recreating the foreign keys while truncating. Please use with caution! and always respect your Data !
2016-12-01 (first published: 2016-11-28)
1,405 reads
2016-11-30 (first published: 2016-11-22)
825 reads
2016-11-29 (first published: 2015-03-30)
3,941 reads
2016-11-28 (first published: 2016-11-21)
4,165 reads
Warm the cache with a particular table by reading it into memory.
2016-11-25 (first published: 2016-11-14)
920 reads
2016-11-24 (first published: 2003-07-09)
817 reads
2016-11-22 (first published: 2016-11-11)
851 reads
If you have Always On and need to stop running database backups to the stand by server, use the script.
2016-11-21 (first published: 2016-11-01)
328 reads
This query generate add/alter script for missing or different columns. Execute on source database and copy resultset. Execute generated script on any database (may be all customer databases) Missing columns will be created and different types will change as source schema.
2016-11-18 (first published: 2016-11-07)
936 reads
By Arun Sirpal
“What exactly did it do on my server?” is the first question a DBA...
By James Serra
Microsoft shared a broad set of Fabric, Power BI, and SQL updates at FabCon...
By Steve Jones
No, I’m not quitting or retiring. Just going on vacation, but I leave tonight...
Comments posted to this topic are about the item Let's Talk Certifications
Comments posted to this topic are about the item The Hidden Security Risks of...
Comments posted to this topic are about the item The Empty Aggregate
I have this table in a SQL Server 2025 database:
CREATE TABLE [dbo].[CustomerOrder] ( [OrderID] [int] NULL, [CustomerID] [int] NULL, [total] [money] NULL ) ON [PRIMARY] GOWhat is returned from this code? (answers are for the sum and then the count)
SELECT SUM(total) AS sum,
COUNT(total) AS count
FROM dbo.CustomerOrder;
See possible answers