How to run a script that will update/delete a value in the Vault Database

How to run a script that will update/delete a value in the Vault Database

143
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:51 PM


Objective


Once you receive the script zip file, it will contain either 4 files or 2 files:

  1. If the zip contains 4 files:
    • Script Password (.txt) - Contains the Password required to run the script
    • Readme file (.txt) - Contains the instructions to run the script
    • .ENC file – This is the actual script that runs on the Vault database. The file name typically follows this pattern: <Date>DBScriptName[<Number>].ENC
    • File indicating the script expiration date
  2. If the zip contains 2 files:
    • Instructions.txt – This file includes the script password, the KBA article to follow, and the script expiration date.
    • .ENC file – The script to run on the Vault database. Naming follows the pattern: <Date>DBScriptName[<Number>].ENC

⚠️ Important: Transfer the zip file to the Vault Server and extract the files before proceeding. ⚠️

The script typically takes just a few seconds to execute, but Vault downtime is required. We recommend scheduling a 30–60 minute maintenance window, in case any unexpected issues arise.

Depending on the Vault deployment (Standalone, HA, or Satellite), the procedure to stop/start PrivateArk Server will differ — see instructions below.



Environment


12.6;14.2;14.6 Privileged Access Manager (PAM, self-hosted) Vault

Procedure


⚠️ As mentioned, the script modifies the Vault database, so it is required to stop both the Primary and DR Vaults. ⚠️ 

 

  1. Make a backup of the Metadata folder:
    {drive}:\PrivateArk\Safes\Metadata
  2. Stop DR Replication to avoid automatic failover during downtime:
    1. Standalone DR Vault: Stop the CyberArk Disaster Recovery Service in `services.msc`.
    2. DR HA Cluster:
      1. First, stop the passive node using Cluster Vault Manager
      2. Then stop the active node.
  3. Stop the PrivateArk Server:
    1. Standalone: Stop the server using the PrivateArk Server Console
    2. HA Cluster:
      1. Stop the passive node first via Cluster Vault Manager to avoid failover.
      2. Then stop the active node 
    3. Satellite Vaults:
      1. First stop the satellites using the PrivateArk Server Console
      2. Then stop the Master Vault.
  4. Ensure the PrivateArk Database service is running:
    1. Standalone: Check `services.msc`. Start the service manually if needed.
    2. HA Cluster:
      1. Bring the shared disk online using the Disk Management Utility
      2. Then start the PrivateArk Database service via `services.msc`.
    3. Satellite: Check `services.msc`.
  5. Open an elevated Command Prompt
    1. Navigate to:
      {drive}:\Program Files (x86)\PrivateArk\Server
    2. Run:
      CAVaultManager.exe ExecuteDBScript
      image.png
  6. When prompted:
    Password for file decryption ==>
    Type the script password from the provided `.txt` file.
    ************
    2.png
  7. When prompted:
    Encrypted input script file path [mandatory] ==>
    Provide the full path to the `.ENC` file.
    1. Example:
      C:\Temp\202205191720DBScript[122].ENC
      🔍 *Note:* The number in brackets (e.g., `[122]`) may vary depending on the script you received.
      💡 If the path contains no spaces like in this example, quotation marks are not required.
  8. When prompted:
    1. Output results file path [mandatory] ==>
      image.png
      Provide the full path for the output log file.
      Example: C:\Temp\output.log
      ⚠️ Make sure the output directory is not marked as Read-Only. If reusing an existing output file, it must be writable (not marked Read-Only).
      💡If the path contains no spaces like in this example, quotation marks are not required.
      If the script runs correctly, you will see a success message in the terminal window:
      image.png
  9. Start the PrivateArk Server:
    1. Standalone: Use PrivateArk Server Console.
    2. HA Cluster:
      1. First stop the PrivateArk Database service via `services.msc`.
      2. Bring the shared disk offline.
      3. Open Cluster Vault Manager and start it – this should bring all services online.
      4. Don’t forget to also start the passive node.
    3. Satellite:
      1. Start the Master Vault first, then the satellites using the PrivateArk Server Console.
  10. Start DR Replication:
    1. Standalone DR Vault: Start the “CyberArk Disaster Recovery Service”.
    2. Satellite DR: Confirm that the DR service is running.
    3. DR HA Cluster: Start the active node, then the passive node.
  11. Confirm the script result:
    1. Verify that the intended values were updated or deleted.
    2. If you need help verifying this, please share the output file generated by the script with CyberArk Support.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000ksVCAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail