top of page

SQL Server Profiler Trace

Writer's picture: Kunal RanpuraKunal Ranpura

--Import multiple trace file in sql Table.


--All the rollover files will be automatically imported

--provide number tracefile to capture all the rollver trace file details


SELECT * INTO temp_trc

FROM fn_trace_gettable('\\servername\trace_upgrade2022\dbname\tracefilename.trc', 153);

GO

--verify all the data is imported

select max (EndTime) from temp_trc

go

select min (EndTime) from temp_trc

--Import data in final table to review

SELECT DISTINCT NTUserName, HostName, LoginName, ServerName, ObjectName, DatabaseName, SessionLoginName

Into final_tablename

FROM temp_trc;


1 view0 comments

Recent Posts

See All

Find All Primary Key in SQL Server

select schema_name(tab.schema_id) as [schema_name], pk.[name] as pk_name, substring(column_names, 1, len(column_names)-1) as [columns],...

SQL Server find Database User Permission

--Execute the following script against the User Database where you need to find DB User permission. DECLARE @sql VARCHAR(2048) ,@sort INT...

SQL Server Snapshot Isolation

--Script to verify snapshot isolation enabled SELECT name , s.snapshot_isolation_state , snapshot_isolation_state_desc ,...

Comments


bottom of page