Use the Map Generation CLI action prepares your backups for future data retrieval.

You can use this CLI action to automatically generate virtual data files for specific backups on a routine basis. For example, you can schedule a SQL Server job that searches for new backup files and then generates the corresponding virtual data.

By building the virtual data before attempting to attach the backup file, you can decrease the time required to create the virtual database and get faster access to your data and objects. The larger the database is, the more time you can save by preparing your backups. For more information about virtual data files, review how SQL Virtual Database works.

Consider running this action on backups for mission-critical and sensitive databases, as well as databases that often require object recovery and data retrieval.

You can specify any of the following options:

  • Individual backup files from a single location
  • Striped back up files from multiple locations
  • Specific data sets contained in the backup files
  • Connection credentials
  • Password used to decrypt an encrypted SQL Safe backup file
  • Whether the SQL VDB CLI should retry this action when a network file error occurs

To see a detailed description of each option, enter sqlvdbcmd Map at the command prompt.

When to use map generation

You should use the Map Generation CLI action whenever you need to decrease the time required to create a virtual database. Consider using this action for the following types of backups:

  • Large SQL Server backups
  • SQL Safe 5.0 backups
  • SQL Safe 6.0 or later backups that were not run with the Generate metadata option enabled

Note that you can run this CLI action manually by opening the Windows Command Prompt, and then typing the appropriate command when the prompt displays.

To run the Map Generation CLI action in a job:

  1. Install the SQL VDB on the SQL Server computer that hosts the databases you routinely back up.
  2. Use Microsoft Management Studio to connect to the associated SQL Server instance.
  3. Create a new job for this instance.
  4. At the beginning of the job, insert a new step.
  5. Input the following minimum code for this step. Additional options are available.
    sqlvdbcmd Map MyFolder\MyBackupFiles\Name .bak -WindowsUsername targetdomain\account -WindowsPassword password
  6. Schedule the job to run on a routine basis, such as once a week during off-hours.
  7. Save the job.
  8. Test your update by manually running the job.


Need more help? Search the Idera Customer Support Portal

  • No labels