The ScriptType and Script2Type properties configure the Transact-SQL script generated and used to copy database schema in a transfer of schema from one database to another.
object.Script2Type [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | Long integer specifying script generation options as described in Settings |
Constant | Value | Description |
---|---|---|
SQLDMOScript2_AgentAlertJob | 2048 | Generate Transact-SQL script creating SQL Server Agent jobs and alerts. |
SQLDMOScript2_AgentNotify | 1024 | When scripting an alert, generate script creating notifications for the alert. |
SQLDMOScript2_AnsiFile | 2 | Generated script file uses multibyte characters. Code page 1252 is used to determine character meaning. |
SQLDMOScript2_AnsiPadding | 1 | Generate Transact-SQL SET ANSI_PADDING ON and SET ANSI_PADDDING OFF statements before and after CREATE TABLE statements in the generated script. Applies only when scripting references a Microsoft® SQL Server™ table. |
SQLDMOScript2_Default | 0 | No scripting options specified. |
SQLDMOScript2_EncryptPWD | 128 | Encrypt passwords with script. When specified, SQLDMOScript2_ UnicodeFile must be specified as well. Applies only when scripting references SQL Server login records. |
SQLDMOScript2_FullTextCat | 2097152 | Command batch includes Transact-SQL statements creating Microsoft Search full-text catalogs. |
SQLDMOScript2_FullTextIndex | 4096 | Generated script includes statements defining Microsoft Search full-text indexing. Applies only when scripting references a SQL Server table. |
SQLDMOScript2_LoginSID | 1048576 | Include security identifiers for login scripted. |
SQLDMOScript2_NoFG | 16 | Generated script does not include ‘ON <filegroup>‘ clause directing filegroup use. Applies only when scripting references a SQL Server table. |
SQLDMOScript2_NoWhatIfIndexes | 512 | Do not script hypothetical indexes used to implement the CREATE STATISTICS statement. Applies only when scripting references a SQL Server table. |
SQLDMOScript2_UnicodeFile | 4 | Generated script output file is a Unicode-character text file. |
Use the AddObject and AddObjectByName methods of the Transfer object to build a list of SQL Server components copied from one database to another. With the list built, configure component transfer using the ScriptType and Script2Type properties.
Long, enumerated.
Read/write
HRESULT GetScript2Type(SQLDMO_SCRIPT2_TYPE* pRetVal);
HRESULT SetScript2Type(SQLDMO_SCRIPT2_TYPE NewValue);
AddObject Method | ScriptType Property |
AddObjectByName Method |