Troubleshooting the WINS Server Database

This section describes how to restore, rebuild, or move the WINS database. Also provided is a procedure for compacting the WINS database for Windows NT Server version 3.51 or earlier. (Microsoft WINS running under Windows NT Server version 4.0 provides automatic compacting of the WINS database.)

Restoring a WINS Server Database

If you have determined that the Windows Internet Name Service is running on the WINS server, but you cannot connect to the server using WINS Manager, then the WINS database is not available or has become corrupted. If a WINS server fails for any reason, you can restore the database from a backup copy.

You can use WINS Manager to restore the WINS database, or you can manually restore the database. For information about using WINS Manager to restore a WINS database, see the topic "Backing Up and Restoring the Database" in WINS Manager Help.

To restore a WINS database manually

1. Before starting, make a copy of the WINS database files.

2. In the \%Systemroot%\System32\Wins directory, delete the J50.log, J50#####.log, and Wins.tmp files.

3. Copy an uncorrupted backup version of Wins.mdb to the \Systemroot\System32\Wins directory.

4. Restart the WINS service on the WINS server, using the procedure in the next section.

Restarting and Rebuilding a Stopped WINS Server

In rare circumstances, the WINS server may not start or a STOP error might occur. If the WINS server is stopped, use the following procedure to restart it.

To restart a WINS server that is stopped

1. Turn off the power to the server and wait at least 15 seconds.

2. Turn on the power, start Windows NT Server, and then log on under an account with Administrator rights.

3. At the command prompt, type net start wins, and then press Enter.

If the hardware for the WINS server is malfunctioning or other problems prevent you from running Windows NT, you must rebuild the WINS database on another computer.

To rebuild a WINS server

1. If you can start the original WINS server using MS-DOS, use MS-DOS to make backup copies of the files in the \Systemroot\System32\Wins directory.

If you cannot start the computer with MS-DOS, you must use the last backup version of the WINS database files.

2. Install Windows NT Server and Microsoft TCP/IP to create a new WINS server using the same hard drive location and \Systemroot directory.

That is, if the original server stored the WINS files on C:\Winnt35\System32\Wins, then the new WINS server must use this same path to the WINS files.

3. Make sure the WINS services on the new server are stopped, and then use the Registry Editor to restore the WINS keys from backup files.

4. Copy the WINS backup files to the \Systemroot\System32\Wins directory.

5. Restart the new, rebuilt WINS server.

Moving the WINS Server Database

You may find a situation where you need to move a WINS database to another computer. To do this, use the following procedure.

To move a WINS database

1. Stop the Windows Internet Name Service on the current computer, using the procedure in the preceding section.

2. Copy the \System32\Wins directory to the new computer that has been configured as a WINS server.

Make sure the new directory is under exactly the same drive letter and path as on the old computer.

If you must copy the files to a different directory, copy Wins.mdb, but do not copy the checkpoint (.chk) or log files.

3. Start the Windows Internet Name Service on the new computer.

The service automatically starts using the .mdb and .log files copied from the old computer.

Compacting the WINS Server Database

Windows NT Server version 4.0 is designed to automatically compact the WINS database, and you should normally not need to run this procedure. However, if you are using Windows NT Server version 3.51 or earlier, after WINS has been running for a while, the database might need to be compacted to improve WINS performance. You should compact the WINS database whenever it approaches 30 MB.

You can use the Jetpack.exe utility provided with Windows NT Server version 3.5 and 3.51 to compact a WINS database. Jetpack.exe is a command-line utility that is run in the Windows NT Server command window. The utility is found in the \%Systemroot\System32 directory.

The Jetpack.exe syntax is:

Jetpack.exe <database name> <temp database name>

For example:


> CD %SYSTEMROOT%\SYSTEM32\WINS > JETPACK WINS.MDB TMP.MDB

In the preceding examples, Tmp.mdb is a temporary database that is used by Jetpack.exe. Wins.mdb is the WINS database file. When Jetpack.exe is started, it performs the following sequential tasks:

1. Copies database information to a temporary database file called Tmp.mdb.

2. Deletes the original database file, Wins.mdb.

3. Renames the temporary database file to the original filename.

To compact the WINS database

1. In Control Panel, on the local WINS server computer, double-click Services.

2. Under Service, click Windows Internet Name Service.

3. Click Stop, and then click Close. (Alternatively, you can type net stop wins at the command prompt.)

4. Click Start, and then click Run.

5. In Open, type Jetpack.exe, and then click OK.

6. Restart the Windows Internet Name Service by using the Services dialog box.