DacFxed.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <!-- Cmdlet: Publish-Database -->
  <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-Database</command:name>
      <command:verb>Publish</command:verb>
      <command:noun>Database</command:noun>
      <maml:description>
        <maml:para>The Publish-Database CmdLet takes a dacpac which is the output from an SSDT project and publishes it to a database. Changing the schema to match the dacpac and also to run any scripts in the dacpac (pre/post deploy scripts)</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Deploying a dacpac uses the DacFx which historically needed to be installed on a machine prior to use. In 2016 the DacFx was supplied by Microsoft as a nuget package and this uses that nuget package.</maml:para>
      <maml:para>One of the main features of the DacFx is that when deploying your dacpac's you have the ability to use deployment contributors which is awesome, however these have to be installed into the visual studio or sql server directory under program files which people may not have access to when deploying dacpacs. This module works around that and lets you specify the folder from where you want to load extensions.</maml:para>
      <maml:para>It will also hopefully stop people from having to write the same boilerpoint code to deploy a dacpac</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: PublishDatabase -->
      <command:syntaxItem>
        <maml:name>Publish-Database</maml:name>
        <!-- Parameter: DacpacPath -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>DacpacPath</maml:name>
          <maml:description>
            <maml:para>The path to the dacpac to deploy</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: PublishProfilePath -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>PublishProfilePath</maml:name>
          <maml:description>
            <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</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: DacFxExtensionsPath -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>DacFxExtensionsPath</maml:name>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: ScriptSavePath -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>ScriptSavePath</maml:name>
          <maml:description>
            <maml:para>The directory where you would like to save a copy of the deployment script to. The way this works is that we do a compare from the dacpac to the database, generate a script that will likely be used to upgrade the database but we do a separate compare/deploy for the actual deploy. The reason is that we want tp save the script but not run it manually. If someone edits the database between comparing and deploying then it could be different to the actual script 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>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: DacpacPath -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>DacpacPath</maml:name>
        <maml:description>
          <maml:para>The path to the dacpac to deploy</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: PublishProfilePath -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>PublishProfilePath</maml:name>
        <maml:description>
          <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</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: ScriptSavePath -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>ScriptSavePath</maml:name>
        <maml:description>
          <maml:para>The directory where you would like to save a copy of the deployment script to. The way this works is that we do a compare from the dacpac to the database, generate a script that will likely be used to upgrade the database but we do a separate compare/deploy for the actual deploy. The reason is that we want tp save the script but not run it manually. If someone edits the database between comparing and deploying then it could be different to the actual script 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: DacFxExtensionsPath -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>DacFxExtensionsPath</maml:name>
        <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 dacpac to deploy</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>The directory where you would like to save a copy of the deployment script to. The way this works is that we do a compare from the dacpac to the database, generate a script that will likely be used to upgrade the database but we do a separate compare/deploy for the actual deploy. The reason is that we want tp save the script but not run it manually. If someone edits the database between comparing and deploying then it could be different to the actual script run</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues />
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <dev:code>PS&gt; Publish-Database -DacpacPath $DacpacPath -PublishProfilePath $PublishProfilePath
PS&gt; Publish-Database -DacpacPath $DacpacPath -PublishProfilePath $PublishProfilePath -SaveScriptPath $directoryToCopyDeployScript
PS&gt; Publish-Database -DacpacPath $DacpacPath -PublishProfilePath $PublishProfilePath -DacFxExtensionPath $semiColonSeparatedListOfPathsToFindContributors</dev:code>
      </command:example>
    </command:examples>
  </command:command>
  <!-- Cmdlet: Get-DatabaseChanges -->
  <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>Get-DatabaseChanges</command:name>
      <command:verb>Get</command:verb>
      <command:noun>DatabaseChanges</command:noun>
      <maml:description>
        <maml:para>Get a list of differences between a dacpac and a database</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Compares a dacpac to a database and returns a list of changes that need to be made to the database to get the database in sync with the dacpac. This is the XML deployment report returned by the DacFx.</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: GetDatabaseChanges -->
      <command:syntaxItem>
        <maml:name>Get-DatabaseChanges</maml:name>
        <!-- Parameter: DacpacPath -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>DacpacPath</maml:name>
          <maml:description>
            <maml:para>The path to the dacpac to deploy</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: PublishProfilePath -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>PublishProfilePath</maml:name>
          <maml:description>
            <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</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: DacFxExtensionsPath -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>DacFxExtensionsPath</maml:name>
          <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: DacpacPath -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>DacpacPath</maml:name>
        <maml:description>
          <maml:para>The path to the dacpac to deploy</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: PublishProfilePath -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>PublishProfilePath</maml:name>
        <maml:description>
          <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</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: DacFxExtensionsPath -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>DacFxExtensionsPath</maml:name>
        <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 dacpac to deploy</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>The path to the publish profile. A publish profile contains lots of useful info like database name and any one of the hundreds of config options for deploying. If you do not have a publish profile use New-PublishProfile to generate a template that you can modify</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues />
  </command:command>
  <!-- Cmdlet: New-PublishProfile -->
  <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-PublishProfile</command:name>
      <command:verb>New</command:verb>
      <command:noun>PublishProfile</command:noun>
      <maml:description>
        <maml:para>The New-PublishProfile CmdLet generates a standard publish profile xml file that can be used by the DacFx (this and everything else) to control the deployment of your dacpac</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This generates a standard template XML which is enough to dpeloy a dacpac but it is highly recommended that you add additional options to the publish profile. If you use Visual Studio you can open a publish.xml file and use the ui to edit the file (right click on an SSDT project, choose "Publish" then "Load Profile" and load your profile or create a new one. Once you have loaded it in Visual Studio, clicking advanced shows you the list of options available to you.</maml:para>
      <maml:para>For a full list of options that you can add to the profile, google "sqlcmd.exe command line switches" and for each option in the format /p:Option=Value create a element called &lt;Option&gt;Value&lt;/Option&gt;</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: PublishProfile -->
      <command:syntaxItem>
        <maml:name>New-PublishProfile</maml:name>
        <!-- Parameter: PublishProfilePath -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>PublishProfilePath</maml:name>
          <maml:description>
            <maml:para>The path you would like to save the profile xml file</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: TargetConnectionString -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>TargetConnectionString</maml:name>
          <maml:description>
            <maml:para>The connection string to the database you are upgrading</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: TargetDatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
          <maml:name>TargetDatabaseName</maml:name>
          <maml:description>
            <maml:para>The database name you are targetting</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: PublishProfilePath -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>PublishProfilePath</maml:name>
        <maml:description>
          <maml:para>The path you would like to save the profile xml file</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: TargetDatabaseName -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>TargetDatabaseName</maml:name>
        <maml:description>
          <maml:para>The database name you are targetting</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: TargetConnectionString -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
        <maml:name>TargetConnectionString</maml:name>
        <maml:description>
          <maml:para>The connection string to the database you are upgrading</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 you would like to save the profile xml file</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>The database name you are targetting</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>The connection string to the database you are upgrading</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues />
  </command:command>
</helpItems>