Capturing SQL statements from files

You can capture SQL statements from text-based files.

Before you begin

Procedure

To capture an SQL statement that is in a text-based file:

  1. In the Data Source Explorer, right-click the database or subsystem that the SQL statements in a file run against.
  2. Select Query Tuner > Start Tuning. The Capture section of the workflow assistant for query tuning opens to the Capture SQL from File page.
  3. Browse for the file that contains the statement.
  4. Specify the character set and the statement delimiter.
  5. click Capture. The content of the file appears in the table in the Captured Statements section. The content is not parsed, so all content in the file before the first statement delimiter appears on one line in the table. All content in the file until the second statement delimiter appears as the next line in the table, and so on.
  6. Right-click the statement and select Invoke Advisors and Tools. The workflow assistant for query tuning opens to the Run Single-Query Advisors and Analysis Tools page of the Invoke section. The statement appears in the Query Text field. For help with this page, click the Help icon (Help), or click in a portion of the page and type F1.

Feedback