To generate the T-SQL command generated by the SQL Server Management Suite

Source: Internet
Author: User
Tags what sql sql server management backup

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.