DBUser Roles Script
This script will be used to script out the users and their permissions at the database level. We can use this when we are replacing /overrighting the existing database.
2011-12-28 (first published: 2011-11-22)
1,825 reads
This script will be used to script out the users and their permissions at the database level. We can use this when we are replacing /overrighting the existing database.
2011-12-28 (first published: 2011-11-22)
1,825 reads
This script can be used to generate alter column length of any string data type column(s) in a database.
2011-12-27 (first published: 2011-11-22)
1,270 reads
This script can be used to return a csv column such emails in separate rows
2011-12-26 (first published: 2011-09-14)
1,563 reads
These scripts give you the list of logins created in the Last X Days for SQL Server 2000 or 2005.
2011-12-23 (first published: 2008-06-08)
2,369 reads
These scripts were generated to standardize our SQL backup environments, and to remove backups from Maintenance Plans.
2011-12-22 (first published: 2008-01-29)
3,474 reads
A Sudoku solution with set based T-SQL approach utilizing binary values and operators, to ease the algorithm.
2011-12-21 (first published: 2008-04-30)
4,232 reads
This script will find foreign keys (on referencing table) that are not indexed in SQL Server 2005.
2011-12-20 (first published: 2007-08-10)
3,772 reads
Best way to monitor Excel, Access, SQL Linked Servers from SQL 2005
2011-12-19 (first published: 2008-06-03)
3,330 reads
2011-12-16 (first published: 2007-12-27)
4,113 reads
Named or default instance, this will check info like Virtual Server Name, Cluster Name , Current owner, Preferred Owner? and? Status? (if clustered) and IP/Port for the current instance.
2011-12-15 (first published: 2007-10-11)
3,607 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