Using SQL Server 2008 and I am doing a bit of schema construction within the Management Studio designer.
I produced a table early along the way known as "Animal", however made the decision to remove soon after. I erased it through the tree view in Management Studio (right-click remove).
Now I am late along the way, I must recreate the table "Animal" however with different fields.
The 2nd time round with Animal will get produced fine, however when I consider adding the table to my diagram I recieve the content "Table 'Animal' is marked for deletion, can't be included to the diagram or opened up within the table designer".
What is the deal? How do i make use of this table normally again and never are afflicted by older table naming conflicts?
Alternatively, when the table is marked for deletion, can one really invoke deletion in some way? Then recreate another table with similar title.
This can be a little annoying. Would appreciate any help.
I could fix this issue by closing SQL Management Studio and re-opening it. I wager simply cutting the bond towards the server and reinstating it might work.
Just Cutting the bond from SQL Management Studio didn't work. But restarting the SQL Management Studio labored. Still much better than restarting the machine.
What labored: restarting.
Restarting the whole computer labored.
Simply restarting the db server did not work, but restarting the whole machine did.
I've no clue why!
I understand this really is old, however i discovered this same issue. I discovered the answer here:
which essentially states there's a choice within the "Tables and Database Designers" section known as "Prevent saving changes the require table re-creation" - if this is checked, you'll receive errors like you've requested about.
After I disabled this method, I could save my database diagram.
If you are while using schema tool, it might be better to recreate the schema. In my opinion I have discovered that tool to possess some odd eccentricities which have been fixed simply by re-creating the schema ( the graphical look at it, not the entire db :) )
From MSDN, to remove a table in the Visual Database Designer:
- Inside your database diagram, choose the table you need to remove.
- Right-click on the table and select Remove Table from Diagram in the shortcut menu.
Press the ESC key.
When the table has unsaved changes like a consequence of edits you've made within the database diagram, a note prompts you to definitely save the table before getting rid of it.
The table is taken away out of your diagram however it is constantly on the appear in the database.
So, to remove it, you will need to do this from script or object explorer (MSDN):
To remove a table in the database
- In Object Explorer, choose the table you need to remove.
- Right-click on the table and select Remove in the shortcut menu.
- A note box prompts you to definitely read the deletion. Click Yes.