Recover from a crashed WINS server
Published: 07 May 2003 08:59 BST
WINS is a vital component of Windows NT servers in large network environments.
Although Microsoft went a long way toward eliminating WINS in Windows 2000, it's still there. When your WINS server goes bad, you need a way to restore the WINS database. Here's how.
- This article is aimed at curing WINS problems on a Windows 2000 server, but most of the approaches we'll discuss should also work on an NT4 server. Note that you may need to perform only a couple of these steps to get WINS working again.
Identifying errors
Various errors are associated with WINS that may be flagged in Event Viewer. The Event IDs you're most likely to see include:
- 4318
- 4224
- 7022
- 7023
- 37
These errors deal with the inability to start the WINS service, find the WINS.mdb file/directory, or read the database header. In addition, you may see Event IDs in the low-300s range, which indicate that the WINS database is trying to repair itself and/or has successfully done so.
Some things to try first
Before proceeding with a repair operation, you need to check that the root of your problem doesn't lie with insufficient disk space. If the WINS database lives on a volume with low disk space, this fact alone may cause WINS to stop working properly, and it may cause corruption.
You should first try to restore a recent backup of WINS.mdb. You can do this by restoring from a tape or, if you previously used the WINS tool to back up the database to another location, you can restore it using the same tool. Make sure you stop the WINS service before you begin or else the Restore Database option will be greyed out when you right-click on the WINS server. This is a neat, timesaving option, but it works only if you backed up WINS from within the WINS console.
If restore attempts don't succeed, you should attempt a database compaction. A fragmented database is more likely to become corrupted. Much as with DHCP, the WINS database should be compacted periodically, especially if it exceeds 25 to 30 MB.
Remember that it's quite possible for a WINS database to be large because of the numerous types of records WINS holds for each machine. Dynamic compaction is performed in WINS, but you still need to make periodic file size checks. Use the Jetpack.exe utility on the Windows 2000 CD for the compaction. You'll need to drop to the command line and type in the following commands, pressing [Enter] after each line:
CD %SYSTEMROOT%\SYSTEM32\WINS
NET STOP WINS
JETPACK WINS.MDB TMP.MDB
NET START WINS
Notice that you need to stop the WINS service first. If you don't, you'll likely corrupt the database further or compaction will fail. Jetpack.exe compacts the database file WINS.MDB, renaming it TMP.MDB. Jetpack.exe also deletes the old WINS.MDB and then renames the compacted file TMP.MDB to its new name, WINS.MDB.





