Logo

DHCP Database

In this video from ITFreeTraining I will be looking at the DHCP database. The DHCP database is where Windows stores all the data required to run DHCP on Windows. Understanding how it works, will allow the administrator to backup, move and maintain the database. In this video I will look at just the DHCP database; in later videos I will demonstrate how to do these things.

Show lesson content
DHCP Database
0:25 To start with, what is the DHCP database? The DHCP database is a dynamic database that contains all the data the DHCP server needs. If you consider a DHCP server, then on this server will be a database. This database contains all the settings and data required to run the DHCP server. For example, it contains scope settings, lease data and reservations.

This database can be backed up by the administrator and be restored if required. In this video I will look at how to backup and restore the database, how to perform maintenance on the database and how to move the database. Most administrators may not have even heard of the DHCP database, let alone performed maintenance on it; before I start let’s have a look why.

About the DHCP Database
1:14 DHCP uses the Microsoft Jet Database Engine. The Microsoft Jet Database was first developed in the early 90’s. Since then, it has undergone a lot of development and has become very stable and reliable. However, like all databases, the more the database is used the more likely it is that it will need to be compacted or repaired. Compacting is the process of recovering unused space in the database. Essentially when a record in the database is deleted, the record is flagged as being removed but remains in the database. The compacting process re-writes the database file leaving out the records that are no longer required – kind of like spring cleaning, when you throw away everything you don’t need and only keep what you need.

The DHCP database will be compacted after a Windows Update or when the DHCP server is idle. This ensures that maintenance on the database is performed regularly. This is why an administrator may not have needed to know much about the DHCP database as it essentially looks after itself. Before I look at performing maintenance on the database, moving the database or restoring the database, I will first look at that the files that make up the database.

Database Files
2:26 All the files the DHCP database uses are found in the folder DHCP located in System32 in the Windows folder. The main file is the database file called DHCP.MDB. This contains all the DHCP data, for example all the scopes, address leases and reservations.

In the folder are also a number of other files and some of these are shown here. Files you may find in here are temporary files. These are used when performing maintenance operations on the database. Files ending in the file extension .log, are transaction files. When a change is made in the database, referred to as a transaction, a log file is created. It is quicker to write to a transaction file rather than directly to the database. The transaction files are later written to the database which is more efficient then updating the database each time a change is made.

If there is a problem before the database is updated from the log files, the log files can be used to recover or repair the database. In order to do this, Windows needs to know what has been updated and what has not. A checkpoint file is created which records which transactions have been applied to the database and which have not. This checkpoint file ends in chk.

That covers the basics of the DHCP database. In later videos I will perform demonstrations of how to move the DHCP database, as well as backup and perform maintenance on the database. Until those videos, I would like to thank you for watching.

References
“Tip: Back Up and Restore the DHCP Database” https://technet.microsoft.com/en-us/library/ff621490.aspx
“Microsoft Access” https://en.wikipedia.org/wiki/Microsoft_Access
“DHCP Service Database Files” https://technet.microsoft.com/en-us/library/cc958926.aspx

Lesson tags: dhcp
Back to: DHCP > DHCP