SQL Server 2008數(shù)據(jù)格式修改時(shí)應(yīng)注意什么?
我們今天主要向大家講述的是在對SQL Server 2008 進(jìn)行數(shù)據(jù)格式修改之時(shí)沒有對按鈕進(jìn)行保存的實(shí)際情況的解決,同時(shí)我們?yōu)榱烁釉敿?xì)的對其進(jìn)行講解,我們已圖例演示的方式對其進(jìn)行說明。
如果你使用的是 SQL Server 2008, 當(dāng)你修改數(shù)據(jù)結(jié)構(gòu)后,保存時(shí)會(huì)報(bào)下圖情況:
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.
這是 SQL Server 2008 的一種自我保護(hù),當(dāng)你的修改可能導(dǎo)致數(shù)據(jù)表被刪除并重新創(chuàng)建時(shí)(dropped and re-created),就會(huì)有這個(gè)提醒。
導(dǎo)致表被重新創(chuàng)建可能是以下幾種情況:
在表中間添加一個(gè)新列;
刪除列
更改列為 Null 性
更改列的順序
更改列的數(shù)據(jù)類型
若要不使用這個(gè)保護(hù),需要在“工具”菜單中單擊“選項(xiàng)”,展開“設(shè)計(jì)器”,然后單擊“表設(shè)計(jì)器和數(shù)據(jù)庫設(shè)計(jì)器”。 清除“阻止保存要求重新創(chuàng)建表的更改”復(fù)選框。
on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.
如下圖:
參考資料:
Save (Not Permitted) Dialog Box
以上的文章主要向大家介紹的是SQL Server 2008數(shù)據(jù)格式修改時(shí),沒有保存按鈕的情況解決,望大家會(huì)有所收獲。
【編輯推薦】
- MS SQL Server查詢優(yōu)化方法
- MS SQL Server 7.0 性能優(yōu)化指南
- MS SQL Server 7.0 的 SAP R/3 性能優(yōu)化指南
- MS SQL Server和MySQL區(qū)別
- MS SQL Server 連接字符串的實(shí)際操作簡介