adminbd

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

Have a Question?

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

Как посмотреть файл трассировки в самом sql

SELECT top 50 *
FROM fn_trace_gettable(N'\\192.168.0.38\Backup\Trace_sql_serverov\ho_report\TracE20150822            000000.trc',DEFAULT)
where CONVERT(CHAR(8),StartTime,8) BETWEEN '09:00:00' and '23:00:00'
and not ApplicationName in ('NULL','Symantec Backup Exec™ for Windows Servers')
AND ApplicationName NOT LIKE  ('SQLAgent - TSQL%')
AND ApplicationName NOT LIKE  ('DatabaseMail%')
AND textdata not LIKE  ('RESTORE%')
ORDER BY duration  DESC
SELECT *

FROM fn_trace_gettable(N'C:\TraceFiles\LongRunningQueries.trc',DEFAULT);

 

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>