다음을 통해 공유


DacServices.ImportBacpac 메서드 (BacPackage, String, Nullable<CancellationToken>)

Deploys schema and import table data from the supplied package to a database.

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

구문

‘선언
Public Sub ImportBacpac ( _
    package As BacPackage, _
    targetDatabaseName As String, _
    cancellationToken As Nullable(Of CancellationToken) _
)
‘사용 방법
Dim instance As DacServices 
Dim package As BacPackage 
Dim targetDatabaseName As String 
Dim cancellationToken As Nullable(Of CancellationToken)

instance.ImportBacpac(package, targetDatabaseName, _
    cancellationToken)
public void ImportBacpac(
    BacPackage package,
    string targetDatabaseName,
    Nullable<CancellationToken> cancellationToken
)
public:
void ImportBacpac(
    BacPackage^ package, 
    String^ targetDatabaseName, 
    Nullable<CancellationToken> cancellationToken
)
member ImportBacpac : 
        package:BacPackage * 
        targetDatabaseName:string * 
        cancellationToken:Nullable<CancellationToken> -> unit
public function ImportBacpac(
    package : BacPackage, 
    targetDatabaseName : String, 
    cancellationToken : Nullable<CancellationToken>
)

매개 변수

  • targetDatabaseName
    유형: System.String
    Name of the target database for deployment.

예외

예외 조건
ArgumentException

If the value for any of the required parameters is a null reference or an empty string.

DacServicesException

If an error occurs during schema deployment and data import.

OperationCanceledException

CancellationToken

참고 항목

참조

DacServices 클래스

ImportBacpac 오버로드

Microsoft.SqlServer.Dac 네임스페이스