Scripting Objects

The most common argument I hear against EM is that creating objects through a GUI as opposed to script-based management means you don't have a saved script to re-create the object if required. Fortunately, EM allows you to create and save a script to create a single object such as a view or all objects within a particular database. To create a script, select the object, right-click, and from the All Tasks menu, select Generate SQL Script. This will open the Generate SQL Scripts dialog box, as shown in Figure 4.29.

Figure 4.29. The Generate SQL Scripts dialog box.

The Preview button allows you to see the format of the script, as ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.