Home » SQL Tips & Tricks (Page 6)
Category Archives: SQL Tips & Tricks
Text information from RPC trace events not displayed in Profiler
In SQL Server 2005 and later, the information in the TextData column captured for the RPC:Starting and RPC:Completed events is also available in the BinaryData column. For performance reasons, it is more efficient to include the BinaryData column and omit the TextData column, when adding these events to the trace. If the BinaryData column is … Continue reading
How to Insert datetime with different Timezones
In SQL Server 2008, Microsoft has introduced a number of new date and time data types. One of these is the datetimeoffset data type. This data type includes an offset from UTC time as well as the datetime value and ensures that the datetime can be retrieved in UTC or a particular timezone based on … Continue reading
Query Execution Plan from XML to Graphical View
Convert Your SQL Server Query Execution Plan from XML to Graphical View 1) We can get queries execution plan from below query SELECT QS.*, CP.* FROM SYS.DM_EXEC_QUERY_STATS AS QS CROSS APPLY SYS.DM_EXEC_SQL_TEXT(SQL_HANDLE)AS ST CROSS APPLY SYS.DM_EXEC_QUERY_PLAN(PLAN_HANDLE) AS CP 2) Column query_plan is having execution plan in XML form 3) When we click hyperlink in query_plan … Continue reading