How to create an SQL script (SQL Server Profiler)

To create a script

  1. On the File menu, click New, and then click SQL Script.
  2. Type the Transact-SQL script in the edit (lower) pane.

    As you type, an event class is generated in the upper pane.


    Note To replay a Transact-SQL script, the first Transact-SQL statement must be USE database, where database is the name of the database against which the script is to run.


  3. On the Replay menu, click Start.
  4. In the Replay SQL Server dialog box, alter any necessary settings.
  5. Modify the Transact-SQL script in the lower pane, as necessary.
See Also

Creating and Replaying SQL Scripts

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.