2011-06-13 (first published: 2008-04-19)
5,862 reads
2011-06-13 (first published: 2008-04-19)
5,862 reads
A stored procedure for restoring a database up to the latest log backup from a file folder. Compatible with the backups made by standard SQL maintenance plan.
2011-06-10 (first published: 2011-05-27)
1,589 reads
When creating a backup that will be restored to a development database, you may need to mask PII information. This script will help you with that.
2011-06-09 (first published: 2011-05-25)
1,471 reads
Easily remove duplicate records without temp tables by using a CTE.
2011-06-07 (first published: 2008-03-19)
6,945 reads
2011-06-03 (first published: 2008-08-18)
1,109 reads
2011-06-02 (first published: 2008-04-24)
9,302 reads
2011-06-01 (first published: 2007-09-02)
10,489 reads
2011-05-30 (first published: 2011-05-23)
2,428 reads
Script generator to restore to a new DB. Designed on Ola Hallengren's backup solution.
2011-05-27 (first published: 2011-05-20)
968 reads
This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).
2011-05-25 (first published: 2008-03-05)
10,199 reads
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...
By Steve Jones
Software is hard. While I love our Lucid Gravity, I realize that they are...
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