Showing posts with label trace. Show all posts
Showing posts with label trace. Show all posts

Tuesday, September 23, 2014

Script to Load SQL Profiler trace file data into a table in SQL Server

SELECT *
FROM fn_get_audit_file('E:\Microsoft SQL Server\SQL Server Auditing\Audit-20120828-143913_CDE79597-4A8E-4C51-ACBB-35C0F8278C85_0_129906638124380000.sqlaudit', DEFAULT, DEFAULT)

Monday, August 13, 2012

T-SQL Script to load the trace file to a database table

T-SQL to load the trace file to a database table:


USE pubs
GO

SELECT *
INTO trace_table
FROM::fn_trace_gettable('c:\my_trace.trc', DEFAULT)