Microsoft KB Archive/130642

= How to move a DHCP database from one server to another in Windows NT 4.0 and in Windows 2000 =

Article ID: 130642

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition

-



This article was previously published under Q130642



Important This article does not apply to Microsoft Windows Server 2003. To move a DHCP database from a computer that is running Microsoft Windows NT Server 4.0, Windows 2000, or Windows Server 2003 to a computer that is running Windows Server 2003, click the following link to view the Microsoft Knowledge Base article.

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

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SUMMARY
Microsoft Windows 2000 and Microsoft Windows NT 4.0 provide administration tools for Dynamic Host Configuration Protocol (DHCP) that you can use to manage DHCP servers. In Windows NT 4.0, you can use DHCP Manager (DHCPadmn.exe). In Windows 2000, you can use the DHCP console. The DHCP console is a Microsoft Management Console (MMC) snap-in. However, you cannot use either tool to move a DHCP database from one server to another server.

This article describes how to move a DHCP database from one server to another server. There are three independent sections in this article. Make sure to use only the section that corresponds to the type of move that you want to do.

With the release of the Microsoft Windows 2000 Resource Kit Supplement 1, the DHCP database moves that are described in this article can also be accomplished by using the DHCP Export Import tool (DHCPExim.exe). You can use the DHCP Export Import tool to move any combination of scopes between Microsoft DHCP servers. You can move scopes from one Windows NT 4.0-based server to another Windows NT 4.0-based server, from a Windows NT 4.0-based server to a Windows 2000-based server, and from one Windows 2000-based server to another Windows 2000-based server. Moving all your scopes with this tool is equivalent to moving the DHCP database.

The DHCP Export Import tool is in the Windows 2000 Resource Kit Supplement 1. However, it is not listed in the alphabetical list of tools. Instead, see the Readme file for instructions about how to use it.



Windows NT 4.0 (source) to Windows NT 4.0 (destination)
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To move a DHCP database from one Windows NT 4.0-based server to another Windows NT 4.0-based server, follow these steps.

Note On the source server, the DHCP database name and location may have been changed from the default of %systemroot%\System32\DHCP\DHCP.mdb. The following procedure is not affected by differences in the database location between the source server and the destination server. However, the procedure requires that the destination server use the default name and path of %systemroot%\System32\DHCP\DHCP.mdb.

Step 1: Before you move a DHCP database
Important Moving a DHCP database incorrectly can leave your computer in an unstable state. Therefore, we strongly recommend that you do the following before you try to move a database:
 * Create a backup of your working configuration.
 * Test this procedure in a lab environment.
 * Perform all the following steps exactly as they appear in this article.

Step 2: On the source DHCP server
 To prevent the DHCP Server service from starting after you move the database, disable the DHCP Server service by using the Services tool in Control Panel. To do this, follow these steps:  Click Start, point to Settings, click Control Panel, and then double-click Services. In the Services box, click Microsoft DHCP Server, click Startup, and then click Disabled under Startup Type.  Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

 Copy the DHCP folder tree (%systemroot%\System32\DHCP) to a temporary location on the destination DHCP server. For example, copy the DHCP folder tree to the C:\Temp\DHCP folder.</li></ol>

Step 3: On the destination DHCP server
 If you have not already installed the DHCP Server software, install the DHCP Server service from the Services tab in the Network tool in Control Panel. To do this, follow these steps:  In Control Panel, double-click Network.</li> Click the Services tab.</li> Click Add.

The Select Network Services dialog box opens.</li> In the Network Services list, click Microsoft DHCP Server, and then click OK.</li> If you are prompted for the location of your Microsoft Windows NT CD-ROM, type the path of the Microsoft Windows NT installation files, and then click Continue.</li></ol> </li> Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

</li> Delete all the contents of the %systemroot%\System32\DHCP folder. This includes its subfolders.</li> Copy the DHCP directory tree from the C:\Temp\DHCP folder to the %systemroot%\System32\DHCP folder to replace the existing DHCP folder.</li> Click Start, click Run, type regedit32, and then click OK.</li> Locate and then click the following subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Configuration

</li> On the Registry menu, click Restore.</li> When you are prompted for the file name, select %systemroot%\System32\DHCP\Backup\DHCPcfg.</li> When you are prompted to restore over the existing key, click Yes.

Note You may receive the following error message:

Registry editor could not accomplish the requested operation.

If you receive this message, see the following Microsoft Knowledge Base articles to determine the cause of the error:

139600 Registry Editor Save key saves key on wrong computer

158294 Registry Editor could not accomplish the requested operation

</li> <li>Quit Registry Editor.</li> <li>Start the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net start dhcpserver

</li> <li>Start the DHCP Manager tool.</li> <li>Double-click a scope to view the Active Leases dialog box.</li> <li>Click Reconcile to synchronize the database with the registry.</li> <li>Repeat steps 13 and 14 until you have performed these steps on all the scopes.</li></ol>

Windows NT 4.0 (source) to Windows 2000 (destination)
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To move a DHCP database from a Windows NT 4.0-based server to a Windows 2000-based server, follow these steps.

Notes <ul> <li>On the source server, the DHCP database name and location may have been changed from the default of %systemroot%\System32\DHCP\DHCP.mdb. The procedure in this article is not affected by differences in the DHCP database location between the source server and the destination server. However, the procedure requires that the destination server use the default name and path of %systemroot%\System32\DHCP\DHCP.mdb.</li> <li>This method will not migrate the following DHCP Server settings: <ul> <li>APIProtocolSupport</li> <li>DatabaseCleanupInterval</li> <li>DatabaseLoggingFlag</li> <li>DetectConflictRetries</li> <li>DatabasePath</li> <li>BackupDatabasePath</li> <li>DatabaseName</li> <li>BackupInterval</li> <li>RestoreFlag</li></ul>

For information about how to configure these parameters, see the Microsoft Windows 2000 Resource Kit documentation. To do this, visit the following Microsoft Web page:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/

</li></ul>

Step 1: Before you move a DHCP database
Important Moving a DHCP database incorrectly can leave your computer in an unstable state. Therefore, we strongly recommend that you do the following before you try to move a database:
 * Create a backup of your working configuration.
 * Test this procedure in a lab environment.
 * Perform all the following steps exactly as they appear in this article.

Also, it is assumed that the destination server does not have the DHCP Server service installed. If the DHCP Server service has been installed on the destination server, we recommend that you remove it. To do this, follow these steps:
 * 1) On the destination DHCP server, click Start, point to Settings, click Control Panel, and then double-click.
 * 2) Click Add/Remove Windows Components, double-click Networking Services (do not click to select the Networking Services check box), and then click to clear the DHCP Server check box.

Step 2: On the source DHCP server
<ol> <li>To prevent the DHCP Server service from starting after you move the DHCP database, disable the DHCP Server service by using the Services tool in Control Panel. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Settings, click Control Panel, and then double-click Services.</li> <li>In the Services box, click Microsoft DHCP Server, click Startup, and then click Disabled under Startup Type.</li></ol> </li> <li>Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

</li> <li>Click Start, click Run, type regedit32, and then click OK.</li> <li>Locate and then click the following subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Configuration

</li> <li>On the Registry menu, click Save Key, and then save the subkey as C:\Config.key.</li> <li>Quit Registry Editor.</li></ol>

Step 3: On the destination DHCP server
After you install the DHCP Server service on the destination server, do not start the DHCP console until you are instructed to do this. The first time that you start the DHCP console, it will look for and will create certain settings that should only be created at the end of the following procedure. <ol> <li>Install the DHCP Server service. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Settings, click Control Panel, and then double-click Add/Remove Programs.</li> <li>Click Add/Remove Windows Components, double-click Networking Services (do not click to select the Networking Services check box), and then click to select the Dynamic Host Configuration Protocol (DHCP) check box.</li> <li>Click OK, and then click Next.</li></ol> </li> <li>Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

</li> <li>Copy the Config.key file to the destination server, and then save the file as C:\Config.key.</li> <li>Click Start, click Run, type regedit32, and then click OK.</li> <li>Locate and then click the following subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DHCPServer\Configuration

</li> <li>On the Registry menu, click Restore. Select the C:\Config.key file, and when you are prompted to restore over the existing key, click Yes.</li> <li>Quit Registry Editor.</li> <li>Delete all the contents of the %systemroot%\System32\DHCP folder. This includes its subfolders.</li> <li>Copy the DHCP database file (DHCP.mdb) from the %systemroot%\System32\DHCP folder on the source server to the %systemroot%\System32\DHCP folder on the destination server.</li> <li>Start the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net start dhcpserver

Important You should receive the following error message:

System error 20036 has occurred. The system cannot find message text for message number 0x4e44 in the message file for BASE.

Receiving this error message is expected, and you can safely ignore it. Go to step 11.

You may also receive the following error message:

Jet Conversion Process

The conversion was not successful! The conversion tool could not locate a file called edb500.dll which is required for the conversion. This file should be present on your Windows CD-ROM. Please copy it to your SystemRoot\System32 folder (it may need to be uncompressed) and re-start.

Note This also corresponds to EventID 1008 in the Application log.

If you receive this error message, copy the Edb500.dl_ file from the Windows 2000 CD-ROM to your System32 folder, and then expand it. To expand the Edb500.dl_ file, type the following commands at a command prompt, and then press ENTER after each line:

cd %systemroot%\system32

expand edb500.dl_ edb500.dll

After you expand the file, repeat steps 8 through 10. When you no longer receive this error message, go to step 11.</li> <li>If you receive no additional error messages, examine the Application log in Event Viewer. If the JetConv tool logs EventID 1000, the DHCP database has been successfully converted.</li> <li>Start the DHCP Server console from the Administrative Tools group.</li> <li>Click the destination DHCP server, and then click Reconcile All Scopes on the Action menu. Click Verify. If any leases have to be reconciled, click Reconcile to synchronize the registry and the DHCP database.</li> <li>If the Windows 2000-based server is part of an Active Directory domain, the server must be authorized. To authorize the server, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Programs, point to Administrative Tools, and then click DHCP.</li> <li>Click the name of the DHCP server.</li> <li>On the Action menu, click Authorize.</li></ol> </li></ol>

Windows 2000 (source) to Windows 2000 (destination)
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To move a DHCP database from one Windows 2000-based server to another Windows 2000-based server, follow these steps.

Notes <ul> <li>On the source server, the DHCP database name and location may have been changed from the default of %systemroot%\System32\DHCP\DHCP.mdb. The procedure in this article is not affected by differences in the DHCP database location between the source server and the destination server. However, the procedure requires that the destination DHCP server use the default name and path of %systemroot%\System32\DHCP\DHCP.mdb.</li> <li>This method does not migrate the following DHCP Server settings: <ul> <li>APIProtocolSupport</li> <li>DatabaseCleanupInterval</li> <li>DatabaseLoggingFlag</li> <li>DetectConflictRetries</li> <li>DatabasePath</li> <li>BackupDatabasePath</li> <li>DatabaseName</li> <li>BackupInterval</li> <li>RestoreFlag</li></ul>

For information about how to configure these parameters, see the Windows 2000 Resource Kit documentation. To do this, visit the following Microsoft Web page:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/

</li> <li>The Microsoft Windows 2000 Help file incorrectly identifies the registry subkey to be exported and imported as the following:

This article correctly identifies the subkey to be exported and imported as the following:

</li></ul>

Step 1: Before you move a DHCP database
Important Moving a DHCP database incorrectly can leave your computer in an unstable state. Therefore, we strongly recommend that you do the following before you try to move a DHCP database:
 * Create a backup of your working configuration.
 * Test this procedure in a lab environment.
 * Perform all the following steps exactly as they appear in this article.

Also, it is assumed that the destination server does not have the DHCP Server service installed. If the DHCP Server service has been installed on the destination server, we recommend that you remove it. To do this, follow these steps:
 * 1) On the destination DHCP server, click Start, point to Settings, click Control Panel, and then double-click Add/Remove Programs.
 * 2) Click Add/Remove Windows Components, double-click Networking Services (do not click to select the Networking Services check box), and then click to clear the Dynamic Host Configuration Protocol (DHCP) check box.
 * 3) Click OK, and then click Next.

Step 2: On the source DHCP server
<ol> <li>To prevent the DHCP Server service from starting after you move the DHCP database, disable the DHCP Server service by using the Services tool in Control Panel. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Settings, click Control Panel, and then double-click Services.</li> <li>In the Services box, click Microsoft DHCP Server, click Startup, and then click Disabled under Startup Type.</li></ol> </li> <li>Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

</li> <li>Click Start, click Run, type regedit32, and then click OK.</li> <li>Locate and then click the following subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DHCPServer\Configuration

</li> <li>On the Registry menu, click Save Key, and then save the subkey as C:\Config.key.</li> <li>Quit Registry Editor.</li></ol>

Step 3: On the destination DHCP server
After you have installed the DHCP Server service on the destination server, you must not start the DHCP console until you are instructed to do this. The first time that you start the DHCP console, it will look for and will create certain settings that should only be created at the end of the following procedure. <ol> <li>Install the DHCP Server service. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Settings, click Control Panel, and then double-click Add/Remove Programs.</li> <li>Click Add/Remove Windows Components, double-click Networking Services (do not click to select the Networking Services check box), and then click to select the Dynamic Host Configuration Protocol (DHCP) check box.</li></ol> </li> <li>Stop the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net stop dhcpserver

</li> <li>Copy the Config.key file to the destination server, and then save the file as C:\Config.key.</li> <li>Click Start, click Run, type regedit, and then click OK.</li> <li>Locate and then click the following subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DHCPServer\Configuration

</li> <li>On the Registry menu, click Restore. Select the C:\Config.key file, and when you are prompted to restore over the existing key, click Yes.</li> <li>Quit Registry Editor.</li> <li>Delete all the contents of the %systemroot%\System32\DHCP folder. This includes its subfolders.</li> <li>Copy the DHCP database file (DHCP.mdb) from the %systemroot%\System32\DHCP folder on the source server to the %systemroot%\System32\DHCP folder on the destination server.</li> <li>Start the DHCP Server service. To do this, type the following at a command prompt, and then press ENTER:

net start dhcpserver

You should receive the following message:

The DHCP Server service was started successfully

</li> <li>Start the DHCP Server console from the Administrative Tools group.</li> <li>Click the destination DHCP server, and then click Reconcile All Scopes on the Action menu. Click Verify. If any leases have to be reconciled, click Reconcile to synchronize the registry and the database.</li> <li>If the Windows 2000-based server is part of an Active Directory domain, the server must be authorized. To authorize the DHCP server, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Programs, point to Administrative Tools, and then click DHCP.</li> <li>Click the name of the DHCP server.</li> <li>On the Action menu, click Authorize.</li></ol> </li></ol>

For additional information about moving a DHCP database to a Windows Server 2003-based server, click the following article number to view the article in the Microsoft Knowledge Base:

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

Additional query words: admin administrator

Keywords: kbfasttrack kbhowto kbnetwork KB130642

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.