L'amico Grant ha preparato uno script che fa automaticamente il restore di tutti di DB di TFS...
Often I find myself restoring the 11 or so TFS databases. Usually I’m doing it for one of four things:
- Restoring in a VPC for development / testing
- Restoring to a second “development” server so that people can try things before they do them in production
- A disaster recovery rebuild (or exercise), or
- Moving the Data Tier to another server as part of an upgrade
If you find yourself in any of these situations, these docs are the most useful:
Usually I have a directory full of *.bak SQL Backup files and in the past I’ve either gone through the ‘Restore database’ wizard, or hand-written the SQL restore script. This week I invested the time to build a batch script that makes it a whole lot easier and repeatable.
...CUT...
You can use it in two ways:
- Pipe the output to a SQL file and load it in SQL Server Management Studio. e.g. RestoreDBs.cmd …. > restorescript.sql
- Uncomment the line that starts with “isql” and run it directly from the command line.
Copy & paste from above, or download the script here: RestoreTFSDBs.cmd
Fonte: Restoring TFS Databases Script