Problem
With the SQL Server Management suite You can do anything you can do with T-SQL commands. One problem with using a graphical user interface is that it's hard to remember all the things you clicked to perform again. Another problem is that most of the things you do through the graphical user interface are executed immediately, which is not always the best. So how do you capture what SQL Server is doing so that I can then rerun the action or run these commands?
Expert answers
Another newly added feature of the SQL Server Management suite is to generate most commands and actions you can do through the graphical user interface. Let's take a database backup as an example.
Suppose we need to back up the AdventureWorks database, but we don't want to run the backup immediately, we just want to generate this code. One way to do this is to have the graphical user interface generate this code.
Let the graphical user interface generate scripts
The first thing we need to do is step through the graphical user interface to create a backup. So we just right-click the database name and select Tasks-> back up. After that, we see the interface shown below:
These are the parameters that we set on the General tab page.