Método DacServices.ImportBacpac (BacPackage, String, Nullable<CancellationToken>)
Deploys schema and import table data from the supplied package to a database.
Namespace: Microsoft.SqlServer.Dac
Assembly: Microsoft.SqlServer.Dac (em Microsoft.SqlServer.Dac.dll)
Sintaxe
'Declaração
Public Sub ImportBacpac ( _
package As BacPackage, _
targetDatabaseName As String, _
cancellationToken As Nullable(Of CancellationToken) _
)
'Uso
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>
)
Parâmetros
- package
Tipo: Microsoft.SqlServer.Dac.BacPackage
BacPackage containing schema to be deployed and data to be imported.
- targetDatabaseName
Tipo: System.String
Name of the target database for deployment.
- cancellationToken
Tipo: 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.
Exceções
Exceção | Condição |
---|---|
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 |