Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.54 KB

File metadata and controls

31 lines (22 loc) · 1.54 KB
title Extract a Script from a Trace
titleSuffix SQL Server Profiler
description Learn how to extract Transact-SQL events from a trace file or table in SQL Server Profiler and save them as a Transact-SQL script file.
author rwestMSFT
ms.author randolphwest
ms.date 06/05/2025
ms.service sql
ms.subservice profiler
ms.topic how-to
ms.collection
data-tools

Extract a script from a trace (SQL Server Profiler)

[!INCLUDE SQL Server Azure SQL Managed Instance]

This article describes how to extract [!INCLUDE tsql] events from a trace file or table and save them as a [!INCLUDE tsql] script file by using [!INCLUDE ssSqlProfiler].

Extract a Transact-SQL script from a trace file or table

  1. Open a trace file or table that contains [!INCLUDE tsql] events that you want to save to a [!INCLUDE tsql] script file. For more information, see Open a trace file (SQL Server Profiler) or Open a trace table (SQL Server Profiler).

  2. On the File menu, point to Export, point to Extract SQL Server Events, and then select Extract Transact-SQL Events.

  3. In the Save As dialog box, type a name for the [!INCLUDE tsql] file, and select Save.

Related content