The Google gods seem to like a very old page of mine about using Cursors in T-SQL. So, from time to time I get commnets via email. Thought I would share an alternative to using cursors.
Tag Archives: tempdb
T-SQL Using Parameter Table like a Cursor
Posted by JackDonnell
on February 3, 2010
Comments Off on T-SQL Using Parameter Table like a Cursor
T-SQL – Change SQL Job Owners to SA
Posted by JackDonnell
on December 24, 2008
Comments Off on T-SQL – Change SQL Job Owners to SA
I’m a sucker for the Maint Wizards and everytime I touch a SQL Job.. It reverts the ownership to my domain account. ( Not a Good Practice to use my domain account … I know). I manually change the ownership back to sa (actually, dbo as sa is disabled…ssssh) . OR I CAN USE THE BELOW HANDY-DANDY SCRIPT . As always .. Buyer-Beware! Written for SQL Server 2005..
Here is a script I wrote to do the heavy lifting: