Scripting Tab, Options Dialog Box

SQL Query Analyzer Help

SQL Query Analyzer Help

Scripting Tab, Options Dialog Box

In the object browser, you can script the creation of objects. Use the Scripting tab on the Options dialog box to set scripting options and tailor scripted output. Available options include:

Script Formatting Options

Include descriptive headers in the script.

Adds a /*...*/ delimited comment to the scripted output. The comment includes the full name of the object, and the creation time of the script.

Prefix the script with a check for existence. When script is executed, component is created only if it does not exist.

Adds statements to the script that check for the object's existence. If the object exists, the script does not attempt to create it.

Identifier delimiter

Allows you to tailor the format of scripted identifiers for compatibility with Microsoft® SQL Server™ version 6.5, SQL Server 7.0 or SQL Server 2000. Options include:

  • Version dependent defaults

  • None

  • [] -- 7.0 compatible quoted identifier

  • "" -- 6.5 compatible quoted identifier

Do not use a command terminator.

Omits the 'GO' terminator from scripted output. If this option is not selected, each Transact-SQL statement will be terminated with a 'GO' command.

Only script 7.0 compatible features.

Only include SQL Server version 7.0 compatible options in scripted output.

Do not script the collation clause if source is an instance of SQL Server version 7.0 or later.

Do not script the collation clause if source is an instance of SQL Server version 7.0 or later.

Generate Transact-SQL to remove referenced component. Script tests for existence prior to attempt to remove component.

Adds statements to the script that test for existence of the component and conditionally remove the component before re-creating it.

Include extended property scripting as part of object scripting.

If the object has extended properties associated with it, the appropriate calls to sp_addextendedproperty will be appended to the end of the script to restore any previously associated extended properties.

Do not include 'ON <filegroup>' clause directing filegroup use.

Do not include 'ON <filegroup>' clause directing filegroup use.

Script object-level permissions.

Adds statements to the script that restores any special privileges associated with the object.

Table Scripting Options

Qualify object name by its owner.

Adds current owner name to object name syntax. (for example, syscomments becomes dbo.syscomments).

Convert specification of user-defined data types to the appropriate SQL Server base data type.

Converts user-defined data types to the SQL Server supplied data types (for example, decimal, int, char, varchar) on which the user-defined data types are based.

Do not include any clauses defining declarative referential integrity constraints.

Do not include any clauses defining declarative referential integrity constraints in the scripted output.

Do not include definition of identity property, seed, and increment.

Removes the IDENTITY property from column definitions in the table creation command. For more information, see IDENTITY (Property).

Generate SET ANSI_PADDING ON and SET ANSI_PADDING OFF statements before CREATE TABLE statements.

Prefixes the table creation command with a SET ANSI_PADDING statement. For more information, see SET ANSI_PADDING.