Like any other database, DHCP server database also need maintenance in periods to keep the performance and availability. In large infrastructures, DHCP database can grow fast. Like we do for other databases, DHCP server DB also can compact. Microsoft recommends to do this for any database larger than 30mb.
Back in windows NT time Microsoft introduce a utility call “Jetpack” which can use to compact WINS and DHCP databases. This tool still available even for windows server 2012 R2.
In this demo I will show how we can do the database compact. The compact process happens in 3 steps.
1) Copy running DHCP database in to temporary databases.
2) Delete Original DHCP DB
3) Rename temporary database to the original database file name.
Please note that to do this first we need to stop the DHCP server. So make sure to pre-plan for the downtime.
In this demo I am using windows server 2012 R2 which is connected to domain. It holds DHCP server role for the network.
1) Log in to the server as Domain admin or Enterprise Admin.
2) Open command prompt as admin
3) Then type cd %systemroot%\system32\dhcp
4) Then type net stop dhcpserver. It will stop the DHCP server.
5) Then type jetpack.exe dhcp.mdb tmp.mdb
Well this is the interesting part, if you do not have “wins server” role installed on the server, you will get error like, 'jetpack' is not recognized as an internal or external command, operable program or batch file.
But friends unfortunately, jetpack only comes with WINS server package. So you need to add this role if you do not have it.
6) Finally type net start dhcpserver to start the dhcp server.
If you have any question feel free to contact me on firstname.lastname@example.org