I'm using trial version of Database Deployment Toolkit. I'm using automatical creation of stored procedures. When deploying to SQL server for first time, everything is running correctly. When deploying the same database to server again, I receive an error stating that "An error occurred while creating the stored procedure XY" and that "There is already an object named XY" - for all stored procedures. When I delete these procedures from SQL server, it runs correctly.
Is there any possibility to include something like "If exists then drop..."? Or is there any workaround?
Thanks
George
• 22.3.2008 10:19:04 -> Deploying meta-data for database 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Ensuring Filegroups exist on database 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Filegroup verification complete.• 22.3.2008 10:19:05 -> Ensuring Tables exist on database 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Table verification complete.• 22.3.2008 10:19:05 -> Dropping unneeded filegroups for 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Unneeded filegroups dropped on database 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Ensuring Indexes exist on database 'RCEL_Protocols'• 22.3.2008 10:19:05 -> Index verification complete.• 22.3.2008 10:19:05 -> Ensuring Foreign Keys exist on database 'RCEL_Protocols'• 22.3.2008 10:19:06 -> Foreign Key verification complete.• 22.3.2008 10:19:06 -> Ensuring Assemblies exist on database 'RCEL_Protocols'• 22.3.2008 10:19:06 -> Assembly verification complete.• 22.3.2008 10:19:06 -> Ensuring Views, Stored Procedures, and UDFs exist on database 'RCEL_Protocols'X 22.3.2008 10:19:06 -> An error occurred while deploying the meta-data to the server.X 22.3.2008 10:19:06 -> ArgumentException X 22.3.2008 10:19:06 -> Column 'Type' does not belong to table . X 22.3.2008 10:19:06 -> X 22.3.2008 10:19:06 -> Source : System.Data X 22.3.2008 10:19:06 -> X 22.3.2008 10:19:06 -> Stack Trace: X 22.3.2008 10:19:06 -> at System.Data.DataRow.GetDataColumn(String columnName) X 22.3.2008 10:19:06 -> at System.Data.DataRow.get_Item(String columnName) X 22.3.2008 10:19:06 -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DropAllDeployedViewsSprocsAndUdfs(DatabaseInfo dbInfo) X 22.3.2008 10:19:06 -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureViewsSprocsUdfs(Database parent, DatabaseInfo dbInfo) X 22.3.2008 10:19:06 -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureDatabases() X 22.3.2008 10:19:06 -> at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeployMetaDataThread() X 22.3.2008 10:19:06 ->
Then the execution doesn't stop but doesn't continue too.
I have then dropped the old database and tried new deployment - succesfully. Then again and again succesfully :-)
Thank You for this fix, it works!