Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

將 DHCP 資料庫遷移至 Windows Server 2003:跨版本匯出/匯入完整操作指南

編輯:Windows Server 教學

本文說明如何將 DHCP 資料庫從 Windows NT 4.0、Windows 2000 或 Windows Server 2003 遷移至 Windows Server 2003,涵蓋匯出、壓縮、匯入、授權全流程。

來源伺服器:Windows NT 4.0 / Windows 2000

1. 停止 DHCP 服務

net stop "microsoft dhcp server"

2. 使用 JetPress 壓縮資料庫

cd %systemroot%\system32\dhcp
jetpack dhcp.mdb temp.mdb

3. 使用 Dhcpexim.exe 匯出資料庫

需從 Windows 2000 Resource Kit Supplement 1 或微軟網站取得 Dhcpexim.exe。

  1. 啟動工具→選「將本機服務設定匯出至檔案」。
  2. 指定檔名(如 dhcpdatabase.txt)。
  3. 選取範圍→勾選「匯出前停用本機選定範圍」→「匯出」→確定。

4. 停用並禁用來源 DHCP 服務

「服務」中將 Microsoft DHCP Server 設為「停用」並停止服務。

替代方案:僅需配置(非資料庫),可在 Windows 2000 上執行:
netsh dhcp server export C:\dhcp.txt all

來源伺服器:Windows Server 2003(同版本遷移)

使用 netsh 指令簡化流程:

netsh dhcp server export C:\dhcp.txt all
# 將檔案複製至新伺服器
netsh dhcp server import C:\dhcp.txt all

目標伺服器:安裝 DHCP 服務

  1. 「控制台」→「新增/移除程式」→「新增/移除 Windows 元件」。
  2. 「網路服務」→「詳細資料」→勾選「動態主機設定通訊協定 (DHCP)」→下一步安裝。

匯入 DHCP 資料庫

  1. 將匯出檔案複製至目標伺服器本機硬碟。
  2. 確認 DHCP 服務已啟動。
  3. 命令提示字元執行:
    netsh dhcp server import c:\dhcpdatabase.txt all
  4. 若出現「Access Denied」:
    ① 將目標伺服器加入「DHCP Administrators」群組(企業層級)。
    ② 確認執行匯入的帳號屬於本地 Administrators 群組,否則以本地管理員登入執行。
  5. 收到成功訊息後結束。

授權 DHCP 伺服器

  1. 以 Enterprise Admins 身分登入→「系統管理工具」→「DHCP」。
  2. 主控台樹展開新伺服器,右下角紅箭頭表示未授權。
  3. 右鍵伺服器→「授權」→稍待→右鍵「重新整理」→綠箭頭表示授權成功。

完成遷移與授權,新伺服器即可接管 DHCP 服務。

Copyright © Windows教程網 All Rights Reserved