Root Cause behind DBProject Error 628 TSD01261

by Valmik 4. November 2011 08:43

Most often when we deal with the multiple .sql files to be included in post-deployment script in a MS database project, We may encounter this problem and hence the project build gets broken. The error text reads something like:

Error 628 TSD01261: The syntax check failed 'Incorrect syntax near USE.' in the batch near 'USE [StagingData]
' .  0 0 StagingData


After some googling and some thinking(:)), I found the root cause. It errors out because it expects some separator between two files that are specified in post deployment script list specified with :r .\blah.sql

So each of the script file needs to end with the statement GO and it works perfectly fine.


Add comment

  Country flag
  • Comment
  • Preview

Tag cloud