Finding Duplicate Records In Database Writer #1, 2016-03-19 SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK) FROM TABLE_NAME GROUP BY COL_TO_CHECK HAVING COUNT(COL_TO_CHECK) > 1 If there is… Continue Reading
SQL Server – Find Stored Procedures User Can Access Writer #1, 2016-03-19 Returns a report that has information about user permissions for an object, or statement permissions,… Continue Reading
SQL Server – Email Results of Stored Procedure Conditionally Writer #1, 2016-03-19 Within a Stored Procedure, you may want the results of a particular query emailed to… Continue Reading
SQL Server Profiler New Templates Failing Writer #1, 2016-03-19 Source of info: http://www.mattbutton.com/2011/06/01/sql-profiler-templates-missing/ Upon trying to create a trace template in SQL Server Profiler, I… Continue Reading
TSQL – Simple Loop Through Result Set Using Cursor Writer #1, 2016-03-19 This is the basic query text to use whenever you need to loop through a… Continue Reading
Rolling Back Dynamic SQL Writer #1, 2016-03-19 Do transactions apply in dynamic SQL, in SQL Server? In a word, yes. For proof,… Continue Reading
SQL Server – Download all RDL files from Report Server Writer #1, 2016-03-18 —- Allow advanced options to be changed. –EXEC sp_configure ‘show advanced options’, 1 –GO —-… Continue Reading
PowerShell – Get SQL Server Info Writer #1, 2016-03-18 $assemblylist = “Microsoft.SqlServer.Management.Common”, “Microsoft.SqlServer.Smo”, “Microsoft.SqlServer.Dmf “, “Microsoft.SqlServer.Instapi “, “Microsoft.SqlServer.SqlWmiManagement “, “Microsoft.SqlServer.ConnectionInfo “, “Microsoft.SqlServer.SmoExtended “, “Microsoft.SqlServer.SqlTDiagM… Continue Reading
SQL Server – Rolling Back Dynamic SQL Writer #1, 2013-06-18 Do transactions apply in dynamic SQL, in SQL Server? In a word, yes. For proof,… Continue Reading
TSQL – Simple Loop Through Result Set Using Cursor Writer #1, 2013-02-012024-09-02 (If you want to AVOID cursors, see: TSQL – Loop Through Result Set WITHOUT Cursors) This… Continue Reading