SQL Server Mgmt Studio ruined my database!

It effectively ruined my day. I have more tables with many FK relationships between them. One of the tables (allows you to call table A) has a calculated column, which is calculated through UDF using a schema, and is also indexed with full-text.

If I edit any table (calls it to table B) that is somehow connected (for example, via FK) to a table with a full-text indexed calculated column (table A), and I save this, the following happens:

  • Changes to the table (table B) are saved
  • I get an error: "The column" abcd "is not indexed by full-text." regarding table A, which I didn’t even edit, and then “User canceled from save dialog”
  • All FK relationships with ALL TABLES from table B DELETED

What the hell is going on? Can someone explain to me how this can happen?

+3
source share
1 answer

I had the same problem. As Will A said, the management studio will take the following steps to update the table and its foreign keys:

  • Create a new table called temp _
  • Copy content from old table to new
  • Discard all constraints, indexes, and foreign keys
  • Delete old table
  • ,

3 , . . , , . , T-SQL.

script, , , .

@OMGPonies, , ? . , , . , WITH NOCHECK . , , , .

+2

Source: https://habr.com/ru/post/1754123/


All Articles