I am trying to create a TeamCity Build using CommandLine option. As there are more number of database objects, if i generate a complete database script by comparing Source Control and a BLANK database, the script fails due to dependency issues.
I have created 4 separate build steps for Tables, Views, Functions and Stored Procedures. Given below are the command parameters for the first two build steps just for reference.
Build Step 1
Build Step 2
If i execute one build step at a time (Manually disabling the other build steps), i am able to execute the build with out any issue.
If i have all the build steps enabled, it fails in Step 2 itself, exception was,
"[Step 2/4] Registering data sources
[Step 2/4] Error: A duplicate definition was found for the table [dbo].[*****].
[Step 2/4] Ensure that case sensitivity options are set correctly and all object creation
[Step 2/4] scripts are valid. If the problem persists, contact our support.
[Step 2/4] Process exited with code 126 "
The table name reported in the exception is different every time when i run the build. Please help me on this to get it resolved.. It will be a great help...