To ensure top performance and availability, the DHCP server database requires maintenance from time to time. DHCP database can grow fast, especially in larger organizations, and compacting the DHCP database should be a regular occurrence to adhere to that. A recommendation from Microsoft actually states to compact any database larger than 30mb.
During Windows NT server’s availability, Microsoft introduce a utility call “Jetpack” which can be used to compact WINS and DHCP databases. This tool still available even for windows server 2012 R2.
This Step-By-Step will detail how compact the database via Jetpack. Introduced in Windows NT, Jetpack is still available today in Windows Server 2012 R2 and invokes the compact process in 3 steps.
- Copy running DHCP database into a temporary database
- Delete Original DHCP DB
- Rename temporary database to the original database file name.
NOTE: The DHCP server needs to be stopped to complete this process so plan accordingly.
These steps have been conducted on a Windows Server 2012 R2 machine which is connected to domain and holds DHCP server role for the network.
- Log in to the server as Domain admin or Enterprise Admin
- Open command prompt as admin
- Type cd %systemroot%\system32\dhcp
- Next type net stop dhcpserver which will stop the DHCP server
- Next type jetpack.exe dhcp.mdb tmp.mdb
NOTE: The following error will occur should the WINS server role not be installed on the server: 'jetpack' is not recognized as an internal or external command, operable program or batch file. Simply enable the WINS server package to enable jetpack utilization.
- Type net start dhcpserver to start the dhcp server