So we had an encrypted database that puked and killed our whole SQL Server setup. Sucks about our data, but we were smart enough to have our Data structure/Stored Procs/Functions in Git
The problem is they’re saved as .sql files.
Is there any way we can batch restore our schema from directories full of these files?
I’ve looked around and I can only find tutorials for restoring from .bak files or .mdf‘s. This isn’t the lazy man’s way out- I just need to find a solution ASAP. Any advice or resources/ anything at all would be greatly appreciated.
Thanks Interwebs,
Dylan
Considering the large size of the data structure I was trying restore, running each files individually was not a practical solution. I’m sure I could have written a bat fie, but I got it done pretty quickly in python: