Find tables unused since last SQL Server restart
This script will return tables that haven't had any user activity since the SQL Server Service was last restarted. SQL 2005+
2011-07-22 (first published: 2010-01-28)
5,544 reads
This script will return tables that haven't had any user activity since the SQL Server Service was last restarted. SQL 2005+
2011-07-22 (first published: 2010-01-28)
5,544 reads
This script is used to disconnect all connections by a particular individual to a server. I use it when I have to disconnect somebody and they have too many processes to do it by hand. Normally, you can just connect the offending process, but if there are multiple processes that are causing a problem , […]
2004-03-08
2,606 reads
I presented at SQL Saturday Pittshburgh this past weekend about populating your data warehouse...
By Steve Jones
A customer was asking recently about the RPO for their estate, and I showed...
By Steve Jones
I’m hosting a webinar tomorrow with Rie Merritt from Microsoft. We’ll be talking about...
Hey all, Just wondering how do you guys / girls set up git repo(s)...
hi everyone I am planning on adding a composite key for my tables. I...
We have a Production/Live version with up-to-date data and a Test version with older...
CREATE TABLE t0 ( id INT PRIMARY KEY , field1 VARCHAR(1000) , field2 VARCHAR(MAX)); INSERT INTO t0 SELECT gs.value , REPLICATE ('X', 1000) , REPLICATE ('Y', 1000) FROM generate_series(1, 10, 1) gs; GO
select STRING_AGG(field1, ';') within group (order by id) from t0;
select STRING_AGG(field2, ';') within group (order by id) from t0;