DacServices.GenerateDeployScript 메서드 (DacPackage, String, DacDeployOptions, Nullable<CancellationToken>)
Creates a Transact-SQL script that can be used to deploy the schema of the supplied DacPackage to a database.
네임스페이스: Microsoft.SqlServer.Dac
어셈블리: Microsoft.SqlServer.Dac(Microsoft.SqlServer.Dac.dll)
구문
‘선언
Public Function GenerateDeployScript ( _
package As DacPackage, _
targetDatabaseName As String, _
options As DacDeployOptions, _
cancellationToken As Nullable(Of CancellationToken) _
) As String
‘사용 방법
Dim instance As DacServices
Dim package As DacPackage
Dim targetDatabaseName As String
Dim options As DacDeployOptions
Dim cancellationToken As Nullable(Of CancellationToken)
Dim returnValue As String
returnValue = instance.GenerateDeployScript(package, _
targetDatabaseName, options, cancellationToken)
public string GenerateDeployScript(
DacPackage package,
string targetDatabaseName,
DacDeployOptions options,
Nullable<CancellationToken> cancellationToken
)
public:
String^ GenerateDeployScript(
DacPackage^ package,
String^ targetDatabaseName,
DacDeployOptions^ options,
Nullable<CancellationToken> cancellationToken
)
member GenerateDeployScript :
package:DacPackage *
targetDatabaseName:string *
options:DacDeployOptions *
cancellationToken:Nullable<CancellationToken> -> string
public function GenerateDeployScript(
package : DacPackage,
targetDatabaseName : String,
options : DacDeployOptions,
cancellationToken : Nullable<CancellationToken>
) : String
매개 변수
- package
유형: Microsoft.SqlServer.Dac.DacPackage
DacPackage containing schema to be deployed.
- targetDatabaseName
유형: System.String
Name of the target database for deployment.
- options
유형: Microsoft.SqlServer.Dac.DacDeployOptions
Instance of DacDeployOptions that specifies properties that affect various aspects of the deployment script creation.
- cancellationToken
유형: System.Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
반환 값
유형: System.String
String of Transact-SQL script used to create or update database schema based on the supplied DacPackage.
예외
예외 | 조건 |
---|---|
DacServicesException | If a problem occurs during script generation. |
OperationCanceledException |