如何使用 T-SQL 更改資料庫名稱

要更改資料庫名稱,除了透過 SQL Server 圖形化的管理介面(SQL Sever Enterprise Management、SQL Server Management Studio 或 SQL Server Management Studio Express),還可以透過下面的 T-SQL 指令:
USE master;
GO
-- 切換至單人模式
EXEC sp_dboption <欲更名的資料庫名稱>, 'Single User', True;
GO
-- 更名資料庫
EXEC sp_renamedb '<欲更名的資料庫名稱>', '<新的資料庫名稱>';
GO
-- 回復多人模式
EXEC sp_dboption <欲更名的資料庫名稱>, 'Single User', False;
GO

請注意,在更改資料庫名稱時,是不會更改群組檔案、資料庫檔案、資料庫日誌檔的名稱。此外,建議改用 ALTER DATABASE MODIFY NAME  指令:
ALTER DATABASE <舊資料庫名稱>
Modify NAME = <新資料庫名稱>;

read more ...

如何在 Windows Virtual PC / XP Mode 內調整解析度

使用 Windows Virtual PC 安裝所謂的客體(Guest)作業系統之後,一定會再安裝整合元件套件,以便增強虛擬機器與實體電腦之間的互動性,例如:滑鼠整合、時間同步處理、音效…等。如果您使用 Windows XP Mode,整合元件套件則會事先完成安裝,可直接使用整合功能!

當客體作業系統的整合功能開啟時,是無法調整螢幕解析度,因此欲調整解析度,當然就是要停用整合功能,然後調整解析度,最後要記得再啟用整合功能!

停用整合功能的方式有下列幾種:

  1. 於 Windows Virtual PC / XP Mode 開機時,暫時停用
    在看到「正在啟用整合功能…」對話方塊時,按下鍵盤上的 Shift + ESC,就可以讓 Windows Virtual PC 透過光碟開機。
  2. 於使用 Windows Virtual PC / XP Mode 時,暫時停用
    按下 Windows Virtual PC / XP Mode「工具」功能表中的「停用整合功能」指令。
  3. 永久停用
    1. 開啟虛擬機器的設定,有 2 種方式,請依照實際的使用情形,自行選用:
      • 「虛擬機器」資料夾中,以滑鼠右鍵按一下虛擬機器的名稱,然後按下「設定」指令。
      • 按下 Windows Virtual PC / XP Mode「工具」功能表中的「設定」指令
    2. 「Windows Virtual PC 設定」頁面的左側窗格,按一下「整合功能」
    3. 在右側窗格中,取消 啟動時啟用 核取方塊。
    4. 按下「確定」按鈕,以便儲存變更。

read more ...

如何在 Windows Virtual PC 中,用光碟開機

由於 Windows 7 中的 Windows Virtual PC,與以往的 Virtual PC 或 Virtual Server 不同,當您安裝完作業系統之後,於開機時,不會顯示 BIOS 開機檢查的畫面,此表示我們無法進入 BIOS 設定開機的順序,因此如果要測試自行製作的開機光碟,可不是只要把光碟放到光碟機裡,然後按下 Windows Virtual PC 的「工具」功能表,設定「DVD 光碟機」存取實體光碟機或是載入 ISO 映象檔這麼簡單。

您可以嘗試去進行上述的設定,可能會發生 Windows Virtual PC 一直顯示整合功能錯誤的對話方塊。

欲解決此問題,請在看到「正在啟用整合功能…」對話方塊時,按下鍵盤上的 Shift + ESC,就可以讓 Windows Virtual PC 透過光碟開機。

由於,此時的 Windows Virtual PC 整合性功能無法使用,因此欲釋放滑鼠指標,使其回到實體電腦時,請按下 Ctrl + Alt + (向左的方向鍵)。

如下所示即是在 Windows Virtual PC 使用 ERD Commander 光碟開機的畫面



read more ...

How to find the Microsoft Expression Studio 3 production key out

If you get the Microsoft Expression Studio 3 (not a trival version) from MSDN / TechNet subscription or somewhere else, you may not require to enter the production key when installing, since the key is pre-pidded.

Is there any way to find out the production key?

Yes! After installing, just explore to the %temp% folder and open the "XSetup_ExpressionStudio_<Installed Date & Time>.log", such as XSetup_ExpressionStudio_2009_10_22_12_8_50.log. Then search the key word "InstallProofOfPurchase" to find the production key out.


read more ...

2009 年底前 MCP 考試大優惠,最高折扣為 25%

為了嘉惠更多 MCP 考生,只要在今年(2009)年底之前參加 MCP 考試,即可享受最高 25% 的價格優惠,詳細考試科目之折扣、活動說明,請參考官網:Special Offers on Training and Certifications from Microsoft


read more ...