Generate SQL Scripts (Options Tab)
Use this tab to generate Transact-SQL statements that further refine the creation of objects on a database. You can specify security, table creation, and file saving options.
Options
Script database
Generate a Transact-SQL statement to create a script of the existing database schema.
Script database users and database roles
Generate a Transact-SQL statement to create all users and roles that have access to the database.
Script SQL Server logins (Windows NT and SQL Server logins)
Generate a Transact-SQL statement to create all logins that currently have access to the server.
Script object-level permissions
Generate a Transact-SQL statement to create all grant, revoke, and deny permissions that currently exist for each object selected on the General tab.
Script indexes
Generate a Transact-SQL statement to create indexes that currently exist for any selected tables. This option is useful only if one or more tables are selected on the General tab.
Script full-text indexes
Generate a Transact-SQL statement to create full-text indexes. This option is useful only if one or more tables are selected on the General tab.
Script triggers
Generate a Transact-SQL statement to create triggers that exist for any selected tables. This option is useful only if one or more tables are selected on the General tab.
Script PRIMARY keys, FOREIGN keys, defaults, and check constraints
Generate a Transact-SQL statement to create PRIMARY keys, FOREIGN keys, defaults, and check constraints that exist for any selected tables. This option is useful only if one or more tables are selected on the General tab.
MS-DOS text (OEM)
Save the Transact-SQL script in the format of the current Microsoft® Windows® system code page. Select this option if you will use the script in a batch operation and execute it from the command prompt using a console application such as Isql.exe.
Windows text (ANSI)
Save the Transact-SQL script in ANSI format. Select this option if the script will be used in SQL Query Analyzer or another Windows application.
International text (Unicode)
Save the Transact-SQL script in Unicode format. Select this option if the script uses special international characters that are supported only in the Unicode font. This format requires two times the disk space of either the current Windows code page or ANSI.
Create one file
Save one file that includes all Transact-SQL statements for every object you have selected.
Create one file per object
Save one file for each distinct object you have selected.