by Ray Rankins and Bennett McEwan
IN THIS CHAPTER
The SQL Debugger
SQL Enterprise Manager (SQL EM) is a fine tool for creating and managing databases and database objects, as well as managing and monitoring SQL Server. However, there are times when you'll want to write and execute SQL directly. For example, SQL EM provides the ability to create and modify stored procedures, triggers, functions, and views from within the database browser, but the editor window it provides is very simplistic?no search/replace capability, no ability to save or open a file from within the editor, and no way to execute and test your SQL code.
Fortunately, Microsoft provides SQL Query Analyzer. The name of SQL Query Analyzer is actually somewhat misleading. While one of its capabilities is the analysis of your queries, it also provides a number of features that really make it a tool for full-featured Transact-SQL development and interactive query execution. In this chapter, we'll take a look at the capabilities of Query Analyzer, including the ability to debug stored procedures, triggers, and functions.