문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

ScriptOption 클래스

The ScriptOption object represents the SQL Server script options that can be included in scripting options that are set by using the ScriptingOptions object.

System.Object
  Microsoft.SqlServer.Management.Smo.ScriptOption

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

public sealed class ScriptOption

ScriptOption 유형에서 다음 멤버를 표시합니다.

  이름설명
공용 속성정적 멤버AgentAlertJobGets an object that specifies whether to include SQL Server Agent alerts and jobs in the script. 
공용 속성정적 멤버AgentJobIdGets an object that specifies whether to include SQL Server Agent alerts and jobs in the script. 
공용 속성정적 멤버AgentNotifyGets an object that specifies whether to include notifications for any SQL Server Agent alerts that in the script. 
공용 속성정적 멤버AllowSystemObjectsGets an object that specifies whether system objects can be scripted or not.
공용 속성정적 멤버AnsiFileGets an object that specifies whether the script uses multibyte characters and requires code page 1252 to evaluate characters meaning.
공용 속성정적 멤버AnsiPaddingGets an object that specifies whether the generated script contains the Transact-SQL statements SET ANSI-PADDING ON and SET ANSI-PADDING OFF before and after the CREATE TABLE statement, respectively.
공용 속성정적 멤버AppendToFileGets an object that specifies whether the script is appended to the end of the output file or overwrites it.
공용 속성정적 멤버BindingsGets an object that specifies whether the binding statements sp_binddefault and sp_bindrule are included in the generated script. This property applies only when scripting a Microsoft SQL Server table.
공용 속성정적 멤버ChangeTrackingGets the ChangeTracking property value.
공용 속성정적 멤버ClusteredIndexesGets an object that specifies whether statements that define clustered indexes are included in the generated script.
공용 속성정적 멤버ContinueScriptingOnErrorGets an object value that specifies whether the scripting operation continues after an error is encountered.
공용 속성정적 멤버ConvertUserDefinedDataTypesToBaseTypeGets an object value that specifies whether user-defined data types are converted to the most appropriate SQL Server base data types in the generated script. 
공용 속성정적 멤버DdlBodyOnlyGets an object value that specifies whether to script only the text definition for data definition language (DDL) objects that have a text body, such as stored procedures and triggers.
공용 속성정적 멤버DdlHeaderOnlyGets an object value that specifies whether to script only the header information for data definition language (DDL) objects that have a text body, such as stored procedures and triggers.
공용 속성정적 멤버DefaultGets an object value that specifies whether the creation of the referenced object is included in the generated script.
공용 속성정적 멤버DriAllGets an object value that specifies whether the DRI objects are included in the generated script.
공용 속성정적 멤버DriAllConstraintsGets an object value that specifies whether all DRI constraints are included in the generated script.
공용 속성정적 멤버DriAllKeysGets an object value that specifies whether all DRI keys (DriForeignKeys, DriPrimaryKey, DriUniqueKeys) are included in the generated script.
공용 속성정적 멤버DriChecksGets an object value that specifies whether column-specific dependency relationships defined in check constraints with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriClusteredGets an object value that specifies whether dependency relationships defined in clustered indexes with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriDefaultsGets an object value that specifies whether dependency relationships defined in defaults with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriForeignKeysGets an object value that specifies whether dependency relationships defined in foreign keys with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriIncludeSystemNamesGets an object value that specifies whether the system generated constraint names used to enforce declarative referential integrity are included in the script.
공용 속성정적 멤버DriIndexesGets an object value that specifies whether PRIMARY KEY constraints using a unique index to implement the declarative referential integrity are included in the generated script.
공용 속성정적 멤버DriNonClusteredGets an object value that specifies whether dependency relationships defined in non-clustered indexes with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriPrimaryKeyGets an object value that specifies whether dependency relationships defined in primary keys with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriUniqueKeysGets an object value that specifies whether dependency relationships defined in unique keys with enforced declarative referential integrity are included in the script.
공용 속성정적 멤버DriWithNoCheckGets an object value that specifies whether the no check statement is included in the script.
공용 속성정적 멤버EnforceScriptingOptionsGets an object value that specifies whether the application of all scripting options is enforced for text base objects, such as SchemaQualify.
공용 속성정적 멤버ExtendedPropertiesGets an object value that specifies whether extended object properties are included in the generated script.
공용 속성정적 멤버FullTextCatalogsGets an object value that specifies whether full-text catalogs are included in the generated script.
공용 속성정적 멤버FullTextIndexesGets an object value that specifies whether full-text indexes are included in the generated script.
공용 속성정적 멤버FullTextStopListsGets an object value that specifies whether full-text stop lists are included in the generated script.
공용 속성정적 멤버IncludeDatabaseContextGets an object value that specifies whether database content is included in the generated script.
공용 속성정적 멤버IncludeDatabaseRoleMembershipsGets the IncludeDatabaseRoleMemberships property value.
공용 속성정적 멤버IncludeFullTextCatalogRootPathGets the IncludeFullTextCatalogRootPath property value.
공용 속성정적 멤버IncludeHeadersGets an object that specifies whether the generated script is prefixed with a header containing information including the date and time of generation.
공용 속성정적 멤버IncludeIfNotExistsGets an object that specifies whether to check the existence of an object before including it in the script.
공용 속성정적 멤버IndexesGets an object that specifies whether indexes are included in the generated script.
공용 속성정적 멤버LoginSidGets or sets the Boolean property value that specifies whether the security identifiers are included for any scripted logins in the generated script.
공용 속성정적 멤버NoAssembliesGets an object that specifies whether assemblies are excluded from the generated script.
공용 속성정적 멤버NoCollationGets an object value that specifies whether to include the collection in the generated script if the server is running SQL Server 7.0 or later.
공용 속성정적 멤버NoCommandTerminatorGets an object value that specifies whether individual Transact-SQL statements are delimited in the generated script.
공용 속성정적 멤버NoExecuteAsGets an object value that specifies whether the EXECUTE AS options for stored procedures and user-defined functions are included in the script.
공용 속성정적 멤버NoFileGroupGets an object value that specifies whether to include the 'ON <filegroup>' clause in the generated script.
공용 속성정적 멤버NoFileStreamGets an object that specifies whether to include the FILESTREAM_ON clause when you create VarBinaryMax columns in the generated script.
공용 속성정적 멤버NoFileStreamColumnGets an object that specifies whether to include the FILESTREAM_ON clause when you create VarBinaryMax columns in the generated script.
공용 속성정적 멤버NoIdentitiesGets an object value that specifies whether definitions of identity property seed and increment are included in the generated script.
공용 속성정적 멤버NoIndexPartitioningSchemesGets an object value that specifies whether partition schemes for indexes are included in the generated script.
공용 속성정적 멤버NoMailProfileAccountsGets an object value that specifies whether mail accounts referenced by mail profiles are included in the generated script.
공용 속성정적 멤버NoMailProfilePrincipalsGets an object value that specifies whether principals referenced by mail profiles are excluded from the generated script.
공용 속성정적 멤버NonClusteredIndexesGets an object value that specifies whether non-clustered indexes are included in the generated script.
공용 속성정적 멤버NoTablePartitioningSchemesGets an object value that specifies whether partition schemes for tables are included in the generated script.
공용 속성정적 멤버NoVardecimalGets the NoVardecimal property value.
공용 속성정적 멤버NoViewColumnsGets an object value that specifies whether to include the specified columns for a view.
공용 속성정적 멤버NoXmlNamespacesGets an object value that specifies whether XML namespaces are included in the generated script.
공용 속성정적 멤버OptimizerDataGets an object value that specifies whether script optimizer data for the referenced objects are included in the generated script.
공용 속성정적 멤버PermissionsGets an object value that specifies whether to all permissions in the generated script.
공용 속성정적 멤버PrimaryObjectGets an object value that specifies whether the creation of the referenced object is included in the generated script.
공용 속성정적 멤버SchemaQualifyGets an object value that specifies whether the script contains object with no schema.
공용 속성정적 멤버SchemaQualifyForeignKeysReferencesGets an object value that specifies whether tables with no schema that are referenced by a foreign key are included in the generated script.
공용 속성정적 멤버ScriptBatchTerminatorGets the batch terminator of the script option.
공용 속성정적 멤버ScriptDataGets the ScriptData property value.
공용 속성정적 멤버ScriptDataCompressionGets an object value that specifies whether the creation of the referenced object is included in the generated script.
공용 속성정적 멤버ScriptOwnerGets an object value that specifies whether the creation of the referenced object is included in the generated script.
공용 속성정적 멤버ScriptSchemaGets the schema of the script option.
공용 속성정적 멤버StatisticsGets an object value that specifies whether statistics are generated for any table or view included in the generated script.
공용 속성정적 멤버TimestampToBinaryGets an object value that specifies whether to convert timestamp data types to a binary(8) data types when scripting the creation of a table or user defined data type.
공용 속성정적 멤버ToFileOnlyGets an object value that specifies whether to output to file only or to generate string output too.
공용 속성정적 멤버TriggersGets an object value that specifies whether to include the definition for triggers in the generated script.
공용 속성정적 멤버WithDependenciesGets an object value that specifies whether to include all dependent objects in the generated script.
공용 속성정적 멤버XmlIndexesGets an object value that specifies whether XML indexes are included in the generated script.
맨 위로 이동

  이름설명
공용 메서드정적 멤버AddAdds the two ScriptOption objects to create a ScriptOptions object.
공용 메서드정적 멤버BitwiseOrCombines two ScriptingOptions object using a Bitwise OR operation.
공용 메서드EqualsReturns a Boolean value that specifies if two ScriptOptions are equal. (Object.Equals(Object)을(를) 재정의함)
공용 메서드GetHashCodeReturns the hash code for this object. (Object.GetHashCode()을(를) 재정의함)
공용 메서드GetType (Object에서 상속됨)
공용 메서드ToStringReturns a string that represents the current object. (Object.ToString()을(를) 재정의함)
맨 위로 이동

  이름설명
공용 연산자정적 멤버AdditionCreates a set of scripting options by performing an addition operation on two ScriptOption objects.
공용 연산자정적 멤버BitwiseOrCreates a set of scripting options by performing a bitwise OR operation on two ScriptOption objects.
공용 연산자정적 멤버Implicit(ScriptOption to ScriptingOptions)Implicitly converts the specified ScriptOption to a ScriptingOptions object.
맨 위로 이동

The ScriptOption object contains a property for each type of SQL Server item that can be scripted. The actual set of items to be scripted is specified using the ScriptingOptions object.

Warning: Some script options cause the Transfer object to generate script that does not execute on the target server.

Thread Safety

이 유형의 모든 public static(Microsoft Visual Basic의 경우 공유) 멤버는 다중 스레드 작업을 수행하기에 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks2012 database.
Dim db As Database
db = srv.Databases("AdventureWorks2012")
'Define a Scripter object and set the required scripting options.
Dim scrp As Scripter
scrp = New Scripter(srv)
scrp.Options.ScriptDrops = False
scrp.Options.WithDependencies = True
'Iterate through the tables in database and script each one. Display the script.
'Note that the StringCollection type needs the System.Collections.Specialized namespace to be included.
Dim tb As Table
Dim smoObjects(1) As Urn
For Each tb In db.Tables
    smoObjects = New Urn(0) {}
    smoObjects(0) = tb.Urn
    If tb.IsSystemObject = False Then
        Dim sc As StringCollection
        sc = scrp.Script(smoObjects)
        Dim st As String
        For Each st In sc
            Console.WriteLine(st)
        Next
    End If
Next

이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

커뮤니티 추가 항목

추가
표시: