DLMAutomation.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <!-- Cmdlet: New-DatabaseConnection --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DatabaseConnection</command:name> <command:verb>New</command:verb> <command:noun>DatabaseConnection</command:noun> <maml:description> <maml:para>Creates an object that DLM Automation cmdlets can use to connect to a database.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'New-DlmDatabaseConnection'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>New-DatabaseConnection</maml:name> <!-- Parameter: Database --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Database</maml:name> <maml:description> <maml:para>The database to connect to, on the server specified in ServerInstance. This is equivalent to the Initial Catalog property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ServerInstance --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name or network address of the SQL Server instance to connect to. For example, "staging01\sql2014". This is equivalent to the Data Source property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Password --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the Password property of a connection string. This parameter is optional. If left unspecified, it defaults to the empty string.</maml:para> <maml:para>This parameter is ignored if the Username parameter is null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Username --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the User ID property of a connection string. This parameter is optional. If you specify a null or empty string, Windows Authentication will be used and the Password parameter will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: ServerInstance --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name or network address of the SQL Server instance to connect to. For example, "staging01\sql2014". This is equivalent to the Data Source property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Database --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Database</maml:name> <maml:description> <maml:para>The database to connect to, on the server specified in ServerInstance. This is equivalent to the Initial Catalog property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Username --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the User ID property of a connection string. This parameter is optional. If you specify a null or empty string, Windows Authentication will be used and the Password parameter will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Password --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the Password property of a connection string. This parameter is optional. If left unspecified, it defaults to the empty string.</maml:para> <maml:para>This parameter is ignored if the Username parameter is null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: DatabaseConnection --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'New-DlmDatabaseConnection' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Test-DatabaseConnection --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Test-DatabaseConnection</command:name> <command:verb>Test</command:verb> <command:noun>DatabaseConnection</command:noun> <maml:description> <maml:para>Checks a Database Connection object can connect to the database correctly.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'Test-DlmDatabaseConnection'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Test-DatabaseConnection</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: DatabaseConnection --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'Test-DlmDatabaseConnection' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Export-DatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Export-DatabaseRelease</command:name> <command:verb>Export</command:verb> <command:noun>DatabaseRelease</command:noun> <maml:description> <maml:para>Exports a Release Artifact to a folder or .zip file on disk. Deprecated: Use Export-DlmDatabaseRelease instead.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'Export-DlmDatabaseRelease'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Export-DatabaseRelease</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the output folder or .zip file. If the path ends in ".zip", the Database Release is exported to a zip file. Otherwise it is exported to a folder. You can override this automatic choice using the Format parameter, and setting it to either "Zip" or "Folder" as required.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Indicates that any existing output file or folder should be overwritten.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The output format of the Database Release. If you specify Zip, the Database Release will be exported to a .zip file. If you specify Folder, the Database Release will be exported to a folder. If you specify Default or don't use the parameter, the output format will be determined by the Path parameter.</maml:para> <maml:para>Possible values: Default, Folder, Zip</maml:para> </maml:description> <command:parameterValue required="true">OutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Import.OutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">Folder</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the output folder or .zip file. If the path ends in ".zip", the Database Release is exported to a zip file. Otherwise it is exported to a folder. You can override this automatic choice using the Format parameter, and setting it to either "Zip" or "Folder" as required.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The output format of the Database Release. If you specify Zip, the Database Release will be exported to a .zip file. If you specify Folder, the Database Release will be exported to a folder. If you specify Default or don't use the parameter, the output format will be determined by the Path parameter.</maml:para> <maml:para>Possible values: Default, Folder, Zip</maml:para> </maml:description> <command:parameterValue required="true">OutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Import.OutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">Folder</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Indicates that any existing output file or folder should be overwritten.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'Export-DlmDatabaseRelease' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Import-DatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Import-DatabaseRelease</command:name> <command:verb>Import</command:verb> <command:noun>DatabaseRelease</command:noun> <maml:description> <maml:para>Imports a Release Artifact, exported to disk by Export-DlmDatabaseRelease, from a folder or .zip file. Deprecated: Use Import-DlmDatabaseRelease instead.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'Import-DlmDatabaseRelease'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Import-DatabaseRelease</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder or .zip file you want to import.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder or .zip file you want to import.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: IReleaseArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'Import-DlmDatabaseRelease' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DatabaseRelease</command:name> <command:verb>New</command:verb> <command:noun>DatabaseRelease</command:noun> <maml:description> <maml:para>Compares two database schemas and creates a Release Artifact that can be used to update one schema to the same state as the other.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'New-DlmDatabaseRelease'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: AbortOnWarningLevel --> <command:syntaxItem> <maml:name>New-DatabaseRelease</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The schema you want to update databases to. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>A database schema you want to update from. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> <maml:para>- a list containing one or more of the above</maml:para> <maml:para>If you use a list, the cmdlet will check that everything in the list has the same database schema. If there are no differences in schema, the cmdlet will create the Database Release. If there are any differences in schema, the cmdlet will fail and inform you.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release generation operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the Source schema with an alternative filter file to be used when generating the Update.sql change script and in all schema comparisons.</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>Specifies whether to ignore additional objects in the target database. Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>If you use Red Gate SQL Source Control, you can flag tables that contain static data. If you specify a scripts folder or NuGet package as the value of Source and a database connection object or string as the value of Target, by default DLM Automation compares the data in these tables when generating the update script. Use this parameter to ignore static data when comparing the databases.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IncludeIdenticalsInReport --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeIdenticalsInReport</maml:name> <maml:description> <maml:para>By default, the change report will show the number of identical objects, but won't show the full SQL for each object. Use this parameter to include the full SQL of identical objects.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the update script and running pre- and post-deploy checks. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>The isolation level for the transactions used in the update script. Permitted values are Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The schema you want to update databases to. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>A database schema you want to update from. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> <maml:para>- a list containing one or more of the above</maml:para> <maml:para>If you use a list, the cmdlet will check that everything in the list has the same database schema. If there are no differences in schema, the cmdlet will create the Database Release. If there are any differences in schema, the cmdlet will fail and inform you.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the Source schema with an alternative filter file to be used when generating the Update.sql change script and in all schema comparisons.</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>If you use Red Gate SQL Source Control, you can flag tables that contain static data. If you specify a scripts folder or NuGet package as the value of Source and a database connection object or string as the value of Target, by default DLM Automation compares the data in these tables when generating the update script. Use this parameter to ignore static data when comparing the databases.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the update script and running pre- and post-deploy checks. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>Specifies whether to ignore additional objects in the target database. Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>The isolation level for the transactions used in the update script. Permitted values are Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: IncludeIdenticalsInReport --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeIdenticalsInReport</maml:name> <maml:description> <maml:para>By default, the change report will show the number of identical objects, but won't show the full SQL for each object. Use this parameter to include the full SQL of identical objects.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release generation operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: IReleaseArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'New-DlmDatabaseRelease' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Use-DatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Use-DatabaseRelease</command:name> <command:verb>Use</command:verb> <command:noun>DatabaseRelease</command:noun> <maml:description> <maml:para>Uses the DatabaseRelease object produced by the New-DlmDatabaseRelease cmdlet to update a target database schema to match the source schema.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'Use-DlmDatabaseRelease'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: AbortOnWarningLevel --> <command:syntaxItem> <maml:name>Use-DatabaseRelease</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DeployTo --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DeployTo</maml:name> <maml:description> <maml:para>A Database Connection object or database connection string that identifies the target database to be updated. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release execution operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: DisableMonitorAnnotation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableMonitorAnnotation</maml:name> <maml:description> <maml:para>Don't add annotations to the event log for SQL Monitor.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the update script. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPostUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPostUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Don't check that the target database has the correct schema after the update has run.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPreUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPreUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Before running the update script, don't check that the target database has the correct schema or that the target database has already been updated.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DeployTo --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DeployTo</maml:name> <maml:description> <maml:para>A Database Connection object or database connection string that identifies the target database to be updated. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SkipPreUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPreUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Before running the update script, don't check that the target database has the correct schema or that the target database has already been updated.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPostUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPostUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Don't check that the target database has the correct schema after the update has run.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the update script. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release execution operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: DisableMonitorAnnotation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableMonitorAnnotation</maml:name> <maml:description> <maml:para>Don't add annotations to the event log for SQL Monitor.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'Use-DlmDatabaseRelease' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DlmDatabaseConnection --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DlmDatabaseConnection</command:name> <command:verb>New</command:verb> <command:noun>DlmDatabaseConnection</command:noun> <maml:description> <maml:para>Creates an object that other DLM Automation cmdlets can use to connect to a database.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-DlmDatabaseConnection cmdlet creates a DatabaseConnection object that can be used by other DLM Automation cmdlets to connect to a database. The object contains the server instance, database name, and security credentials that cmdlets will use to connect to the database.</maml:para> <maml:para>You can use Windows authentication or SQL Server authentication to connect to the database. If you use the Username and Password parameters, SQL Server authentication will be used. If you don't use those parameters, Windows authentication will be used; the account used to connect will be the account running PowerShell or the PowerShell script.</maml:para> <maml:para>The cmdlets that can use the Database Connection object to connect to a database are Invoke-DlmDatabaseSchemaValidation, New-DlmDatabaseRelease, Sync-DlmDatabaseSchema, Test-DlmDatabaseConnection and Use-DlmDatabaseRelease.</maml:para> <maml:para>As an alternative to using this cmdlet, you may use a standard database connection string in place of a Database Connection object. The following connection string properties are supported: ApplicationIntent, Asynchronous Processing, AttachDbFilename, Connect Timeout, Context Connection, Current Language, Data Source, Encrypt, Enlist, Failover Partner, Initial Catalog, Integrated Security, Load Balance Timeout, Max Pool Size, Min Pool Size, MultipleActiveResultSets, MultiSubnetFailover, Network Library, Packet Size, Password, Persist Security Info, Replication, Transaction Binding, TrustServerCertificate, Type System Version, User ID, User Instance and Workstation ID.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>New-DlmDatabaseConnection</maml:name> <!-- Parameter: Database --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Database</maml:name> <maml:description> <maml:para>The database to connect to, on the server specified in ServerInstance. This is equivalent to the Initial Catalog property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ServerInstance --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name or network address of the SQL Server instance to connect to. For example, "staging01\sql2014". This is equivalent to the Data Source property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Password --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the Password property of a connection string. This parameter is optional. If left unspecified, it defaults to the empty string.</maml:para> <maml:para>This parameter is ignored if the Username parameter is null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Username --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the User ID property of a connection string. This parameter is optional. If you specify a null or empty string, Windows Authentication will be used and the Password parameter will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: ServerInstance --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name or network address of the SQL Server instance to connect to. For example, "staging01\sql2014". This is equivalent to the Data Source property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Database --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Database</maml:name> <maml:description> <maml:para>The database to connect to, on the server specified in ServerInstance. This is equivalent to the Initial Catalog property of a connection string.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Username --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the User ID property of a connection string. This parameter is optional. If you specify a null or empty string, Windows Authentication will be used and the Password parameter will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Password --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the SQL Server account cmdlets will use to connect to the database. This is equivalent to the Password property of a connection string. This parameter is optional. If left unspecified, it defaults to the empty string.</maml:para> <maml:para>This parameter is ignored if the Username parameter is null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: DatabaseConnection --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" -Username "AutomationUser" -Password "P@ssw0rd"</dev:code> <dev:remarks> <maml:para>This example shows how to create a Database Connection object. The object will use SQL Server authentication to connect to the database.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates a Database Connection object, $staging. This can be used to connect to the database, Staging, on the SQL Server staging01\sql2014. Because the Username and Password parameters are provided, SQL Server authentication will be used to connect to Staging.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging"</dev:code> <dev:remarks> <maml:para>This example shows how to create a Database Connection object that will use Windows authentication to connect to the database.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates a Database Connection object, $staging. This can be used to connect to the database Staging on the SQL Server staging01\sql2014. Because no Username and Password are provided, Windows authentication will be used to connect to the database.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" New-DlmDatabaseRelease -Source $test -Target $staging</dev:code> <dev:remarks> <maml:para>This example shows how Database Connection objects can be used by the New-DlmDatabaseRelease cmdlet to create a Database Release.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates two Database Connection objects, $staging and $test. $staging is used to connect to the database, Staging, on staging01\SQL2014. $test is used to connect to the database, Test, on test01\sql2014.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet creates the database deployment resources that can be used to update Staging to match the Test schema.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" | Test-DlmDatabaseConnection</dev:code> <dev:remarks> <maml:para>This example shows how to create a Database Connection object and pass it through the pipeline to another cmdlet.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates a Database Connection object. It's piped through the Test-DlmDatabaseConnection cmdlet, before being assigned to $staging.</maml:para> <maml:para>The Test-DlmDatabaseConnection cmdlet checks the Staging database can be connected to with the settings specified. This allows you to check you can connect to the Staging database before you use $staging with other cmdlets.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Test-DlmDatabaseConnection --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Test-DlmDatabaseConnection</command:name> <command:verb>Test</command:verb> <command:noun>DlmDatabaseConnection</command:noun> <maml:description> <maml:para>Checks a DatabaseConnection object can connect to the database correctly.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Test-DlmDatabaseConnection cmdlet checks that the details in a DatabaseConnection object produced by the New-DlmDatabaseConnection cmdlet can be used to connect to the specified database.</maml:para> <maml:para>If Test-DlmDatabaseConnection can't connect to the database, it raises an error.</maml:para> <maml:para>After testing the connection, the cmdlet pipes out the input DatabaseConnection object. This allows you to use Test-DlmDatabaseConnection in a chain of cmdlets.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Test-DlmDatabaseConnection</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The Database Connection object or database connection string that identifies the connection to test. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: DatabaseConnection --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$connection = New-DlmDatabaseConnection -ServerInstance "prod01\sql2014" -Database "Production" -Username "AutomationUser" -Password "P@ssw0rd" Test-DlmDatabaseConnection $connection</dev:code> <dev:remarks> <maml:para>This example shows how to use the Test-DlmDatabaseConnection cmdlet to check that a Database Connection object can connect to a database.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates a Database Connection object, $connection. This contains the details needed to connect to the database, Production, on prod01\sql2014. The Test-DlmDatabaseConnection cmdlet then checks these details can be used to connect to Production.</maml:para> <maml:para>If Test-DlmDatabaseConnection can't connect to the database, you must check the connection details, and create a new Database Connection object with the correct details.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$connection = New-DlmDatabaseConnection -ServerInstance "prod01\sql2014" -Database "Production" -Username "AutomationUser" -Password "P@ssw0rd" | Test-DlmDatabaseConnection</dev:code> <dev:remarks> <maml:para>This example show how to pass a Database Connection object through the pipeline to the Test-DlmDatabaseConnection cmdlet.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates a Database Connection object. This is piped to the Test-DlmDatabaseConnection cmdlet.</maml:para> <maml:para>Test-DlmDatabaseConnection checks that it can connect to the database, Production, using the Database Connection object. It then pipes the same Database Connection object out. This allows it to be assigned to the $connection variable.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DlmDatabaseDocumentation --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DlmDatabaseDocumentation</command:name> <command:verb>New</command:verb> <command:noun>DlmDatabaseDocumentation</command:noun> <maml:description> <maml:para>Generates documentation for the validated database schema produced by the Invoke-DlmDatabaseValidation cmdlet.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-DlmDatabaseDocumentation cmdlet takes the output of the Invoke-DlmDatabaseValidation cmdlet and creates documentation for that schema. It creates a SchemaDocumentation object that represents the documentation of the validated schema.</maml:para> <maml:para>You can use the New-DlmDatabasePackage cmdlet to include this documentation in the database package it creates.</maml:para> <maml:para>In order to generate the documentation, the cmdlet creates a temporary copy of the database. By default, it uses LocalDB for this. Alternatively, you can use the TemporaryDatabaseServer parameter to specify a SQL Server instance for the temporary database. This is useful if your database uses features that aren't supported by LocalDB, such as Full-Text Search.</maml:para> <maml:para>If you don't want to use LocalDB but don't have permission to create a database on the SQL Server instance, you can use the TemporaryDatabase parameter to specify an existing database.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: TemporaryDatabaseServer --> <command:syntaxItem> <maml:name>New-DlmDatabaseDocumentation</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.</maml:para> </maml:description> <command:parameterValue required="true">IProject</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when documenting this schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Whether the SQL Compare engine should ignore parser errors.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for documentation. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB is not present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary, randomly-named database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: TemporaryDatabase --> <command:syntaxItem> <maml:name>New-DlmDatabaseDocumentation</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.</maml:para> </maml:description> <command:parameterValue required="true">IProject</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when documenting this schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Whether the SQL Compare engine should ignore parser errors.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for documentation. This can be:</maml:para> <maml:para>- a database connection object that contains connection details for a database. See New-DlmDatabaseConnection for details.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>If you use this parameter, all existing data on the temporary database will be lost.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.</maml:para> </maml:description> <command:parameterValue required="true">IProject</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for documentation. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB is not present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary, randomly-named database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for documentation. This can be:</maml:para> <maml:para>- a database connection object that contains connection details for a database. See New-DlmDatabaseConnection for details.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>If you use this parameter, all existing data on the temporary database will be lost.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when documenting this schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Whether the SQL Compare engine should ignore parser errors.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: SchemaDocumentation --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Documentation.SchemaDocumentation</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation $documentation = $validatedSchema | New-DlmDatabaseDocumentation $databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 -Documentation $documentation</dev:code> <dev:remarks> <maml:para>This example shows how to create database documentation for a validated scripts folder using the New-DlmDatabaseDocumentation cmdlet. The New-DlmDatabasePackage cmdlet includes this documentation with the schema in the database package it creates.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Export-DlmDatabasePackage --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Export-DlmDatabasePackage</command:name> <command:verb>Export</command:verb> <command:noun>DlmDatabasePackage</command:noun> <maml:description> <maml:para>Exports a IBuildArtifact object to disk.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Export-DlmDatabasePackage cmdlet exports the IBuildArtifact object produced by the New-DlmDatabasePackage cmdlet to a specified output folder in NuGet package format.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Export-DlmDatabasePackage</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The IBuildArtifact object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IBuildArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder the package is exported to. If the folder doesn't already exist, it will be created when the package is exported.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to overwrite any existing NuGet package with the same name.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: OutputFormat --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFormat</maml:name> <maml:description> <maml:para>The output format of the Database Package. If you don't use this parameter the default behaviour is to export to a NuGet package</maml:para> <maml:para>Possible values: NuGet, Zip</maml:para> </maml:description> <command:parameterValue required="true">BuildArtifactOutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.BuildArtifacts.BuildArtifactOutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>NuGet</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">NuGet</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The IBuildArtifact object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IBuildArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder the package is exported to. If the folder doesn't already exist, it will be created when the package is exported.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to overwrite any existing NuGet package with the same name.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: OutputFormat --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFormat</maml:name> <maml:description> <maml:para>The output format of the Database Package. If you don't use this parameter the default behaviour is to export to a NuGet package</maml:para> <maml:para>Possible values: NuGet, Zip</maml:para> </maml:description> <command:parameterValue required="true">BuildArtifactOutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.BuildArtifacts.BuildArtifactOutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>NuGet</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">NuGet</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The IBuildArtifact object to be exported.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages"</dev:code> <dev:remarks> <maml:para>In this example, the New-DlmDatabasePackage cmdlet creates a IBuildArtifact object from a validated database schema. The Export-DlmDatabasePackage cmdlet then exports the package to c:\Export\packages.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedProject | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages"</dev:code> <dev:remarks> <maml:para>In this example, the New-DlmDatabasePackage cmdlet creates a IBuildArtifact object from a validated database schema. The Export-DlmDatabasePackage cmdlet then exports the package to C:\Export\packages.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedProject | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages" -OutputFormat Zip</dev:code> <dev:remarks> <maml:para>In this example, the New-DlmDatabasePackage cmdlet creates a IBuildArtifact object from a validated database schema. The Export-DlmDatabasePackage cmdlet then exports the package to C:\Export\packages as a zip file.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Import-DlmDatabasePackage --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Import-DlmDatabasePackage</command:name> <command:verb>Import</command:verb> <command:noun>DlmDatabasePackage</command:noun> <maml:description> <maml:para>Imports a build artifact to an instance of an IBuildArtifact object.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Import-DlmDatabasePackage cmdlet uses an on disk build artifact to create a IBuildArtifact object that can be used as the input for other cmdlets such as Publish-DlmDatabasePackage.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Import-DlmDatabasePackage</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to NuGet database package file (eg 'C:\Work\packages\MyDatabase.1.0.0.nupkg').</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to NuGet database package file (eg 'C:\Work\packages\MyDatabase.1.0.0.nupkg').</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The path to NuGet database package file (eg 'C:\Work\packages\MyDatabase.1.0.0.nupkg').</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: IBuildArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$databasePackagePath = "C:\Work\packages\MyDatabase.1.0.0.nupkg" $databasePackage = $databasePackagePath | Import-DlmDatabasePackage $databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89</dev:code> <dev:remarks> <maml:para>This example shows how to use the Import-DlmDatabasePackage cmdlet to create a IBuildArtifact object from a database package file. The Publish-DlmDatabasePackage cmdlet then publishes the output object to a NuGet feed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$databasePackagePath = "C:\Work\packages\MyDatabase.zip" $databasePackage = $databasePackagePath | Import-DlmDatabasePackage</dev:code> <dev:remarks> <maml:para>This example shows how to use the Import-DlmDatabasePackage cmdlet to create a IBuildArtifact object from a database package file.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DlmDatabasePackage --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DlmDatabasePackage</command:name> <command:verb>New</command:verb> <command:noun>DlmDatabasePackage</command:noun> <maml:description> <maml:para>Packages the build artifacts of a validated project produced by the Invoke-DlmDatabaseSchemaValidation cmdlet.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-DlmDatabasePackage cmdlet takes a validated project from the output of the Invoke-DlmDatabaseSchemaValidation cmdlet and creates a package containing it's build artifacts. It can also include the documentation for your database using the output of the New-DlmDatabaseDocumentation cmdlet.</maml:para> <maml:para>You can use the Export-DlmDatabasePackage cmdlet to export the build artifacts as a NuGet package.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>New-DlmDatabasePackage</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated project.</maml:para> </maml:description> <command:parameterValue required="true">IProject</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageId --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageId</maml:name> <maml:description> <maml:para>The unique identifier for the package you are creating.</maml:para> <maml:para>This mustn't contain more than 100 characters and must be a valid NuGet package identifier.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageVersion --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageVersion</maml:name> <maml:description> <maml:para>The version of the package. This must be in a valid NuGet version format (eg 3.2.1, 3.2.1-beta1).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Documentation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Documentation</maml:name> <maml:description> <maml:para>The documentation object created by New-DlmDatabaseDocumentation to include in the database package.</maml:para> </maml:description> <command:parameterValue required="true">SchemaDocumentation</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Documentation.SchemaDocumentation</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageDescription --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageDescription</maml:name> <maml:description> <maml:para>The description of the package you are creating.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated project.</maml:para> </maml:description> <command:parameterValue required="true">IProject</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageId --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageId</maml:name> <maml:description> <maml:para>The unique identifier for the package you are creating.</maml:para> <maml:para>This mustn't contain more than 100 characters and must be a valid NuGet package identifier.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageVersion --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageVersion</maml:name> <maml:description> <maml:para>The version of the package. This must be in a valid NuGet version format (eg 3.2.1, 3.2.1-beta1).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: PackageDescription --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PackageDescription</maml:name> <maml:description> <maml:para>The description of the package you are creating.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Documentation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Documentation</maml:name> <maml:description> <maml:para>The documentation object created by New-DlmDatabaseDocumentation to include in the database package.</maml:para> </maml:description> <command:parameterValue required="true">SchemaDocumentation</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Documentation.SchemaDocumentation</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated project.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: IBuildArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedProject | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages"</dev:code> <dev:remarks> <maml:para>This example shows how to use the New-DlmDatabasePackage cmdlet to create a NuGet package from a validated SQL Source Control project.</maml:para> <maml:para>First the Invoke-DlmDatabaseSchemaValidation cmdlet validates the database schema. Then the New-DlmDatabasePackage cmdlet creates the package. Finally the Export-DlmDatabasePackage cmdlet exports the package to file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedProject | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages"</dev:code> <dev:remarks> <maml:para>This example shows how to use the New-DlmDatabasePackage cmdlet to create a package from a validated Redgate database project.</maml:para> <maml:para>First the Invoke-DlmDatabaseSchemaValidation cmdlet validates the project. Then the New-DlmDatabasePackage cmdlet creates the package. Finally the Export-DlmDatabasePackage cmdlet exports the package to file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation $documentation = $validatedProject | New-DlmDatabaseDocumentation $databasePackage = $validatedProject | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 -Documentation $documentation $databasePackage | Export-DlmDatabasePackage -Path "C:\Export\packages"</dev:code> <dev:remarks> <maml:para>This example shows how to use the New-DlmDatabasePackage cmdlet to create a NuGet database package that also includes database documentation.</maml:para> <maml:para>The documentation is created by the New-DlmDatabaseDocumentation cmdlet.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Publish-DlmDatabasePackage --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Publish-DlmDatabasePackage</command:name> <command:verb>Publish</command:verb> <command:noun>DlmDatabasePackage</command:noun> <maml:description> <maml:para>Publishes a database package to a NuGet feed or to DLM Dashboard.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Publish-DlmDatabasePackage cmdlet publishes a IBuildArtifact object produced by the New-DlmDatabasePackage cmdlet to a specified NuGet feed or to DLM Dashboard.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: NuGet --> <command:syntaxItem> <maml:name>Publish-DlmDatabasePackage</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>An instance of a IBuildArtifact object to be published.</maml:para> <maml:para>This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.</maml:para> </maml:description> <command:parameterValue required="true">IBuildArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NuGetFeedUrl --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NuGetFeedUrl</maml:name> <maml:description> <maml:para>The NuGet feed that the database package will be published to.</maml:para> <maml:para>This must be valid URL for a NuGet feed.</maml:para> <maml:para>You can't use this parameter in addition to the DlmDashboardUrl parameter.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NuGetApiKey --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NuGetApiKey</maml:name> <maml:description> <maml:para>The API key for the NuGet server.</maml:para> <maml:para>You can't use this parameter in addition to the DlmDashboardUrl parameter.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: DLMDashboard --> <command:syntaxItem> <maml:name>Publish-DlmDatabasePackage</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>An instance of a IBuildArtifact object to be published.</maml:para> <maml:para>This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.</maml:para> </maml:description> <command:parameterValue required="true">IBuildArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DlmDashboardUrl --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DlmDashboardUrl</maml:name> <maml:description> <maml:para>The URL, including port number, to the instance of DLM Dashboard that the database package will be published to.</maml:para> <maml:para>You can't use this parameter in addition to the NuGetFeedUrl and NuGetApiKey parameters.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>An instance of a IBuildArtifact object to be published.</maml:para> <maml:para>This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.</maml:para> </maml:description> <command:parameterValue required="true">IBuildArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NuGetFeedUrl --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NuGetFeedUrl</maml:name> <maml:description> <maml:para>The NuGet feed that the database package will be published to.</maml:para> <maml:para>This must be valid URL for a NuGet feed.</maml:para> <maml:para>You can't use this parameter in addition to the DlmDashboardUrl parameter.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NuGetApiKey --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NuGetApiKey</maml:name> <maml:description> <maml:para>The API key for the NuGet server.</maml:para> <maml:para>You can't use this parameter in addition to the DlmDashboardUrl parameter.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DlmDashboardUrl --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DlmDashboardUrl</maml:name> <maml:description> <maml:para>The URL, including port number, to the instance of DLM Dashboard that the database package will be published to.</maml:para> <maml:para>You can't use this parameter in addition to the NuGetFeedUrl and NuGetApiKey parameters.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>An instance of a IBuildArtifact object to be published.</maml:para> <maml:para>This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89</dev:code> <dev:remarks> <maml:para>This example shows how to use the Publish-DlmDatabasePackage cmdlet to publish a database package object produced by the New-DlmDatabasePackage cmdlet to a NuGet feed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$databasePackagePath = "c:\Work\packages\MyDatabase.1.0.0.nupkg" $databasePackage = $databasePackagePath | Import-DlmDatabasePackage $databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89</dev:code> <dev:remarks> <maml:para>This example shows how to publish a database package file to a NuGet feed. The Import-DlmDatabasePackage cmdlet creates an instance of a IBuildArtifact object, which is then used as the input for the Publish-DlmDatabasePackage cmdlet.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation $databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0 $databasePackage | Publish-DlmDatabasePackage -DlmDashboardUrl http://localhost:19528</dev:code> <dev:remarks> <maml:para>This example shows how to use the Publish-DlmDatabasePackage cmdlet to publish a database package object to DLM Dashboard.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Export-DlmDatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Export-DlmDatabaseRelease</command:name> <command:verb>Export</command:verb> <command:noun>DlmDatabaseRelease</command:noun> <maml:description> <maml:para>Exports a Release Artifact, which are produced by the New-DlmDatabaseRelease cmdlet to a folder or .zip file on disk.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Export-DlmDatabaseRelease cmdlet exports database deployment resources, which are produced by the New-DlmDatabaseRelease cmdlet to a folder or .zip file. The folder of .zip file contains the following resources:</maml:para> <maml:para>- 'Update.sql': The SQL update script containing all the changes that will be made when Use-DlmDatabaseRelease is run with this DatabaseRelease object.</maml:para> <maml:para>- 'Changes.html': Lists the database objects that will change as a result of running the 'Update.sql' script, and highlights SQL code differences for each object before and after the update. This report also includes changes to static data, shows warnings of any potential data loss and the SQL update script that will be run.</maml:para> <maml:para>- 'Warnings.xml': Lists any warnings related to running the 'Update.sql' script.</maml:para> <maml:para>- 'States/': Contains a representation of the state of each database before running the update and the desired state after the update.</maml:para> <maml:para>- 'RedGateUpdateMetadata.xml': Contains metadata about the database deployment resources and the SQL Compare options used in comparisons.</maml:para> <maml:para>- 'Filter.scpf': If SQL Compare filters are used when creating the database deployment resources, they are saved in this file.</maml:para> <maml:para>Specify the output folder or file using the Path parameter. If the Path ends in .zip, the database deployment resources will be exported to a .zip file. Otherwise, they'll be exported to a folder. You can override this choice with the optional Format parameter.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Export-DlmDatabaseRelease</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the output folder or .zip file. If the path ends in ".zip", the Database Release is exported to a zip file. Otherwise it is exported to a folder. You can override this automatic choice using the Format parameter, and setting it to either "Zip" or "Folder" as required.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Indicates that any existing output file or folder should be overwritten.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The output format of the Database Release. If you specify Zip, the Database Release will be exported to a .zip file. If you specify Folder, the Database Release will be exported to a folder. If you specify Default or don't use the parameter, the output format will be determined by the Path parameter.</maml:para> <maml:para>Possible values: Default, Folder, Zip</maml:para> </maml:description> <command:parameterValue required="true">OutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Import.OutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">Folder</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the output folder or .zip file. If the path ends in ".zip", the Database Release is exported to a zip file. Otherwise it is exported to a folder. You can override this automatic choice using the Format parameter, and setting it to either "Zip" or "Folder" as required.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The output format of the Database Release. If you specify Zip, the Database Release will be exported to a .zip file. If you specify Folder, the Database Release will be exported to a folder. If you specify Default or don't use the parameter, the output format will be determined by the Path parameter.</maml:para> <maml:para>Possible values: Default, Folder, Zip</maml:para> </maml:description> <command:parameterValue required="true">OutputFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Import.OutputFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">Folder</command:parameterValue> <command:parameterValue required="false" variableLength="false">Zip</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Indicates that any existing output file or folder should be overwritten.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The DatabaseRelease object to be exported.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $scriptsFolder = 'C:\Work\scripts' $release = New-DlmDatabaseRelease -Source $scriptsFolder -Target $staging $release | Export-DlmDatabaseRelease -Path "C:\Export\DatabaseRelease"</dev:code> <dev:remarks> <maml:para>This example shows how to create database deployment resources and export them to a folder.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet creates a DatabaseRelease object, which represents the database deployment resources. This object can update the database, Staging, to match the schema in the scripts folder C:\Work\scripts. The DatabaseRelease object is passed through the pipeline to the Export-DlmDatabaseRelease cmdlet. This cmdlet exports the database deployment resources to the folder C:\Export\DatabaseRelease\. The resources are exported to a folder because the Path parameter didn't end in .zip.</maml:para> <maml:para>Exporting database deployment resources lets you review the update script and other update resources, such as the change report and deployment warnings.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$production = New-DlmDatabaseConnection -ServerInstance "prod01\sql2014" -Database "Production" $build = Import-DlmDatabasePackage "C:\Work\packages\DatabaseBuildArtifact.1.0.0.nupkg" $release = New-DlmDatabaseRelease -Source $build -Target $production $release | Export-DlmDatabaseRelease -Path "C:\Export\DatabaseRelease"</dev:code> <dev:remarks> <maml:para>This example shows how to create a Redgate Database Release Artifact and export it to a folder.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $scriptsFolder = 'C:\Work\scripts' New-DlmDatabaseRelease -Source $scriptsFolder -Target $staging | Export-DlmDatabaseRelease -Path "C:\Export\DatabaseRelease.zip"</dev:code> <dev:remarks> <maml:para>This example shows how to create a database deployment resources and export it to a .zip file.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet creates a DatabaseRelease object, representing the database deployment resources, which is passed through the pipeline to the Export-DlmDatabaseRelease cmdlet. This cmdlet exports the database deployment resources to a .zip file, because the Path parameter ended in .zip.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $scriptsFolder = "C:\Work\scripts" New-DlmDatabaseRelease -Source $scriptsFolder -Target $staging | Export-DlmDatabaseRelease -Path "C:\Export\DatabaseRelease" -Format Zip</dev:code> <dev:remarks> <maml:para>This example shows how to create database deployment resources and export them to a .zip file using the Format parameter.</maml:para> <maml:para>The Export-DlmDatabaseRelease cmdlet exports the database deployment resources to the .zip file, "C:\Export\DatabaseRelease.zip" because "Zip" is specified by the Format parameter. If the Format parameter wasn't used, the database deployment resources would be exported to a folder, because the Path parameter doesn't end in ".zip".</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Import-DlmDatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Import-DlmDatabaseRelease</command:name> <command:verb>Import</command:verb> <command:noun>DlmDatabaseRelease</command:noun> <maml:description> <maml:para>Imports a Release Artifact, exported to disk by Export-DlmDatabaseRelease, from a folder or .zip file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Import-DlmDatabaseRelease cmdlet re-imports the release artifact that has been exported to a folder or .zip file by the Export-DlmDatabaseRelease cmdlet.</maml:para> <maml:para>The IReleaseArtifact object produced can then be used by the Use-DlmDatabaseRelease cmdlet to deploy the update.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Import-DlmDatabaseRelease</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder or .zip file you want to import.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the folder or .zip file you want to import.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: IReleaseArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$release = Import-DlmDatabaseRelease -Path "C:\Work\DatabaseRelease\"</dev:code> <dev:remarks> <maml:para>This example shows how to import a folder to create the database deployment resources.</maml:para> <maml:para>The Import-DlmDatabaseRelease cmdlet imports the folder C:\Work\DatabaseRelease\, creating the database deployment resources. This folder was created by exporting to C:\Work\DatabaseRelease\ using the Export-DlmDatabaseRelease cmdlet.</maml:para> <maml:para>Using Export-DlmDatabaseRelease and Import-DlmDatabaseRelease like this allows you to review the update script before you deploy with DLM Automation.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$release = Import-DlmDatabaseRelease -Path "C:\Work\DatabaseRelease.zip"</dev:code> <dev:remarks> <maml:para>This example shows how to import a .zip file to create the database deployment resources.</maml:para> <maml:para>The Import-DlmDatabaseRelease cmdlet imports the .zip file C:\Work\DatabaseRelease.zip, creating the database deployment resources.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DlmDatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DlmDatabaseRelease</command:name> <command:verb>New</command:verb> <command:noun>DlmDatabaseRelease</command:noun> <maml:description> <maml:para>Compares two database schemas and creates database deployment resources that can be used to update one schema to the same state as the other.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-DlmDatabaseRelease cmdlet creates the database deployment resources containing all the information you need to update a target database schema to match a source database schema. The output can be used by the Use-DlmDatabaseRelease cmdlet to update the target database, or by the Export-DlmDatabaseRelease cmdlet to export a SQL change script.</maml:para> <maml:para>The Source and Target parameters can be a database connection, a NuGet package, or a scripts folder.</maml:para> <maml:para>The database deployment resources contain:</maml:para> <maml:para>- a SQL update script that will update databases with the 'Target' schema to match the 'Source' schema</maml:para> <maml:para>- a summary of the differences between the schemas</maml:para> <maml:para>- any deployment warnings and metadata about the script.</maml:para> <maml:para>If the Source parameter is a NuGet package or scripts folder containing tables flagged in SQL Source Control as static data tables and the Target parameter is a database connection object or string, DLM Automation will also compare the data in static data tables when generating the update script. To exclude static data changes, use the IgnoreStaticData parameter. For more information about static data, see http://www.red-gate.com/dlma/staticdata.</maml:para> <maml:para>Filters: If the -Source parameter is a scripts folder or NuGet package that contains a filter definition (to include or exclude certain database objects), this will be applied when creating the update script and when performing pre- and post-deploy checks. You can specify an alternative filter using the FilterPath parameter. For more information about filters, see http://www.red-gate.com/dlma/filters.</maml:para> <maml:para>Options: DLM Automation uses a set of default SQL Compare options when creating an update script and running pre- and post-deploy checks. To specify additional options or turn off any of the defaults, use the SQLCompareOptions parameter. For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: AbortOnWarningLevel --> <command:syntaxItem> <maml:name>New-DlmDatabaseRelease</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The schema you want to update databases to. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>A database schema you want to update from. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> <maml:para>- a list containing one or more of the above</maml:para> <maml:para>If you use a list, the cmdlet will check that everything in the list has the same database schema. If there are no differences in schema, the cmdlet will create the Database Release. If there are any differences in schema, the cmdlet will fail and inform you.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release generation operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the Source schema with an alternative filter file to be used when generating the Update.sql change script and in all schema comparisons.</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>Specifies whether to ignore additional objects in the target database. Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>If you use Red Gate SQL Source Control, you can flag tables that contain static data. If you specify a scripts folder or NuGet package as the value of Source and a database connection object or string as the value of Target, by default DLM Automation compares the data in these tables when generating the update script. Use this parameter to ignore static data when comparing the databases.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IncludeIdenticalsInReport --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeIdenticalsInReport</maml:name> <maml:description> <maml:para>By default, the change report will show the number of identical objects, but won't show the full SQL for each object. Use this parameter to include the full SQL of identical objects.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the update script and running pre- and post-deploy checks. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>The isolation level for the transactions used in the update script. Permitted values are Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The schema you want to update databases to. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>A database schema you want to update from. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> <maml:para>- a list containing one or more of the above</maml:para> <maml:para>If you use a list, the cmdlet will check that everything in the list has the same database schema. If there are no differences in schema, the cmdlet will create the Database Release. If there are any differences in schema, the cmdlet will fail and inform you.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the Source schema with an alternative filter file to be used when generating the Update.sql change script and in all schema comparisons.</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>If you use Red Gate SQL Source Control, you can flag tables that contain static data. If you specify a scripts folder or NuGet package as the value of Source and a database connection object or string as the value of Target, by default DLM Automation compares the data in these tables when generating the update script. Use this parameter to ignore static data when comparing the databases.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the update script and running pre- and post-deploy checks. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>Specifies whether to ignore additional objects in the target database. Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>The isolation level for the transactions used in the update script. Permitted values are Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: IncludeIdenticalsInReport --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeIdenticalsInReport</maml:name> <maml:description> <maml:para>By default, the change report will show the number of identical objects, but won't show the full SQL for each object. Use this parameter to include the full SQL of identical objects.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release generation operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: IReleaseArtifact --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" New-DlmDatabaseRelease -Source $test -Target $staging</dev:code> <dev:remarks> <maml:para>This example show how to create the database deployment resources.</maml:para> <maml:para>The New-DlmDatabaseConnection cmdlet creates two Database Connection objects, $staging and $test. $staging is used to connect to the Staging database on staging01\sql2014. $test is used to connect to the Test database on test01\sql2014.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet uses $test as the Source parameter, and $staging as the Target parameter. The cmdlet creates the database deployment resources that can be used to update the schema of Staging (and any database with the same schema as Staging) to match the schema of Test.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $test = "Initial Catalog=Test; Data Source=test01\sql2014; User ID=AutomationUser; Password=P@ssw0rd" New-DlmDatabaseRelease -Source $test -Target $staging</dev:code> <dev:remarks> <maml:para>This example shows how to use a database connection string to specify the source schema.</maml:para> <maml:para>A database connection string is used to specify the database, Test, as the source schema. The cmdlet only uses the Data Source, Initial Catalog, User ID, Password and Integrated Security properties of a database connection string. Any other properties specified in the string will be ignored.</maml:para> <maml:para>You can also use a database connection string as the Target parameter. This specifies the schema of the databases you want to update.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $package = "C:\Work\packages\MyDatabase.1.0.0.nupkg" New-DlmDatabaseRelease -Source $package -Target $staging</dev:code> <dev:remarks> <maml:para>This example shows how to use a NuGet package to specify the source schema.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet uses a NuGet database package, MyDatabase.1.0.0.nupkg, as the Source parameter. The package must contain a scripts folder in the db\state sub-folder.</maml:para> <maml:para>If the NuGet package includes tables that have been flagged as containing static data, this data will be included when generating the Database Release, unless the IgnoreStaticData parameter is specified.</maml:para> <maml:para>You can also specify a NuGet package as the Target parameter. However, if you do this, static data won't be deployed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2017" -Database "Staging" New-DlmDatabaseRelease -Source "C:\Work\packages\DatabaseBuildArtifact.1.0.0.nupkg" -Target $staging</dev:code> <dev:remarks> <maml:para>This example shows how to use a Redgate Database Build Artifact to specify the source.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet uses a Redgate Database Build Artifact, DatabaseBuildArtifact.nupkg, as the Source parameter. The package must have been generated from a Redgate Database Project using the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>The Target parameter must be a connection string or a DatabaseConnection when using Redgate Database Projects.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 5 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $scriptsFolder = "C:\Work\scripts" New-DlmDatabaseRelease -Source $scriptsFolder -Target $staging -IgnoreStaticData</dev:code> <dev:remarks> <maml:para>This example show how to use a scripts folder to specify the source schema.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet uses a scripts folder, C:\Work\scripts, as the Source parameter. Scripts folders are a representation of a database's schema. They can be created by SQL Compare. If you're using SQL Source Control, your source control repository contains a scripts folder.</maml:para> <maml:para>In this example, if the scripts folder includes tables that have been flagged as containing static data, this data will be ignored when generating the Database Release, because the -IgnoreStaticData parameter is specified.</maml:para> <maml:para>You can also specify a scripts folder as the Target parameter. However, if you do this, static data will always be ignored in the deployment.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 6 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" $options = "IgnoreComments, ObjectExistenceChecks, -ForceColumnOrder" New-DlmDatabaseRelease -Source $test -Target $staging -SQLCompareOptions $options</dev:code> <dev:remarks> <maml:para>This example shows how to specify the SQL Compare options that are used when generating the update script and running pre- and post-deploy checks.</maml:para> <maml:para>In this example, the $options variable specifies that IgnoreComments and ObjectExistenceChecks should be included in addition to the default set of SQL Compare options used by DLM Automation. The minus sign before ForceColumnOrder indicates that this default option will be turned off.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 7 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" $filter = "C:\Work\MyFilter.scpf" New-DlmDatabaseRelease -Source $test -Target $staging -FilterPath $filter</dev:code> <dev:remarks> <maml:para>This example shows how to use a specific filter file to include/exclude database objects when generating the update script, overriding any filter file present in the source schema.</maml:para> <maml:para>MyFilter.scpf defines which database objects are considered when the update script is generated. If this update is used, the filters will also be used in pre- and post-schema comparisons.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 8 ----------</maml:title> <dev:code>$staging1 = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $staging2 = New-DlmDatabaseConnection -ServerInstance "staging02\sql2014" -Database "Staging2" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" New-DlmDatabaseRelease -Source $test -Target @($staging1, $staging2)</dev:code> <dev:remarks> <maml:para>This example shows how to check that the schemas of several databases are the same, and then create a Database Release that can update any of the databases.</maml:para> <maml:para>The Target parameter of the New-DlmDatabaseRelease cmdlet uses a list containing the Database Connections, $staging1 and $staging2. Before it creates the Database Release, New-DlmDatabaseRelease checks that the databases in the list have the same schema. This is useful for making sure the databases you want to deploy to are all in the same state.</maml:para> <maml:para>If the Target databases are not in the same state, the cmdlet will fail. You must then either:</maml:para> <maml:para>- run the New-DlmDatabaseRelease cmdlet for each database separately. This creates a separate Database Release for each database.</maml:para> <maml:para>- update all the databases to the same state. You can then run the New-DlmDatabaseRelease cmdlet again using a list containing all the databases.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 9 ----------</maml:title> <dev:code>$staging1 = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" $staging2 = "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" New-DlmDatabaseRelease -Source $test -Target @($staging1, $staging2)</dev:code> <dev:remarks> <maml:para>This example shows how to specify different types of database schema source as the Target parameter.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet uses a list containing $staging1 and $staging2 as the Target parameter. $staging1 is a Database Connection object. $staging2 is a scripts folder. The New-DlmDatabaseRelease cmdlet checks that the database schemas are the same, and then creates the Database Release. If $staging2 contains a Filter.scpf filter file, this will be applied when checking that the database schemas are the same.</maml:para> <maml:para>The list can contain a combination of any of the following: a Database Connection object; a database connection string; a NuGet package; a DatabasePackage object produced by the New-DlmDatabasePackage cmdlet; and a scripts folders.</maml:para> <maml:para>If the Target parameter is a Database Connection object or string, and the Source parameter is a NuGet package or scripts folder, then static data will be included when generating the Database Release.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Use-DlmDatabaseRelease --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Use-DlmDatabaseRelease</command:name> <command:verb>Use</command:verb> <command:noun>DlmDatabaseRelease</command:noun> <maml:description> <maml:para>Uses the DatabaseRelease object produced by the New-DlmDatabaseRelease cmdlet to update a target database schema to match the source schema.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Use-DlmDatabaseRelease cmdlet executes the SQL update script inside the database deployment resources produced by the New-DlmDatabaseReleaseCommand cmdlet. This updates the target database to the same state as the schema source specified in the DatabaseRelease object.</maml:para> <maml:para>Before executing the script, DLM Automation first checks that the target database schema matches the target schema defined in the DatabaseRelease object. If the schemas don't match, DLM Automation will then check if the target database schema matches the source schema specified in the Use-DlmDatabaseRelease cmdlet. (This is to check if the update has already been applied and the target schema is already in the desired state). If these schemas also don't match, the cmdlet fails. If the checks show the target schema is already in the desired state, DLM Automation will skip running the SQL update script and the cmdlet will finish. To turn off these checks, use the SkipPreUpdateSchemaCheck parameter.</maml:para> <maml:para>The Use-DlmDatabaseRelease cmdlet then executes the SQL script to update the target database. It logs any errors that occur in the execution, but will continue executing the whole script unless the connection to the database is broken (for example, if the database goes offline).</maml:para> <maml:para>After executing the script, the cmdlet checks that the target database schema has updated correctly to the 'Source' schema specified in the New-DlmDatabaseRelease cmdlet. If the schema hasn't updated correctly, the cmdlet returns an error message. To turn off this check use the SkipPostUpdateSchemaCheck parameter.</maml:para> <maml:para>By default, DLM Automation deploys static data contained in a NuGet package, scripts folder or zip file; no data will be deployed from a live data source. The pre-update and post-update schema checks also check for differences in static data. To turn off the deployment of static data and to exclude static data from the schema checks, add IgnoreStaticData to the New-DlmDatabaseRelease command. For more information about static data, see http://www.red-gate.com/dlma/staticdata.</maml:para> <maml:para>If the database deployment resources contain a filter, this will be applied to the pre-deployment and post-deployment schema checks; only differences between objects included by the filter will cause the check to fail. For more information about filters, see http://www.red-gate.com/dlma/filters.</maml:para> <maml:para>The SQL Compare options specified in the DatabaseRelease object will be used in the schema comparison checks before and after running the update. For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: AbortOnWarningLevel --> <command:syntaxItem> <maml:name>Use-DlmDatabaseRelease</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DeployTo --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DeployTo</maml:name> <maml:description> <maml:para>A Database Connection object or database connection string that identifies the target database to be updated. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release execution operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: DisableMonitorAnnotation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableMonitorAnnotation</maml:name> <maml:description> <maml:para>Don't add annotations to the event log for SQL Monitor.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the update script. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPostUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPostUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Don't check that the target database has the correct schema after the update has run.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPreUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPreUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Before running the update script, don't check that the target database has the correct schema or that the target database has already been updated.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> <command:parameterValue required="true">IReleaseArtifact</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: DeployTo --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>DeployTo</maml:name> <maml:description> <maml:para>A Database Connection object or database connection string that identifies the target database to be updated. See New-DlmDatabaseConnection for details.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SkipPreUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPreUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Before running the update script, don't check that the target database has the correct schema or that the target database has already been updated.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SkipPostUpdateSchemaCheck --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SkipPostUpdateSchemaCheck</maml:name> <maml:description> <maml:para>Don't check that the target database has the correct schema after the update has run.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the update script. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the release execution operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'None'.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: DisableMonitorAnnotation --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableMonitorAnnotation</maml:name> <maml:description> <maml:para>Don't add annotations to the event log for SQL Monitor.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The Release Artifact to be deployed.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" -Username "AutomationUser" -Password "P@ssw0rd" $package = "C:\Work\packages\MyDatabase.1.0.0.nupkg" $update = New-DlmDatabaseRelease -Source $package -Target $staging Use-DlmDatabaseRelease $update -DeployTo $staging</dev:code> <dev:remarks> <maml:para>This example shows how to update a database to the schema contained in a NuGet package, MyDatabase.1.0.0.nupkg.</maml:para> <maml:para>The New-DlmDatabaseRelease cmdlet creates the database deployment resources. It uses the database, Staging, as the Target parameter: this is the schema to be updated. It uses a NuGet package containing a scripts folder, database.nupkg, as the Source parameter: this is the schema that Staging will be updated to.</maml:para> <maml:para>The DatabaseRelease object, $update, is then passed to the Use-DlmDatabaseRelease cmdlet. This cmdlet runs the SQL update script contained in $update, which updates Staging to the schema contained in database.nupkg.</maml:para> <maml:para>Before running the SQL update script, Use-DlmDatabaseRelease checks that Staging still has the same schema that it did at the time that $update was created. It then runs the script, and afterwards, checks that the update was successful and that Staging has the correct new schema.</maml:para> <maml:para>If $package contains static data, DLM Automation will deploy it to the $staging database. The pre-deployment and post-deployment schema checks also check for differences in static data. To turn off the deployment of static data and to exclude static data from the schema checks, add the IgnoreStaticData parameter to New-DlmDatabaseRelease.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$production = New-DlmDatabaseConnection -ServerInstance "prod01\sql2014" -Database "Production" -Username "AutomationUser" -Password "P@ssw0rd" $build = Import-DlmDatabasePackage "C:\Work\packages\DatabaseBuildArtifact.1.0.0.nupkg" $update = New-DlmDatabaseRelease -Source $build -Target $production Use-DlmDatabaseRelease $update -DeployTo $production</dev:code> <dev:remarks> <maml:para>This example shows how to update a database to the schema contained in a Redgate Database Build Artifact, DatabaseBuildArtifact.1.0.0.nupkg.</maml:para> <maml:para>This cmdlet runs the targeted deployment script contained in the RedgateDatabaseReleaseArtifact, which updates the database "Production".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" -Username "AutomationUser" -Password "P@ssw0rd" $package = "C:\Work\packages\MyDatabase.1.0.0.nupkg" $update = New-DlmDatabaseRelease -Source $package -Target $staging Use-DlmDatabaseRelease $update -DeployTo $staging -SkipPostUpdateSchemaCheck</dev:code> <dev:remarks> <maml:para>This example shows how to skip the post-deployment check that verifies the target database matches the source.</maml:para> <maml:para>The Use-DlmDatabaseRelease cmdlet updates the database, Staging, to match the schema contained in the NuGet package, database.nupkg. The SkipPostUpdateSchemaCheck parameter is used to skip the post-update schema check.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$staging = New-DlmDatabaseConnection -ServerInstance "staging01\sql2014" -Database "Staging" -Username "AutomationUser" -Password "P@ssw0rd" Import-DlmDatabaseRelease -Path "C:\Work\DatabaseRelease" | Use-DlmDatabaseRelease -DeployTo $staging</dev:code> <dev:remarks> <maml:para>This example shows how to use the Import-DlmDatabaseRelease cmdlet to import the database deployment resources from a folder created previously by the Export-DlmDatabaseRelease cmdlet. The database, Staging, is updated to the schema specified by the DatabaseRelease object.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Sync-DlmDatabaseSchema --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Sync-DlmDatabaseSchema</command:name> <command:verb>Sync</command:verb> <command:noun>DlmDatabaseSchema</command:noun> <maml:description> <maml:para>Updates a target database schema to match a source database schema.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Sync-DlmDatabaseSchema cmdlet updates a target database to match a source database schema.</maml:para> <maml:para>The source schema can be a database connection, a NuGet package, or a scripts folder. The target schema must be a database connection.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: AbortOnWarningLevel --> <command:syntaxItem> <maml:name>Sync-DlmDatabaseSchema</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The source database schema used to update the target database. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target database to be updated. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the sync operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'High'.</maml:para> <maml:para>This parameter can't be used in addition to the Force parameter.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>High</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Use this parameter to specify a filter file to be used when performing the sync operation. This will override any Filter.scpf file in the source.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation, by default it will drop all additional objects in the target database.</maml:para> <maml:para>If you specify this parameter, additional objects will be ignored.</maml:para> <maml:para>Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Use this parameter to force the SQL Compare engine to ignore any parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation and the source is a NuGet package or a scripts folder, by default it will include static data flagged by SQL Source Control.</maml:para> <maml:para>If you specify this parameter, static data will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries during the sync operation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when performing the sync operation. DLM Automation applies a default set of options (listed below). To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the sync operation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> <!-- Parameter set: Force --> <command:syntaxItem> <maml:name>Sync-DlmDatabaseSchema</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The source database schema used to update the target database. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target database to be updated. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Use this parameter to specify a filter file to be used when performing the sync operation. This will override any Filter.scpf file in the source.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to prevent the sync operation from aborting regardless of any warnings.</maml:para> <maml:para>An alternative way of doing this is to set the AbortOnWarningLevel to 'None'.</maml:para> <maml:para>This parameter can't be used in addition to the AbortOnWarningLevel parameter.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation, by default it will drop all additional objects in the target database.</maml:para> <maml:para>If you specify this parameter, additional objects will be ignored.</maml:para> <maml:para>Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Use this parameter to force the SQL Compare engine to ignore any parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation and the source is a NuGet package or a scripts folder, by default it will include static data flagged by SQL Source Control.</maml:para> <maml:para>If you specify this parameter, static data will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries during the sync operation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when performing the sync operation. DLM Automation applies a default set of options (listed below). To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the sync operation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Source</maml:name> <maml:description> <maml:para>The source database schema used to update the target database. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Target --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target database to be updated. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Use this parameter to specify a filter file to be used when performing the sync operation. This will override any Filter.scpf file in the source.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreStaticData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreStaticData</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation and the source is a NuGet package or a scripts folder, by default it will include static data flagged by SQL Source Control.</maml:para> <maml:para>If you specify this parameter, static data will be ignored.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreAdditional --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreAdditional</maml:name> <maml:description> <maml:para>When DLM Automation performs a sync operation, by default it will drop all additional objects in the target database.</maml:para> <maml:para>If you specify this parameter, additional objects will be ignored.</maml:para> <maml:para>Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.</maml:para> <maml:para>This parameter can't be used simultaneously with filter files.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when performing the sync operation. DLM Automation applies a default set of options (listed below). To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreTSQLT</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the sync operation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries during the sync operation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <!-- Parameter: AbortOnWarningLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AbortOnWarningLevel</maml:name> <maml:description> <maml:para>Use this parameter to set the minimum warning level that will cause the sync operation to abort.</maml:para> <maml:para>Valid warning severity levels are:</maml:para> <maml:para>- High</maml:para> <maml:para>- Medium</maml:para> <maml:para>- Low</maml:para> <maml:para>- Information</maml:para> <maml:para>- None (do not abort for any warnings)</maml:para> <maml:para>The default setting is 'High'.</maml:para> <maml:para>This parameter can't be used in addition to the Force parameter.</maml:para> <maml:para>Possible values: Information, Low, Medium, High, None</maml:para> </maml:description> <command:parameterValue required="true">WarningSeverity</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.WarningSeverity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>High</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Information</command:parameterValue> <command:parameterValue required="false" variableLength="false">Low</command:parameterValue> <command:parameterValue required="false" variableLength="false">Medium</command:parameterValue> <command:parameterValue required="false" variableLength="false">High</command:parameterValue> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to prevent the sync operation from aborting regardless of any warnings.</maml:para> <maml:para>An alternative way of doing this is to set the AbortOnWarningLevel to 'None'.</maml:para> <maml:para>This parameter can't be used in addition to the AbortOnWarningLevel parameter.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Use this parameter to force the SQL Compare engine to ignore any parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: DatabaseSyncResult --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.DatabaseSyncResult</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $test</dev:code> <dev:remarks> <maml:para>This example show how to update a test database to match a scripts folder.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$validatedScriptsFolder = Invoke-DlmDatabaseSchemaValidation "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" Sync-DlmDatabaseSchema -Source $validatedScriptsFolder -Target $test</dev:code> <dev:remarks> <maml:para>This example shows how to update a test database to match a validated scripts folder.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $test -AbortOnWarningLevel Medium</dev:code> <dev:remarks> <maml:para>This example shows how to abort the update if there are any warnings at medium level or above.</maml:para> <maml:para>Set the -AbortOnWarningLevel parameter to 'None' or use the Force parameter if you want the cmdlet to ignore all warnings.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" $syncResult = Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $test $syncResult.UpdateSql | Out-File -FilePath "C:\Export\update.sql"</dev:code> <dev:remarks> <maml:para>This example show how to write the updateScript that was run to a file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 5 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $test = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" -Username "AutomationUser" -Password "P@ssw0rd" $options = "IgnoreComments, ObjectExistenceChecks, -ForceColumnOrder" Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $test -SQLCompareOptions $options</dev:code> <dev:remarks> <maml:para>This example shows how to specify SQL Compare options to use when performing the sync operation.</maml:para> <maml:para>In this example, the $options variable specifies that the IgnoreComments and ObjectExistenceChecks options should be included in addition to the default set of SQL Compare options. The minus sign before the ForceColumnOrder parameter indicates that this default option will be turned off.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Invoke-DlmDatabaseSchemaValidation --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Invoke-DlmDatabaseSchemaValidation</command:name> <command:verb>Invoke</command:verb> <command:noun>DlmDatabaseSchemaValidation</command:noun> <maml:description> <maml:para>Validates a database project.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Invoke-DlmDatabaseSchemaValidation cmdlet validates a database project by checking the database can be built from scratch. It the validation is successful, the cmdlet creates an IProject object that represents the validated project.</maml:para> <maml:para>The cmdlet will throw an exception if the project cannot be deployed to an empty database.</maml:para> <maml:para>By default, the cmdlet creates a temporary copy of the database on LocalDB. Alternatively, you can use the TemporaryDatabaseServer parameter to specify a SQL Server instance for the temporary database. This is useful if your database uses features that aren't supported by LocalDB, such as Full-Text Search.</maml:para> <maml:para>If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, you can use the TemporaryDatabase parameter to specify an existing database.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: TemporaryDatabaseServer --> <command:syntaxItem> <maml:name>Invoke-DlmDatabaseSchemaValidation</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when validating the schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the script for validation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for validation. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB isn't present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the temporary deployment for validation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> <!-- Parameter set: TemporaryDatabase --> <command:syntaxItem> <maml:name>Invoke-DlmDatabaseSchemaValidation</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when validating the schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the script for validation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for validation. This can be:</maml:para> <maml:para>- an instance of a Database Connection object produced by the New-DlmDatabaseConnection cmdlet.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>If you use this parameter, all existing data on the temporary database will be lost.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the temporary deployment for validation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for validation. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB isn't present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for validation. This can be:</maml:para> <maml:para>- an instance of a Database Connection object produced by the New-DlmDatabaseConnection cmdlet.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>If you use this parameter, all existing data on the temporary database will be lost.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the script for validation. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the value specified is $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>For more information about SQL Compare options, see http://www.red-gate.com/dlma/compareoptions.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TransactionIsolationLevel --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransactionIsolationLevel</maml:name> <maml:description> <maml:para>Use this parameter to specify the isolation level for the transactions during the temporary deployment for validation. Permitted values are: Serializable, Snapshot, RepeatableRead, ReadCommitted and ReadUncommitted. The default level is Serializable.</maml:para> <maml:para>See http://msdn.microsoft.com/en-gb/library/ms173763.aspx for more details on transaction isolation levels.</maml:para> <maml:para>Possible values: Serializable, Snapshot, RepeatableRead, ReadCommitted, ReadUncommitted</maml:para> </maml:description> <command:parameterValue required="true">TransactionIsolationLevel</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Shared.Domain.TransactionIsolationLevel</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Serializable</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Serializable</command:parameterValue> <command:parameterValue required="false" variableLength="false">Snapshot</command:parameterValue> <command:parameterValue required="false" variableLength="false">RepeatableRead</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadCommitted</command:parameterValue> <command:parameterValue required="false" variableLength="false">ReadUncommitted</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when validating the schema.</maml:para> <maml:para>This parameter will be ignored if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries in the script for validation. The default value is 30 seconds. A value of zero indicates that no execution timeout will be enforced.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>Tells the SQL Compare engine to ignore parser errors.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: IProject --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $validatedSchema = $project | Invoke-DlmDatabaseSchemaValidation</dev:code> <dev:remarks> <maml:para>This example shows how to use the Invoke-DlmDatabaseSchemaValidation cmdlet to validate the schema and static data of a SQL Source Control project.</maml:para> <maml:para>A temporary copy of the database is created on LocalDB. If the project content is invalid, this operation will throw an exception. Otherwise, it will output an instance of an IProject object that can be used as the input for other DLM Automation cmdlets.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedProject = $project | Invoke-DlmDatabaseSchemaValidation</dev:code> <dev:remarks> <maml:para>This example shows how to use the Invoke-DlmDatabaseSchemaValidation cmdlet to validate the Redgate Database Project.</maml:para> <maml:para>A temporary copy of the database is created on LocalDB. If the project content is invalid, this operation will throw an exception. Otherwise, it will output an instance of an IProject object that can be used as the input for other DLM Automation cmdlets.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedSchema = $project | Invoke-DlmDatabaseSchemaValidation -TemporaryDatabaseServer "Data Source=temp01\sql2014"</dev:code> <dev:remarks> <maml:para>This example shows how to specify a SQL Server instance for the temporary database, instead of using LocalDB.</maml:para> <maml:para>This is useful if your database uses features that aren't supported by LocalDB, such as Full-Text Search.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $temporaryDatabase = New-DlmDatabaseConnection -ServerInstance "temp01\sql2014" -Database "TemporaryDb" $validatedSchema = $project | Invoke-DlmDatabaseSchemaValidation -TemporaryDatabase $temporaryDatabase</dev:code> <dev:remarks> <maml:para>This example shows how to specify an existing SQL Server database to use for the validation.</maml:para> <maml:para>This is useful if you don't want to use LocalDB and you don't have permission to create a database on the SQL Server instance.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 5 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $options = "IgnoreComments, ObjectExistenceChecks, -IgnoreUserProperties" $validatedSchema = $project | Invoke-DlmDatabaseSchemaValidation -SQLCompareOptions $options</dev:code> <dev:remarks> <maml:para>This example shows how to specify SQL Compare options to be used when creating the script for validation.</maml:para> <maml:para>The $options variable is used to specify that the IgnoreComments and ObjectExistenceChecks options should be included in addition to the default set of SQL Compare options used by this cmdlet. The minus sign before IgnoreUserProperties indicates that this default option will be turned off.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Export-DlmDatabaseTestResults --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Export-DlmDatabaseTestResults</command:name> <command:verb>Export</command:verb> <command:noun>DlmDatabaseTestResults</command:noun> <maml:description> <maml:para>Exports a TestResults object to disk.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Export-DlmDatabaseTestResults cmdlet takes a TestResults results object produced by the Invoke-DlmDatabaseTests cmdlet and exports it to a JUnit or MsTest file.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Export-DlmDatabaseTestResults</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The TestResults object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">TestResults</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.TestResults</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: OutputFile --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFile</maml:name> <maml:description> <maml:para>The file path to export the TestResults to.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to overwrite any existing file specified by OutputFile.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The format of the TestResults file. This can be JUnit or MsTest.</maml:para> <maml:para>If you don't use this parameter, or if you set it to Default, the format will be chosen automatically depending on the file extension of the OutputFile.</maml:para> <maml:para>Possible values: Default, JUnit, MsTest</maml:para> </maml:description> <command:parameterValue required="true">TestResultsFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.Export.TestResultsFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">JUnit</command:parameterValue> <command:parameterValue required="false" variableLength="false">MsTest</command:parameterValue> </command:parameterValueGroup> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The TestResults object to be exported.</maml:para> </maml:description> <command:parameterValue required="true">TestResults</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.TestResults</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: OutputFile --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFile</maml:name> <maml:description> <maml:para>The file path to export the TestResults to.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Format --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Format</maml:name> <maml:description> <maml:para>The format of the TestResults file. This can be JUnit or MsTest.</maml:para> <maml:para>If you don't use this parameter, or if you set it to Default, the format will be chosen automatically depending on the file extension of the OutputFile.</maml:para> <maml:para>Possible values: Default, JUnit, MsTest</maml:para> </maml:description> <command:parameterValue required="true">TestResultsFormat</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.Export.TestResultsFormat</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" variableLength="false">JUnit</command:parameterValue> <command:parameterValue required="false" variableLength="false">MsTest</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Force --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Use this parameter to overwrite any existing file specified by OutputFile.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.TestResults</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The TestResults object to be exported.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$testResultsFile = "C:\Export\scripts.junit.xml" $results = Invoke-DlmDatabaseTests "C:\Work\Scripts" Export-DlmDatabaseTestResults $results -OutputFile $testResultsFile</dev:code> <dev:remarks> <maml:para>This example demonstrates the simplest use of Export-DlmDatabaseTestResults, only specifying the OutputFile parameter to export the results of the tests to a JUnit file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$testResultsFile = "C:\Export\scripts.xml" Invoke-DlmDatabaseTests "C:\Work\Scripts" | Export-DlmDatabaseTestResults -OutputFile $testResultsFile -Format MSTest</dev:code> <dev:remarks> <maml:para>This example shows how to specify the format of the test results file. This can be JUnit or MSTest.</maml:para> <maml:para>If you don't use the Format parameter, or if you set it to Default, the format will be chosen automatically depending on the file extension of the OutputFile.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$testResultsFile = "C:\Export\scripts.junit.xml" $results = Invoke-DlmDatabaseTests "C:\Work\Scripts" Export-DlmDatabaseTestResults $results -OutputFile $testResultsFile -Force</dev:code> <dev:remarks> <maml:para>This example shows how to overwrite an existing test results file using the Force parameter.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Invoke-DlmDatabaseTests --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Invoke-DlmDatabaseTests</command:name> <command:verb>Invoke</command:verb> <command:noun>DlmDatabaseTests</command:noun> <maml:description> <maml:para>Runs the tSQLt tests on a database schema.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Invoke-DlmDatabaseTests cmdlet executes the tSQLt tests on a database schema. The schema can be a scripts folder, a NuGet package or a database. It creates a TestResults object that represents the results of the tests.</maml:para> <maml:para>If you use a database connection as the input, the cmdlet will run the tests directly on the specified database.</maml:para> <maml:para>If you use a scripts folder or a NuGet package as the input, by default the cmdlet will create a temporary database on LocalDB to run the tests on. Alternatively, you can use the TemporaryDatabaseServer parameter to specify a SQL Server instance to create the temporary database on. This is useful if your database uses features that aren't supported by LocalDB, such as Full-Text Search. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, you can use the TemporaryDatabase parameter to specify an existing database.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: TemporaryDatabaseServer --> <command:syntaxItem> <maml:name>Invoke-DlmDatabaseTests</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The schema to run the tSQLt tests on.</maml:para> <maml:para>This can be a scripts folder, a NuGet package or a database connection. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when generating the database to test against.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>If the SQL Compare engine should ignore parser errors when creating the test database. This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IncludeTestData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeTestData</maml:name> <maml:description> <maml:para>Use this parameter to add random data to the test database.</maml:para> <maml:para>You can have more control over the data being added, by using the SQLDataGeneratorProject parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries when creating the test database. The default value is 30 seconds for queries and 900 seconds for the test run. A value of zero indicates that no execution timeout will be enforced.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: RunOnly --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunOnly</maml:name> <maml:description> <maml:para>Use this parameter to run a specific test or a specific test suite. If you don't use this parameter, every test will be run.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the test database. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>See http://www.red-gate.com/dlma/compareoptions for a complete list of SQL Compare options supported by DLM Automation.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLDataGeneratorProject --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLDataGeneratorProject</maml:name> <maml:description> <maml:para>Use this parameter to specify a SQL Data Generator project file (.sqlgen) that defines the data to be added to the test database.</maml:para> <maml:para>To add random data to the test database, use the IncludeTestData parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for testing. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB is not present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary, randomly-named database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: TemporaryDatabase --> <command:syntaxItem> <maml:name>Invoke-DlmDatabaseTests</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The schema to run the tSQLt tests on.</maml:para> <maml:para>This can be a scripts folder, a NuGet package or a database connection. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when generating the database to test against.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>If the SQL Compare engine should ignore parser errors when creating the test database. This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: IncludeTestData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeTestData</maml:name> <maml:description> <maml:para>Use this parameter to add random data to the test database.</maml:para> <maml:para>You can have more control over the data being added, by using the SQLDataGeneratorProject parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries when creating the test database. The default value is 30 seconds for queries and 900 seconds for the test run. A value of zero indicates that no execution timeout will be enforced.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: RunOnly --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunOnly</maml:name> <maml:description> <maml:para>Use this parameter to run a specific test or a specific test suite. If you don't use this parameter, every test will be run.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the test database. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>See http://www.red-gate.com/dlma/compareoptions for a complete list of SQL Compare options supported by DLM Automation.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLDataGeneratorProject --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLDataGeneratorProject</maml:name> <maml:description> <maml:para>Use this parameter to specify a SQL Data Generator project file (.sqlgen) that defines the data to be added to the test database.</maml:para> <maml:para>To add random data to the test database, use the IncludeTestData parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for testing. This can be:</maml:para> <maml:para>- a database connection object that contains the connection details for a database. See New-DlmDatabaseConnection for details.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The schema to run the tSQLt tests on.</maml:para> <maml:para>This can be a scripts folder, a NuGet package or a database connection. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IncludeTestData --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IncludeTestData</maml:name> <maml:description> <maml:para>Use this parameter to add random data to the test database.</maml:para> <maml:para>You can have more control over the data being added, by using the SQLDataGeneratorProject parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: SQLDataGeneratorProject --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLDataGeneratorProject</maml:name> <maml:description> <maml:para>Use this parameter to specify a SQL Data Generator project file (.sqlgen) that defines the data to be added to the test database.</maml:para> <maml:para>To add random data to the test database, use the IncludeTestData parameter instead.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: RunOnly --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunOnly</maml:name> <maml:description> <maml:para>Use this parameter to run a specific test or a specific test suite. If you don't use this parameter, every test will be run.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabaseServer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabaseServer</maml:name> <maml:description> <maml:para>The connection string for the temporary database server used for testing. For example, 'Data Source=TempServer01'.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB is not present, use this parameter to specify an alternative SQL Server instance for the temporary database.</maml:para> <maml:para>Using this option, DLM Automation will create a temporary, randomly-named database on the specified SQL Server instance.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabase parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseServerConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseServerConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemporaryDatabase --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemporaryDatabase</maml:name> <maml:description> <maml:para>The details of the temporary database used for testing. This can be:</maml:para> <maml:para>- a database connection object that contains the connection details for a database. See New-DlmDatabaseConnection for details.</maml:para> <maml:para>- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> <maml:para>By default, DLM Automation uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.</maml:para> <maml:para>You can't use this parameter in addition to the TemporaryDatabaseServer parameter.</maml:para> </maml:description> <command:parameterValue required="true">DatabaseConnection</command:parameterValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaSources.DatabaseConnection</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: SQLCompareOptions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SQLCompareOptions</maml:name> <maml:description> <maml:para>Specifies the SQL Compare options to use when creating the test database. DLM Automation applies a default set of options, listed below. To include additional options, specify a comma-delimited list of the option names (eg 'IgnoreComments, ObjectExistenceChecks'). To turn off a default option, precede the option name with a minus sign (eg '-ForceColumnOrder').</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> <maml:para>By default, the following Compare options are used:</maml:para> <maml:para>- ConsiderNextFilegroupInPartitionSchemes</maml:para> <maml:para>- DecryptPost2KEncryptedObjects</maml:para> <maml:para>- DoNotOutputCommentHeader</maml:para> <maml:para>- ForceColumnOrder</maml:para> <maml:para>- IgnoreCertificatesAndCryptoKeys</maml:para> <maml:para>- IgnoreDatabaseAndServerName</maml:para> <maml:para>- IgnoreUsersPermissionsAndRoleMemberships</maml:para> <maml:para>- IgnoreUserProperties</maml:para> <maml:para>- IgnoreWhiteSpace</maml:para> <maml:para>- IgnoreWithElementOrder</maml:para> <maml:para>- IncludeDependencies</maml:para> <maml:para>- ThrowOnFileParseFailed</maml:para> <maml:para>- UseCompatibilityLevel</maml:para> <maml:para>See http://www.red-gate.com/dlma/compareoptions for a complete list of SQL Compare options supported by DLM Automation.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: FilterPath --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilterPath</maml:name> <maml:description> <maml:para>The path to a .scpf filter file.</maml:para> <maml:para>Overrides any Filter.scpf file present in the InputObject schema with an alternative filter file to be used when generating the database to test against.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection or if the value specified is either $null or empty.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: QueryBatchTimeout --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryBatchTimeout</maml:name> <maml:description> <maml:para>The execution timeout, in seconds, for each batch of queries when creating the test database. The default value is 30 seconds for queries and 900 seconds for the test run. A value of zero indicates that no execution timeout will be enforced.</maml:para> <maml:para>This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>30</dev:defaultValue> </command:parameter> <!-- Parameter: IgnoreParserErrors --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreParserErrors</maml:name> <maml:description> <maml:para>If the SQL Compare engine should ignore parser errors when creating the test database. This parameter will be ignored if the InputObject is a database connection.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.Object</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The schema to run the tSQLt tests on.</maml:para> <maml:para>This can be a scripts folder, a NuGet package or a database connection. This can be:</maml:para> <maml:para>- a Database Connection object created by the New-DlmDatabaseConnection cmdlet</maml:para> <maml:para>- a database connection string</maml:para> <maml:para>- a path for a NuGet package or .zip file. This must contain a scripts folder located at db\state</maml:para> <maml:para>- a Database Package object produced by the New-DlmDatabasePackage cmdlet</maml:para> <maml:para>- a path for a scripts folder, created by SQL Compare or from your SQL Source Control database repository</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: TestResults --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.SchemaTesting.TestResults</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$database = New-DlmDatabaseConnection -ServerInstance "test01\sql2014" -Database "Test" $testResults = Invoke-DlmDatabaseTests $database</dev:code> <dev:remarks> <maml:para>This example shows how to use the Invoke-DlmDatabaseTests cmdlet to run tSQLt tests on a database.</maml:para> <maml:para>The output will be a TestResults object, which contains the test results.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $testResults = Invoke-DlmDatabaseTests $scriptsFolder</dev:code> <dev:remarks> <maml:para>This example shows how to use the Invoke-DlmDatabaseTests cmdlet to run tSQLt tests for a scripts folder.</maml:para> <maml:para>The cmdlet will use LocalDB to run the tests on.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 3 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $testResults = Invoke-DlmDatabaseTests $scriptsFolder -IncludeTestData</dev:code> <dev:remarks> <maml:para>This example shows how to add random test data before the tests are run.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 4 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $testResults = Invoke-DlmDatabaseTests $scriptsFolder -SqlDataGeneratorProject 'C:\Work\DataGeneratorProject.sqlgen'</dev:code> <dev:remarks> <maml:para>This example shows how to add test data defined by a SQL Data Generator project file (.sqlgen).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 5 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $testResults = Invoke-DlmDatabaseTests $scriptsFolder -RunOnly "[SQLCop].[test Unnamed Constraints]"</dev:code> <dev:remarks> <maml:para>This example shows how to run the single test "[SQLCop].[test Unnamed Constraints]".</maml:para> <maml:para>To run all tests in a single test suite, use the RunOnly parameter to specify the name of the test suite. For example: "[SQLCop]".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 6 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $testResults = $scriptsFolder | Invoke-DlmDatabaseTests -TemporaryDatabaseServer "Data Source=temp01\sql2014"</dev:code> <dev:remarks> <maml:para>This example shows how to specify a SQL Server instance for the temporary database, instead of using LocalDB.</maml:para> <maml:para>This is useful if you don't want to use LocalDB because your database uses features that aren't supported by LocalDB, such as Full-Text Search.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 7 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $temporaryDatabase = New-DlmDatabaseConnection -ServerInstance "temp01\sql2014" -Database "TemporaryDb" $testResults = $scriptsFolder | Invoke-DlmDatabaseTests -TemporaryDatabase $temporaryDatabase</dev:code> <dev:remarks> <maml:para>This example shows how to specify an existing SQL Server database to use as the temporary database, instead of using LocalDB.</maml:para> <maml:para>This is useful if you don't want to use LocalDB and you don't have permission to create a database on the SQL Server instance.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 8 ----------</maml:title> <dev:code>$scriptsFolder = "C:\Work\scripts" $options = "IgnoreComments, ObjectExistenceChecks, -IgnoreUserProperties" $testResults = $scriptsFolder | Invoke-DlmDatabaseTests -SQLCompareOptions $options</dev:code> <dev:remarks> <maml:para>This example shows how to specify SQL Compare options to use when creating the test database.</maml:para> <maml:para>In this example, the $options variable is used to specify that the IgnoreComments and ObjectExistenceChecks options should be included in addition to the default set of SQL Compare options used by this cmdlet. The minus sign before IgnoreUserProperties indicates that this default option will be turned off.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: New-DlmManualDatabaseSchemaValidation --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-DlmManualDatabaseSchemaValidation</command:name> <command:verb>New</command:verb> <command:noun>DlmManualDatabaseSchemaValidation</command:noun> <maml:description> <maml:para>Wraps a project as if validated so that it can be packaged.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-DlmManualDatabaseSchemaValidation cmdlet takes a database project and creates an IProject object that represents the validated project.</maml:para> <maml:para>The cmdlet assumes you have validated the schema by other means and does not attempt to perform its own validation.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>New-DlmManualDatabaseSchemaValidation</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The path to the database project to validate.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: IProject --> <command:returnValue> <dev:type> <maml:name>RedGate.DLMAutomation.Compare.Domain.Projects.IProject</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>$project = "C:\Work\scripts" $validatedSchema = $project | New-DlmManualDatabaseSchemaValidation</dev:code> <dev:remarks> <maml:para>This example shows how to use the New-DlmManualDatabaseSchemaValidation cmdlet to obtain an IProject from a SQL Source Control Project which can be used to create a build artifact.</maml:para> <maml:para>It is recommended to use Invoke-DlmDatabaseSchemaValidation instead if you are able to - this cmdlet does not guarantee your project is actually valid, and your process may fail unexpectedly later if it is not. Please only use this cmdlet if you are certain that the changes you have made are applicable. This cmdlet will output an instance of a IProject object that can be used as the input for other DLM Automation cmdlets.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <dev:code>$project = "C:\Work\project\project.sqlproj" $validatedProject = $project | New-DlmManualDatabaseSchemaValidation</dev:code> <dev:remarks> <maml:para>This example shows how to use the New-DlmManualDatabaseSchemaValidation cmdlet to obtain an IProject from a Redgate Database Project which can be used to create a build artifact.</maml:para> <maml:para>It is recommended to use Invoke-DlmDatabaseSchemaValidation instead if you are able to - this cmdlet does not guarantee your project is actually valid, and your process may fail unexpectedly later if it is not. Please only use this cmdlet if you are certain that the changes you have made are applicable. This cmdlet will output an instance of a IProject object that can be used as the input for other DLM Automation cmdlets.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Register-DlmSerialNumber --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-DlmSerialNumber</command:name> <command:verb>Register</command:verb> <command:noun>DlmSerialNumber</command:noun> <maml:description> <maml:para>Activates DLM Automation using a valid serial number.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>To find your serial number, check your invoice or go to http://red-gate.com/myserialnumbers. If you don't provide a serial number, DLM Automation will automatically start a 28-day free trial the first time you use one of its cmdlets.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-DlmSerialNumber</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>Register-DlmSerialNumber 048-001-224164-5B49</dev:code> <dev:remarks> <maml:para>This example shows how to activate DLM Automation using a DLM Automation serial number.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Unregister-DlmSerialNumber --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Unregister-DlmSerialNumber</command:name> <command:verb>Unregister</command:verb> <command:noun>DlmSerialNumber</command:noun> <maml:description> <maml:para>Deactivates DLM Automation</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This unregisters a DLM Automation serial number previously registered on this machine.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Unregister-DlmSerialNumber</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <dev:code>Unregister-DlmSerialNumber</dev:code> <dev:remarks> <maml:para>This example shows how to deactivate DLM Automation.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <!-- Cmdlet: Register-RedgateDlmSerialNumber --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-RedgateDlmSerialNumber</command:name> <command:verb>Register</command:verb> <command:noun>RedgateDlmSerialNumber</command:noun> <maml:description> <maml:para>Activates DLM Automation using a valid serial number.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command is obsolete. It has been renamed 'Register-DlmSerialNumber'.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-RedgateDlmSerialNumber</maml:name> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>The DLM Automation serial number.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: None --> <command:returnValue> <dev:type> <maml:name>None</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>This command is obsolete. See the examples for 'Register-DlmSerialNumber' instead.</maml:para> </maml:introduction> <dev:code></dev:code> </command:example> </command:examples> </command:command> </helpItems> |