다음을 통해 공유


ScriptingOptions.TargetServerVersion 속성

Gets or sets the version of the instance of SQL Server for which the generated script is intended.

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

구문

‘선언
Public Property TargetServerVersion As SqlServerVersion 
    Get 
    Set
‘사용 방법
Dim instance As ScriptingOptions 
Dim value As SqlServerVersion 

value = instance.TargetServerVersion

instance.TargetServerVersion = value
public SqlServerVersion TargetServerVersion { get; set; }
public:
property SqlServerVersion TargetServerVersion {
    SqlServerVersion get ();
    void set (SqlServerVersion value);
}
member TargetServerVersion : SqlServerVersion with get, set
function get TargetServerVersion () : SqlServerVersion 
function set TargetServerVersion (value : SqlServerVersion)

속성 값

유형: Microsoft.SqlServer.Management.Smo.SqlServerVersion
A SqlServerVersion object value that specifies the version of the instance of SQL Server.

주의

The default value of this property is Version80.

The following code example specifies that the script owner will be listed in the generated script.

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.TargetServerVersion = SqlServerVersion.Version100

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.TargetServerVersion = [Microsoft.SqlServer.Management.Smo.SqlServerVersion]::Version100

참고 항목

참조

ScriptingOptions 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스

관련 자료

스크립팅