These documentation articles
and
Tell us how to restore individual databases. I want to restore all databases in the file list. Is there a way to do this programmatically from within the sqlcmd
without involving bash?
These documentation articles
and
Tell us how to restore individual databases. I want to restore all databases in the file list. Is there a way to do this programmatically from within the sqlcmd
without involving bash?
Based on what you want I would do the following:
List.txt
(with the list of DBs you want to
restore) and DBRestore.bat
with sqlcmd command to run a stored
procedure 'DBRestore' inside SQL Server
SQL Server
temp table the list from the LIST.txt
and processes it - reads DB name one by one and restores them
pwsh
in this instance. I'm running on Debian and hoping for a SQL-only solution, if one exists. In other wordspwsh
isn't really any better than bash.