Often when we are testing the TFS Integration Platform or working with the hands-on-lab walkthroughs, we need to or want to reset the migration database to flush the state are re-start the migration or sync. So far the mechanism used involved an uninstall of the TFS Integration Platform and a re-install, which reset the database as part of the re-install. Functional, but not efficient.
Thanks to Hyung, we now have a small batch file we can run, which does the re-creation for us:
1: if "%1"=="/?" goto USAGE
2: if "%1"=="" goto USAGE
4: cd "C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn"
5: osql -E -i <foldername>\Setup\Installation\Tfs_IntegrationPlatform.sql -S %1 -n
7: goto END
10: echo dropAndDeployDB.cmd <servername>
Note that you may need to change line 4 to match your SQL Server installation and must change <foldername> in line 5 to the location where you stored the platform code base. Here is an extract showing the normal whereabouts of the Tfs_IntegrationPlatform.sql file: