I want to make a bat script to detach SQL databases. I want it to prompt for a SQL instance and then what version number you want detached then to find the databases with a certain string for a name and then detach them.
Any help or a good guide to batch SQL commands would be great.