How to generate a script (Enterprise Manager)

How to generate a script (Enterprise Manager)

To generate a script

  1. Expand a server group, and then expand a server.
  2. Expand Databases, right-click the database to script, point to All Tasks, and then click Generate SQL Scripts.
  3. On the General tab, select the database objects to script. By default, all objects in the database are scripted.
  4. On the Formatting tab, select from the script formatting options:
    • Generate the CREATE <object> command for each object so that each object to be scripted is explicitly created using its existing definition. This is selected by default.
    • Generate the DROP <object> command for each object so that a DROP statement is added to the script for each object to be scripted. This is selected by default. 

      Caution  When executed, this causes any existing objects in the database (where the script is executed with the same name as objects listed in the script) to be deleted first.

    • Generate scripts for all dependent objects so that all objects in the database which are needed to create the objects listed in the script are included automatically in the script if not already selected.
    • Include descriptive headers in the script files so that a comment is added to the file for each object listed in the script.
  5. On the Options tab, select the security-related, table-related, and script file-related options.
  6. On the General tab, click Preview to view a preview of the generated script.

 

 

Thanks

 

Prashant Deshpande

Advertisements

Leave a comment

Filed under Database Server, SQL Server, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s