# Using Vault Compare

Vault Compare allows you to compare the configuration of two Vaults. This can be helpful when building a [Configuration Migration Package](/en/lr/36919/) or validating that environments are synchronized after package deployment.

<a href="https://platform.veevavault.help/assets/images/VaultCompare21R2.2.png" data-lightbox="VaultCompare21R2.2.png" data-title="" data-alt="Vault Compare">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/VaultCompare21R2.2.png" alt="Vault Compare" style="max-width: 400px;"  />
</a>

## Permission Dependencies

Vault Compare reports a difference when the configuration in one Vault grants both a controlling permission and its [dependent permissions](/en/lr/22824/#about-permission-dependencies), and the configuration in the other Vault grants only the controlling permission, even though the controlling permission implies the dependent permission. In this instance, the permissions in each Vault grant the same level of access, so you may ignore the permission difference for validation purposes.

Vault Compare reports a difference related to permission dependencies in the following examples:

* A permission is set to _Read_ and _Edit_ in one Vault and only _Edit_ in the other Vault. You can ignore this difference for validation purposes, because the _Edit_ permission implies the _Read_ permission.
* A permission is set to _Workflow: eSignature_ and _Workflow: Participate_ in one Vault and only _Workflow: eSignature_ in the other Vault. You can ignore this difference for validation purposes, because the _Workflow: eSignature_ permission implies the _Workflow: Participate_ permission. 

## How to Compare Vaults

To use Vault Compare:

  1. Navigate to **Admin > Deployment > Vault Compare**.
  2. Select a **Target Vault**. This is the Vault to compare against your current Vault.
  3. Select a [**Results Type**][2] to define what scope to include.
  4. Select a [**Details Type**][3] to define what level of detail to include.
  5. Optional: The **Include Documents & Binder Templates** checkbox makes document and binder templates available for comparison. Vault does not compare the content of document templates. To exclude these components, deselect this checkbox.
  6. Optional: The **Include Vault Settings** checkbox makes Vault settings available for comparison. To exclude these components, deselect the checkbox.
  7. Select the [**Component Types**][4] to include or ignore. To filter for specific types, use the **Search** box. To start over, click **Restore**.
  8. Optional: Select the **Generate Outbound Package** checkbox to create one or more [Outbound Packages](/en/lr/36919/) containing components that are different between the source Vault and target Vault or are missing in the target Vault.
  9. Click **Finish** to start the comparison. This process may take a while. When complete, you'll receive a notification with a link to download an Excel file of the comparison. If you selected the _Generate Outbound Package_ checkbox, the notification includes direct links to any resulting _Outbound Package_ records, or a link to a page of records if there are too many to display in the notification. If Vault encounters any component or configuration issues, the notification also includes a link to download an error log as a CSV file. If there are pending component updates, Vault places the report request in a queue and sends you a notification. Once component update processing is complete, Vault generates the report and sends another notification.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Vault may display differences in the Vault Compare report when comparing Vault Settings from a Limited Release Vault and a General Release Vault. For example, you may see differences in the report when a new setting is added to a Limited Release Vault but is not yet available for a General Release Vault.</p>
    </div>
  </div>
</div>



_Source_ or _Target_ value cells with more than 32,767 characters are truncated in the Excel file.



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Note that if the <a href="/en/lr/52053/"><em>Lifecycle Stage</em> (stage__sys) and <em>Lifecycle State Stage ID</em> (state_stage_id__sys)</a> fields are visible on any object page layout, there may be a Vault Compare difference. We recommend that you <a href="/en/lr/52053/">delete</a> those fields from the page layout to avoid this discrepancy.</p>
    </div>
  </div>
</div>



### Results Type {#results}

The _Results Type_ selection tells Vault Compare what scope to include:

  * **Differences Only** includes the differences between Vaults in the results.
  * **Complete** does not exclude configurations that are the same between the Vaults.

### Details Type {#details}

The _Details Type_ selection tells Vault Compare what level of detail to include:

  * **None** shows component-level details only.
  * **Simple** shows simple attribute-level details, for example, name, type, and label for a document lifecycle.
  * **Complex** shows simple and complex attribute-level details, for example, user actions configured on a document lifecycle.

### Component Types {#component}

See [Component Types](/en/lr/43899/) for the list of configuration elements that the Vault Compare feature supports.

## Related Permissions

Users with the standard _Vault Owner_ and _System Admin_ security profiles have the necessary permissions to use Vault Compare. If your organization uses custom security profiles, be sure to include these permissions:

<table class="wbord">
  <tr>
    <td>
      <strong>Type</strong>
    </td>
    <td>
      <strong>Permission Label</strong>
    </td>
    <td>
      <strong>Controls</strong>
    </td>
  </tr>
  <tr>
    <td>
      Security Profile
    </td>
    <td>
      Admin: Deployment: Environment: Vault Comparison
    </td>
    <td>
      Ability to access the Vault Compare feature.
    </td>
  </tr>
  <tr>
    <td>
      Security Profile
    </td>
    <td>
      Admin: Deployment: Migration Packages: Create
    </td>
    <td>
      Ability to select the <em>Generate Outbound Package</em> checkbox.
    </td>
  </tr>
</table>

 [2]: #results
 [3]: #details
 [4]: #component
