ScriptingOptions.SetTargetServerVersion 메서드
Sets the version of the instance of SQL Server on which the scripting operation is run.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
Public Sub SetTargetServerVersion ( _
ver As ServerVersion _
)
‘사용 방법
Dim instance As ScriptingOptions
Dim ver As ServerVersion
instance.SetTargetServerVersion(ver)
public void SetTargetServerVersion(
ServerVersion ver
)
public:
void SetTargetServerVersion(
ServerVersion^ ver
)
member SetTargetServerVersion :
ver:ServerVersion -> unit
public function SetTargetServerVersion(
ver : ServerVersion
)
매개 변수
- ver
유형: Microsoft.SqlServer.Management.Common.ServerVersion
A ServerVersion object value that specifies the version of the instance of SQL Server.
예
The following code example sets the version number of the server upon which the script will run.
Visual Basic
Dim scOps As New ScriptingOptions()
Dim sVersion As New ServerVersion(2, 0)
scOps.SetTargetServerVersion(sVersion)
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$sVersion = New-Object Microsoft.SqlServer.Management.Common.ServerVersion(2,0)
$scOps.SetTargetServerVersion($sVersion)
참고 항목
참조
Microsoft.SqlServer.Management.Smo 네임스페이스