2010-11-18 (first published: 2009-07-20)
2,970 reads
2010-11-18 (first published: 2009-07-20)
2,970 reads
Stored procedure to provide clean output of system name and uptime since last restart
2010-11-16 (first published: 2010-11-08)
1,268 reads
Script will display current status of SQL server services and even show if not installed. Works on SQL 2005,2008 2008R2. Both 32 and 64 bit servers.
2010-11-15 (first published: 2010-11-09)
3,622 reads
In the last script, we covered removing the trailing partition in a Range Right, date valued partition. This script adds a new (empty) partition to the partition scheme.
2010-11-12 (first published: 2009-12-17)
1,084 reads
This script automatically splits a partitioned table, merges the partition function and then drops the associated file group for the partition.
2010-11-11 (first published: 2009-12-17)
2,241 reads
This script will help you transfer logins between one instance of SQL and another.
2010-11-08 (first published: 2010-01-07)
4,629 reads
Days, hours and minutes since SQL Server service was started
2010-11-05 (first published: 2010-01-15)
2,514 reads
This script may help identify tables impacted by frequently-occurring scans.
2010-11-02 (first published: 2010-02-04)
3,906 reads
This is simple script to change string to title case. It will take string in any case and convert it to initcap.
2010-10-26 (first published: 2010-10-19)
1,545 reads
Create a data dictionary with two stored procedures using sys objects to view via SSRS (or other reporting tool) report
2010-10-21 (first published: 2010-10-16)
2,275 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