2009年3月24日 星期二

使用一句SQL INSERT多筆Record(multiple values)

使用一句SQL INSERT多筆Record(multiple values)

此功能在MySQL在3.22.5之後就有的功能,SQL Server在這個SQL Server 2008版本才加入此功能
-- 切換測試資料庫
USE MyDB
GO
-- 建一個測試資料表
CREATE TABLE [mytable]
(
myid 
nvarchar(10)

,givenName 
nvarchar(50)

,email 
nvarchar(50)

);
GO
-- 一次Insert 多筆資料
INSERT INTO [mytable]
VALUES
('01','Brad','brad@test.com')
,('02','Siliva','siliva@test.com')
,('03','Allen','Allen@test.com');
GO
-- 檢查資料是否正確寫入
SELECT * FROM [mytable];

saving changes is not permitted 不允許儲存變更


saving changes is not permitted 不允許儲存變更

update  2022/7/14

錯誤訊息
The changes that you have made require the following tables to be dropped and re-created

解決方法
To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving hanges that require the table to be re-created check box.

SSMS v18.12.1


SQL Server 2008啟動SSMS,開始試試IntelliSence,Import,Export等基本功能,建了一個Table想要再Modify修改Table的Column欄位定義,出現錯誤 "不允許儲存變更saving changes is not permitted"
解法如下:

  1. 請開啟 SQL Server Management Studio (SSMS)
  2. 在 [ 工具 ] 功能表中上, 按一下 [ 選項 ]
  3. 在 [ 選項] 視窗,巡覽窗格中, 按一下 設計工具 (英文)
  4. 選取或清除 [儲存的變更,需要重新建立資料表 ] 核取方塊,然後再按一下 [確定]
To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving hanges that require the table to be re-created check box.
參考:
http://msdn.microsoft.com/en-us/library/bb895146.aspx
http://support.microsoft.com/kb/956176/zh-tw

2009年3月7日 星期六

如何擴充延長 Windows Server 2008 的評估期

如何擴充延長 Windows Server 2008 的評估期
http://support.microsoft.com/kb/948472/zh-tw

1.檢查評估期
slmgr.vbs-dli

2.延長評估期(重設評估期為60天),最多延長3次
slmgr.vbs –rearm

PS
.原始的 60 天評估期擴充 180 天,總可能評估 240 個天的時間

SQL Server Database Mirroring 資料庫鏡像

SQL Server Database Mirroring 資料庫鏡像