Monthly Archives: February 2011

T-SQL Script to Backup All Databases in an Instance

/* This script make full backups of all user databases and three system databases in a specific instance. All backup files will named as “db_name_current_date.bak”. Watch out that you have to set up the correct backup directory in the @path … Continue reading

Posted in T-SQL Script | Leave a comment

Remove Full Duplicates by Using row_number() Function and Common Table Expression

This blog article is inspired by another very informative one¬†which explains really well the meaning of the new row_number() function introduced since SQL2005. Since the original article did not give a full answer to how to delete multiple fully duplicated … Continue reading

Posted in Common Table Expression, T-SQL Script | Tagged , , , | Leave a comment

Script that fixes the “sql server agent service won’t start” problem

/* This script solves the “sql server angent service won’t start” problem. Usually if you are pretty sure that the service account running sqlserveragent has sufficient rights and this service still refuses to start up, it is most of the … Continue reading

Posted in T-SQL Script | Leave a comment

Shortcuts to Microsoft MMC Snap-In’s

Certificates certmgr.msc Indexing Service ciadv.msc Computer Management compmgmt.msc Device Manager devmgmt.msc Disk Defragmenter dfrg.msc Disk Management diskmgmt.msc Event Viewer eventvwr.msc Shared Folders fsmgmt.msc Group Policy gpedit.msc Local Users and Groups lusrmgr.msc Removable Storage ntmsmgr.msc Removable Storage OperatorRequests ntmsoprq.msc Performance perfmon.msc … Continue reading

Posted in SQL Server | Leave a comment

T-SQL Script that Collects Version, Edition, sp, Authentication and Collation Info

/* This script collects version, edition, sp, authentication and collation info from the whole list of instances in the central management servers Author: Ning Xu Last Modified Date: 2014-01-21 Applied version: 2000, 2005, 2008, 2008 R2, 2012 */ select (case … Continue reading

Posted in T-SQL Script | Leave a comment