Home » Posts tagged 'TSQL' (Page 5)

Tag Archives: TSQL

Procedure xp_cmdshell expects parameter ‘command_string’ of type ‘varchar’.

You can’t use varchar(max) with xp_cmdshell. Try a finite number (0 to 8000). varchar(max) is having capacity of 2GB & works as TEXT data type in background.

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

%d bloggers like this: