SQL - Restore Database

Hi,
Whether we can restore only one SQL bak file in SQL - Restore Database?
I have like 6 sql bak files to restore in production server, and sometimes, it can be 3 or 4, depends upon the changes. How can I achieve this?

Greetings @ponprabhakars, thanks for reaching out! To make sure I understand the question correctly, you are asking if the SQL - Restore Database template is designed to restore a single database? If so, you’d like to know how you could configure things to restore a list of databases instead of a single one?

Regards,

Shawn

Hi @Shawn_Sesna,

Thanks for the reply.
Yes, you are right. I like to know how to configure a list of databases instead of a single database.

Thanks,
Prabha

Awesome, thanks for the clarification :slight_smile: One thought that comes to mind is to create a Runbook that takes in a Prompted Variable to use for the value of the database name. Create a second Runbook that takes in a prompted variable for a comma-delimited list for the list of database names and iterate through the list using a Script step to call the API to Run a Runbook passing in the prompted variable.

Another idea would be to save a copy of the SQL - Restore Database template and modify the Database parameter to be list of databases and iterate through the list calling the functions within the template.

Hope this helps!

Regards,

Shawn

1 Like

Gotcha. That answers my question. Using the Process template, we can restore only one database. By using the script we can run across all the databases.

Looks like the second idea is also can be achieved only by scripts.

Thank you @Shawn_Sesna.

Absolutely! Please let us know if you need anything else :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.