If you're running the WINS management utility from the server that you're backing up, you can also use the management console's built-in backup feature to accomplish the backup. In the utility's Win2K version, the option appears on the menu that you access by right-clicking a server name in the left contents pane; in the NT version, the option is available on the Mappings menu. To use this option, you must enable logging on the WINS server. Don't confuse this logging option with the event-logging and advanced event-logging options that I discussed earlierthis option relates not to event logging but rather to whether WINS writes database transactions to the J50.log file before committing them to the database.
Where the Backup Things Are
Whenever you back up WINS, WINS places the database backup files into a two-level-deep subdirectory called \wins_bak\new (under the currently configured WINS database backup path). Under NT, the backup folder's root defaults to \%systemroot%\system32\wins\backup, thus making the full path of the default location \%systemroot%\system32\wins\backup\wins_bak\new.
However, under Win2K, the backup path's root defaults to the \%systemroot%\system32\wins foldernot to a \backup subfolder. The resulting confusion is compounded if other administrators have set up some servers with custom backup paths or if you've upgraded servers from NT to Win2K. Also, if you attempt to manually back up a WINS database on a server that doesn't have an entry for its database backup path, the WINS management utility will prompt you to enter the path. To determine the current location of your WINS backups, you'll need to examine each WINS server configuration. Microsoft recommends that you use the path \%systemroot%\system32\wins. In any case, always use local disks and pathnames in the backup destination pathavoid using network disks or Universal Naming Convention (UNC) pathnames.
Restoring a Wigged-Out WINS
If you discover WINS problemswhether through reports from administrators or users, through errors or garbage record entries in the WINS management console, or through critical errors in your WINS server's System logyou can take steps to start resolving the problem. If the problem is simply that certain WINS records appear to be garbage entries or are somehow invalid, try deleting the offending records from the database. For information about deleting and tombstoning WINS records, see Alistair G. Lowe-Norris, "Tombstones Mark the Coming of the End for WINS," March 1999, InstantDoc ID 4881.
If the problem is more severe and you have specific error codes or event IDs from the System event log, start by searching for the particular error or ID at the Microsoft Support Knowledge Base at http://support.microsoft.com. You might discover clues to the nature of the problem that save you from wrongly assuming that your WINS database is corrupted.
If you're convinced that your WINS database is corrupted, try using the Jetpack utility to confirm your suspicions. If Jetpack confirms corruptionor if you need to bring back an alternative version of the WINS database for other reasonsyour next step is to restore the database.
First, stop WINS on the server you're restoring. You can now use one of several methods to accomplish the relatively simple task of restoring a WINS database. One method is to run the WINS management utility from the WINS server you want to restore and use the Restore Local Database option.
You can also restore the WINS database files manually or from backup files that reside elsewhere (e.g., in another directory, on removable storage). Follow these steps to do a manual restore:
- Stop WINS on the server.
- Delete all files that reside in the \%systemroot%\system32\wins folder (leave any existing subfolders intact).
- Restart WINS to create an empty, clean WINS database on the server.
- Copy the three WINS backup files (wins.mdb, j500000xx.log, and wins.pat) from your backup source folder to the \%systemroot%\system32\wins folder. If the system asks whether you want to overwrite existing files, answer Yes.
- Stop WINS.
- Run the WINS management utility on the WINS server and choose the Restore Local Database option. Browse to the location of the backup folder. Be sure to choose the parent of the \wins_bak folder (i.e., \%systemroot%\system32\wins or \%systemroot%\system32\wins\backup).
- Run Jetpack to compact and verify the integrity of the restored database.
- Restart WINS.
The Microsoft articles "Recovering a WINS Database From Other Backup Sources" (http://support.microsoft.com/default.aspx?scid=kb;en-us;q235609) and "Restoring a Windows 2000 WINS Database from Other Backup Sources" (http://support.microsoft.com/default.aspx?scid=kb;en-us;q244810) describe this procedure in more detail for Win2K and NT, respectively.
Although you can use other methods to restore the WINS database, this procedure is the one that Microsoft supports and recommends. Before you perform any restore operation, you should back up the WINS database files in case you need to recover them laterfor example, if you discover that the files you're restoring are corrupted.
Be Proactive
You don't need to be a hapless victim, waiting for your WINS servers to stop functioning. By following this article's recommendations, you can significantly increase the reliability of your WINS environment and reduce the possibility of WINS-related downtime.