Builds a database on a server.
The cmdlet builds a database project by verifying whether the database definition can be deployed to an empty database. If the build succeeds, it creates an object that represents the built project.
Invoke-DevartDatabaseBuild -Connection <object> -SourceScriptsFolder <string> [-FilterPath <string>] [-QueryBatchTimeout <int>] [-SynchronizationOptions <string>] [-TransactionIsolationLevel <string>] [<CommonParameters>]
Specifies the connection to the server where a database will be built.
-Connection <object>
| Property | Default value |
|---|---|
| Required | True |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies the path to the folder containing scripts to build the database.
-SourceScriptsFolder <string>
| Property | Default value |
|---|---|
| Required | True |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies the path to the file containing the filter settings used for schema validation.
-FilterPath <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies the schema comparison options to generate a script for validation.
-SynchronizationOptions <string>
To include additional options, specify a list of the options, for example:
/IgnoreCase:Yes /IgnorePrimaryKeys:No
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
For a complete list of synchronization options, see Command-line options.
Specifies the isolation level for the transactions during the temporary deployment for validation. The available options are: Serializable (default), Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted.
-TransactionIsolationLevel <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | Serializable |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Controls how long a SQL query can run before PowerShell stops it. This parameter applies to each expression in the database creation script when the Connection parameter is a DevartDatabaseConnectionInfo object.
-QueryBatchTimeout <int>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | 30 |
| Accept pipeline input | False |
| Accept wildcard characters | False |
<CommonParameters>
This cmdlet supports these common parameters:
Verbose – Provides detailed output about the command operation.Debug – Provides debugging information.ErrorAction – Specifies how to respond to errors.ErrorVariable – Stores error messages in a variable.WarningAction – Specifies how to respond to warnings.WarningVariable – Stores warning messages in a variable.InformationAction – Specifies how informational messages are handled.InformationVariable – Stores informational messages in a variable.OutBuffer – Controls the number of objects buffered before output.PipelineVariable – Stores the current pipeline object in a variable.OutVariable – Stores output objects in a variable.For more information, see About Common Parameters.
Devart.DbForge.DevOpsAutomation.SqlServer.DatabaseProject
$databaseProject = Invoke-DevartDatabaseBuild -SourceScriptsFolder $scriptFolder -Connection $connection
For information about how to generate a file containing filter options, see Using Object Filter.