201002190146『SQL2008』無法修改 Table 的 Design
如果你在 SQL 2008 發生已經設計好的資料表無法在修改,或是經由 Restore 、匯入的 Table 無法修改設計,這時你會看到下面的錯誤訊息
對話框的內容為「"Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created."」
緊接著畫面出現你取消動作的提示(這個畫面真多餘與無意義),因為你在上一個畫面也只能選 Cancel,因為「Save Text File」能做啥阿~
遇到這個問題不用擔心,很簡單的
這是因為 SQL 2008 的選項「Options」中,有一個選項是避免你誤修改資料表設計的保護。
請點選單「Tools」-> 選「Options」
然後找到「Designers」-> 「Table and Database Designers」,把「Prevent saving changes that require table re-creation」選項打勾拿掉,就ok了!
這樣就可以讓你修改你資料表的設計,而不會跳出錯誤訊息了,當然少了保護,你就得小心的不要做了錯誤的修改。
-----------------------
QQ:那下次修改資料表設計都沒問題了嗎?
A:「Prevent saving changes that require table re-creation」拿掉後,其實系統仍會提醒你(下圖),但已經可以做正常的儲存修改了。
~End