View Active Session SQL
This script can be used to view current SQL statements being executed for all or any one SPID.
2014-01-06 (first published: 2012-01-26)
4,318 reads
This script can be used to view current SQL statements being executed for all or any one SPID.
2014-01-06 (first published: 2012-01-26)
4,318 reads
A view that presents Schema, Table, Fields and Data Types, Defaults and First 10 triggers for the table.
2014-01-03 (first published: 2013-12-10)
1,746 reads
Generates a list of ALL Users and their database Roles for all Databases (Or for a specific user).
2013-12-30 (first published: 2008-07-24)
45,338 reads
Get space for all user defined table information like size and row counts.
2013-12-27 (first published: 2007-08-29)
7,718 reads
Row counts and storage space information for all tables in the database. (SQL Server 2005).
2013-12-26 (first published: 2008-03-16)
17,060 reads
For any supplied table, my proc, usp_TableToClass, generates class code in C#, including fields, properties, getters and setters.
2013-12-24 (first published: 2007-11-06)
12,548 reads
2013-12-19 (first published: 2007-08-27)
20,902 reads
Manual SP to Index Defrag a SQL 2000 database on SQL 2005 that run at spesific times at night
2013-12-17 (first published: 2008-05-07)
3,687 reads
Using powershell to create different sql scripts in different files.
2013-12-13 (first published: 2012-04-19)
2,939 reads
We are using sp_help_revlogin to make login script, but it doesn't enable the login which has sysadmin role. It is very common problem during server migration. We use the this technique to solve the issue.
2013-12-09 (first published: 2013-11-29)
1,041 reads
A RAG pipeline that answers questions in the demo is not the same thing...
By Steve Jones
“A multitude of bad ideas is necessary for one good idea” – from Excellent...
Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...
Comments posted to this topic are about the item Adding new column with DEFAULT
I've got a web application for my side business. I've added a SQL Server...
Comments posted to this topic are about the item Looking for New Blood
Which number will the COUNT() return after executing the following statements:
DROP TABLE IF EXISTS #test; CREATE TABLE #test (id INT) INSERT INTO #test (id) SELECT * FROM GENERATE_SERIES(1, 3) AS gs ; ALTER TABLE #test ADD flag BIT CONSTRAINT DF_#test_flag DEFAULT 0; go UPDATE #test SET flag = 0 WHERE id = 1 UPDATE #test SET flag = 1 WHERE id = 2 INSERT INTO #test (id) VALUES (4) SELECT COUNT(*) FROM #test AS t WHERE flag = 0See possible answers