0

We have been publishing database through SSDT. Facing one very strange error. It has dropped the table but primary key of that table is not deleted which is not letting new table be created with the same table & primary key name.

Our SQL Server addition does not allow DAC login it update the sys.objects table. I have attached screenshot where table name is blank .

enter image description here

  1. How this can be corrected?

  2. How this constraint can be deleted?

  3. Why such abnormal behavior?

107
  • 552
  • 3
  • 26
  • So, is your question just how to drop the constraint? (You can't just `DELETE` from anything in `INFORMATION_SCHEMA`; you'll need to use the normal `DROP CONSTRAINT ...`) – Matt Gibson Feb 11 '16 at 13:04
  • Run this query in the context of the QANirvanaClient database: `SELECT OBJECT_SCHEMA_NAME(parent_object_id) AS TableSchemaName , OBJECT_NAME(parent_object_id) AS TableName , * FROM sys.key_constraints WHERE name = N'PK_T_MW_RiskByEntity';`. Run `DBCC CHECKCATALOG` if the TableName returns NULL. – Dan Guzman Feb 11 '16 at 13:19

0 Answers0