Domanda

When using vsdbcmd to deploy my database:

vsdbcmd.exe /a:Deploy /manifest:MyDatabase.deploymanifest

I Get:

SQL01268 .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur. SQL01268 An error occurred while the batch was being executed.

Which is fine, but it doesn't tell me where the dataloss will happen. In order to find out I have to use <DeployToScript>True</DeployToScript>, then load the script up to see:

IF EXISTS (select top 1 1 from [dbo].[MyTable]) RAISERROR ('Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT

Is there a way to get vsdbcmd to display this info when deploying direct to the DB without having to generate the sql first?

Thanks

È stato utile?

Soluzione

There is no way to do this, it's a bug (or missing feature). See Tom's comment to my question.

Altri suggerimenti

For me I was needed to empty my DB before deploying SQL

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top