MSBuild Custom Task
How to implement MSbuild Custom Tasks: Part I, Part II
The built-in Exec task of MSBuild has quite a few limitations, so in order to invoke command line tools such as isql/sqlcmd in your build file, a recommended approach is to build your custom task base on ToolTask.