July 26, 2011 7:00 PM
Posted by: Colin Smith
T-SQLI was recently asked by one of the application teams to come up with a way to kill all spids associated with a particular application once a day. Well I am not a t-sql guru by any means so I took this as a challenge and for once I did not pull out powershell but decided to go with T-SQL. With power...
June 22, 2011 11:00 PM
Posted by: Colin Smith
DB Online,
T-SQLI was also asked to make sure that I have jobs set up on my servers that have database mirroring set up. They only want the job to run if the database is online and they do not want to have to enable and disable jobs when failovers occur. So I did the following.
October 30, 2010 12:00 PM
Posted by: Colin Smith
T-SQLToday I needed to delete 28 Million Rows from a table and I did not want to do it as one large statement because that would kill my log.
Here is what I did.
--Set your rows to deal with
DECLARE @intloop int
Select @intloop = count(*) from Table
where Column < Something
While @intloop...
September 16, 2009 4:37 PM
Posted by: Colin Smith
Education,
SQL,
T-SQL,
TrainingFound a nice article on some basic SQL. Check it out, it is never bad to have the knowledge even if you are not a DBA or SQL Developer.
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1368296,00.html?track=sy41