如果您尝试将 DHCP 数据库从一台服务器导出到另一台服务器,但操作失败,则可能是没有正确完成所有步骤。若要成功迁移数据库,必须按照正确的顺序完成一些过程。请按照列出的顺序执行下面的过程,重新尝试导出和导入数据库。
若要执行这些过程,您必须是管理员组的成员,或者您必须被委派了适当的权限。
若要将 DHCP 数据库和配置移动到另一台服务器,请执行以下操作:
通过使用本地管理员组的成员帐户登录到源 DHCP 服务器。
单击“开始”,再单击“运行”,键入 cmd,然后单击“确定”。
键入 netsh dhcp server export C:\dhcp.txt all,然后按 Enter。
安装 DHCP 服务器服务
若要执行这些过程,您必须是管理员组的成员,或者您必须被委派了适当的权限。
若要在运行 Windows Server 的现有计算机上安装 DHCP 服务器服务,请执行以下操作:
在 DHCP 服务器计算机上,单击“开始”,再单击“控制面板”,然后双击“添加或删除程序”。
单击“添加/删除 Windows 组件”。
在“Windows 组件向导”的“组件”框中,单击“网络服务”,再单击“详细信息”。
选中“动态主机配置协议(DHCP)”复选框(如果尚未选中),然后单击“确定”。
在“Windows 组件向导”中,单击“下一步”以安装选择的组件。如果系统提示您将 Windows Server 2008 安装光盘插入到计算机的 CD 驱动器或 DVD 驱动器中,请执行相应的操作。安装程序会将 DHCP 服务器和工具文件复制到计算机中。
安装程序完成时,请单击“完成”。
导入 DHCP 数据库
若要执行这些过程,您必须是管理员组的成员,或者您必须被委派了适当的权限。
若要导入 DHCP 数据库,请执行以下操作:
以本地管理员组的显示成员的用户身份登录。某组中本地管理员组成员的用户帐户不起作用。如果不存在域控制器的本地 Administrators 帐户,请在目录服务还原模式下重新启动计算机,然后如本节后面所述,使用管理员帐户导入数据库。
将导出的 DHCP 数据库文件复制到计算机的本地硬盘。
验证服务器计算机上是否已启动 DHCP 服务。
单击“开始”,再单击“运行”,键入 cmd,然后单击“确定”。
在命令提示符下,键入 netsh dhcp server import c:\dhcpdatabase.txt all(其中,c:\dhcpdatabase.txt 是复制到服务器的数据库文件的完整路径和文件名),然后按 Enter。
对 DHCP 服务器授权
若要执行这些过程,您必须是管理员组的成员,或者您必须被委派了适当的权限。
若要对 DHCP 服务器授权,请执行以下操作:
在 DHCP 服务器计算机上,单击“开始”,指向“所有程序”,再指向“管理工具”,然后单击“DHCP”。
在 DHCP 管理单元的控制台树中,展开新的 DHCP 服务器。如果服务器对象的右下角出现一个红色箭头,则表明尚未对该服务器授权。
右键单击相应的服务器对象,再单击“授权”。
一段时间后,再次右键单击该服务器,然后单击“刷新”。绿色箭头表明已对该 DHCP 服务器授权。
Target | Microsoft.Windows.DHCPServer.Library.Database | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | StateCollection | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.SingleEventLogManualReset2StateMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Microsoft.Windows.DHCPServer.Library.ActionAccount |
<UnitMonitor ID="Microsoft.Windows.DHCPServer.Library.Database.UnitMonitor.DatabaseCorrupt" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.DHCPServer.Library.Database" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.SingleEventLogManualReset2StateMonitorType" ConfirmDelivery="true" RunAs="Microsoft.Windows.DHCPServer.Library.ActionAccount">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.DHCPServer.Library.Database.UnitMonitor.DatabaseCorrupt_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDescription$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="EventRaised" MonitorTypeStateID="EventRaised" HealthState="Error"/>
<OperationalState ID="ManualResetEventRaised" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<LogName>System</LogName>
<Expression>
<And>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-DHCP-Server</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">DHCPServer</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1057</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>