Microsoft KB Archive/325473

= How to move a DHCP database from a computer that is running Windows NT Server 4.0, Windows 2000, or Windows Server 2003 to a computer that is running Windows Server 2003 =

Article ID: 325473

Article Last Modified on 3/27/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows 2000 Server

-



This article was previously published under Q325473



IN THIS TASK

 * SUMMARY
 * Export the DHCP database from a server that is running Windows NT Server 4.0 or Windows 2000
 * Export the DHCP database from a server that is running Microsoft Windows Server 2003
 * Install the DHCP server service on the server that is running Windows Server 2003
 * Import the DHCP database
 * Authorize the DHCP server
 * REFERENCES



SUMMARY
This step-by-step article describes how to move a Dynamic Host Configuration Protocol (DHCP) database from a computer that is running Microsoft Windows NT Server 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 to a computer that is running Windows Server 2003.

Note You can use the Microsoft Windows backup utility (ntbackup.exe) to back up and restore the DHCP database on a single server. Do not use the backup utility to migrate or to move a DHCP database from one DHCP server to another.

back to the top

Export the DHCP database from a server that is running Windows NT Server 4.0 or Windows 2000
 Stop the DHCP Server service on the server:  Log on to the source DHCP server by using an account that is a member of the local Administrators group. Click Start, click Run, type cmd in the Open box, and then click OK. At the command prompt, type net stop dhcpserver, and then press ENTER. You receive a &quot;The Microsoft DHCP Server service is stopping. The Microsoft DHCP Server service was stopped successfully&quot; message. Type exit, and then press ENTER.  Compact the DHCP database by using the JetPack utility:  Click Start, click Run, type cmd in the Open box, and then click OK.</li> At the command prompt, type cd %systemroot%\system32\dhcp, and then press ENTER.</li> Type jetpack dhcp.mdb temp.mdb, and then press ENTER.</li> After the database is compacted successfully, type exit, and then press ENTER.</li></ol> </li> Export the DHCP database by using the DHCP Export Import utility (Dhcpexim.exe). You can obtain this utility from the Windows 2000 Resource Kit Supplement 1. You can also visit the following Microsoft Web site to obtain Dhcpexim.exe:

http://support.microsoft.com/kb/927229

To export the database:  Install the Dhcpexim.exe utility, and then start the Dhcpexim.exe utility.</li> At the Welcome to DHCP Export Import tool screen, click Export configuration of the local service to a file, and then click Ok.</li> In the File name box, type the file name for the exported file, and then click Save. For example, type dhcpdatabase.txt .</li> Click the scope or scopes that you want to export, click to select the Disable the selected scopes on local machine before export check box, and then click Export.</li> Click OK.</li></ol> </li> Disable the DHCP Server service on the server. Disabling the DHCP Server service prevents the service from starting after the database has been transferred. To disable the DHCP Server service:  Click Start, point to Settings, click Control Panel, and then double-click Services.</li> <li>In the Service list, click Microsoft DHCP Server, click Startup, click Disabled, and then click OK.</li> <li>If the service is started, click Stop, and then click Yes to confirm the stopping of the service.</li> <li>Click Close to close the Services dialog box.</li></ol> </li></ol>

Important Dhcpexim.exe is required to move the database successfully from a server that is running Windows 2000 or Windows NT 4.0 to a server that is running Windows Server 2003. Netsh commands for DHCP are not available in Windows NT 4.0.

Note If only the configuration (not the database) is required, use the following command (instead of Dhcpexim.exe) on the Windows 2000-based server that you want to export from. (Do not use Dhcpexim.exe.)

netsh dhcp dump >

where  is the name and path of the export file that you want to use.

Note The export option does not exist in the netsh command on Windows 2000 Server. The netsh dhcp server dump and netsh dhcp server import commands are not compatible. If you try to import the data that is created by netsh dhcp server dump >  by using netsh DHCP server import >  , you receive the following error message on the Windows Server 2003-based computer:

The request is not supported.

You can migrate the exported configuration file to the new Windows Server 2003 server by using the following command:

netsh exec 

Dhcpexim.exe is not supported in Windows Server 2003. If a database is exported on a Windows 2000-based computer by using Dhcpexim.exe, and you try to import the data to Windows Server 2003, Dhcpexim.exe quits, and you receive the following error message:

An error occurred. An attempt was made to load a program with a incorrect format.

If this behavior occurs, export data from Windows 2000 by using dhcpexim and then import the data on the Windows Server 2003 environment by using netsh DHCP server import.

back to the top

Export the DHCP database from a server that is running Microsoft Windows Server 2003
To move a DHCP database and configuration from a server that is running Windows Server 2003 to another server that is running Windows Server 2003:
 * 1) Log on to the source DHCP server by using an account that is a member of the local Administrators group.
 * 2) Click Start, click Run, type cmd in the Open box, and then click OK.
 * 3) Type netsh dhcp server export C:\dhcp.txt all, and then press ENTER.

Note You must have local administrator permissions to export the data.

back to the top

Install the DHCP server service on the server that is running Windows Server 2003
To install the DHCP Server service on an existing Windows Server 2003-based computer:
 * 1) Click Start, click Control Panel, and then double-click Add or Remove Programs.
 * 2) Click Add/Remove Windows Components.
 * 3) In the Windows Component Wizard, click Networking Services in the Components box, and then click Details.
 * 4) Click to select the Dynamic Host Configuration Protocol (DHCP) check box if it is not already selected, and then click OK.
 * 5) In the Windows Components Wizard, click Next to install the selected components. Insert the Windows Server 2003 CD into your computer CD drive or DVD drive if you are prompted to do this. Setup copies the DHCP server and tool files to your computer.
 * 6) When Setup is complete, click Finish.

back to the top

Import the DHCP database
Note You may receive an &quot;access denied&quot; message during this procedure if you are not a member of the Backup Operators group. If you receive an &quot;Unable to determine the DHCP server version for server&quot; error message, make sure that the DHCP Server service is running on the server and that the user logged on is a member of the local Administrators group.

Important Do not use Dhcpexim.exe to import a DHCP database in Windows Server 2003. Additionally, if the target Windows 2003 server is a member server, and if you plan to promote it to a domain controller, we suggested that you perform the DHCP database migration before promoting it to a domain controller. Although you can migrate the DHCP database to a Windows 2003 domain controller, the migration to a member server will be easier because of the existence of the local administrator account. <ol> <li>Log on as a user who is an explicit member of the local Administrators group. A user account in a group that is a member of the local Administrators group will not work. If a local Administrators account does not exist for the domain controller, restart the computer in Directory Services Restore Mode, and use the administrator account to import the database as described later in this section.</li> <li>Copy the exported DHCP database file to the local hard disk of the Windows Server 2003-based computer.</li> <li>Verify that the DHCP service is started on the Windows Server 2003-based computer.</li> <li>Click Start, click Run, type cmd in the Open box, and then click OK.</li> <li>At the command prompt, type netsh dhcp server import  all, and then press ENTER, where   is the full path and file name of the database file that you copied to the server.

Note When you try to export a DHCP database from a Windows 2000 domain controller to a Windows Server 2003 member server of the domain, you may receive the following error message:

Error initializing and reading the service configuration - Access Denied

Note You must have local administrator permissions to import the data.</li> <li>To resolve this issue, add the Windows Server 2003 DHCP server computer to the DHCP Admins group at the Enterprise level.</li> <li>If the &quot;access is denied&quot; error message occurs after you add the Windows Server 2003 DCHP server computer to the DHCP Admins group at the Enterprise level that is mentioned in step 4, verify that the user account that is currently used to import belongs to the local Administrators group. If the account does not belong to this group, add the account to that group, or log on as a local administrator to complete the import.

Note If the DHCP IMPORT or EXPORT command fails for users who are not explicit members of the local Administrators group, you must apply the following hotfix on the Windows Server 2003-based computer:

833167 A Volume Shadow Copy Service (VSS) update package is available for Windows Server 2003

</li> <li>After you receive the message that the command completed successfully, quit the command prompt.</li></ol>

back to the top

Authorize the DHCP server

 * 1) Click Start, point to All Programs, point to Administrative Tools, and then click DHCP.

Note You must be logged on to the server by using an account that is a member of the Administrators group. In an Active Directory domain, you must be logged on to the server by using an account that is a member of the Enterprise Administrators group.
 * 1) In the console tree of the DHCP snap-in, expand the new DHCP server. If there is a red arrow in the lower-right corner of the server object, the server has not yet been authorized.
 * 2) Right-click the server object, and then click Authorize.
 * 3) After several moments, right-click the server again, and then click Refresh. A green arrow indicates that the DHCP server is authorized.

back to the top

<div class="references_section">