Rebuild index selectively
Rebuild index is expensive most time. So you don't rebuild all index blindly.
2015-11-04 (first published: 2015-10-05)
1,857 reads
Rebuild index is expensive most time. So you don't rebuild all index blindly.
2015-11-04 (first published: 2015-10-05)
1,857 reads
The script uses dynamic SQL twice
first to get the detail about the database structure and create ddl out of it
second to execute each DDL created
2015-11-03 (first published: 2015-10-07)
991 reads
How to Paginate a query result set to keep from pulling the whole result set to the client side
2015-11-02 (first published: 2014-05-05)
3,730 reads
A set of queries which attempt to gather as much security-related information on a single database as possible.
2015-10-30 (first published: 2013-10-24)
5,746 reads
Provide list of Stored Procedures that have been changed in past 7 days.
2015-10-29 (first published: 2013-04-11)
3,598 reads
2015-10-27 (first published: 2014-07-08)
4,419 reads
2015-10-23 (first published: 2014-05-13)
3,750 reads
Calculating working hours can be painful due to all the variances that they imply. This function will calculate working hours between 2 dates which might include time. There's an option to use a holidays table that will vary in each environment.
2015-10-22 (first published: 2014-05-22)
3,756 reads
2015-10-21 (first published: 2013-12-26)
4,072 reads
Often when tracking down problems, you need to know if anything has changed recently, this script will tell you...
2015-10-20 (first published: 2013-05-30)
3,951 reads
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers