adminbd

Записи по mssql,oracle,windows и linux

Have a Question?

If you have any question you can ask below or enter what you are looking for!

xml в текст

SELECT [dd hh:mm:ss.mss]
      ,[session_id]
      --,sql_text
      ,CAST(sql_text AS nvarchar(max))
      ,[login_name]
      ,[wait_info]
      ,[CPU]
      ,[tempdb_allocations]
      ,[tempdb_current]
      ,[blocking_session_id]
      ,[blocked_session_count]
      ,[reads]
      ,[writes]
      ,[physical_reads]
      ,[used_memory]
      ,[status]
      ,[open_tran_count]
      ,[percent_complete]
      ,[host_name]
      ,[database_name]
      ,[program_name]
      ,[start_time]
      ,[login_time]
      ,[request_id]
      ,[collection_time]
  FROM [dbo].[www_AxaptaInfoBoardWhoIsActive]
  
WHERE
CAST([sql_text] AS nvarchar(max)) LIKE ('%UPDATE %') and
          CAST([sql_text] AS nvarchar(max)) LIKE ('%InventTable%') AND
--sql_text  LIKE ('%InventTable%') AND
 datepart(YEAR,start_time) BETWEEN 2015 AND 2015 and
                    datepart(month,start_time) BETWEEN 11 AND 11 and
                    datepart(day,start_time) BETWEEN 17 AND 18  AND
          --DATEPART(hour,start_time) BETWEEN 13 AND 23 AND
          database_name IN ('ax_molniya') 
ORDER BY start_time

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>