Invoke-DevartDatabaseBuild

Synopsis

Builds a database on a server.

Description

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.

Syntax

Invoke-DevartDatabaseBuild -Connection <object> -SourceScriptsFolder <string> [-FilterPath <string>] [-QueryBatchTimeout <int>] [-SynchronizationOptions <string>] [-TransactionIsolationLevel <string>] [<CommonParameters>]

Parameters

-Connection

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

-SourceScriptsFolder

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

-FilterPath

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

-SynchronizationOptions

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.

-TransactionIsolationLevel

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

-QueryBatchTimeout

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

Common parameters

<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.

Output

Devart.DbForge.DevOpsAutomation.SqlServer.DatabaseProject

Example

$databaseProject = Invoke-DevartDatabaseBuild -SourceScriptsFolder $scriptFolder -Connection $connection

Related links

For information about how to generate a file containing filter options, see Using Object Filter.