PRB: Windows NT Error 2140 When Starting SQL Server
ID: Q180738
|
The information in this article applies to:
-
Microsoft SQL Server versions 6.0, 6.5
SYMPTOMS
Attempting to start the MSSQLServer service may cause the following error:
Windows NT Error 2140: An internal Windows NT error occurred.
The following error may also appear in the SQL Server errorlog:
Init config error 2. The system cannot find the file specified.
Opening master.dat for config information.
CAUSE
These errors can be caused by any of the following:
WORKAROUND
If the tempdb database has been set to read-only, do the following:
- Open a command prompt and start SQL Server with the command sqlservr -c -f.
- Connect to the SQL Server in ISQL or ISQL/w, and run the following command:
sp_dboption tempdb, 'read only', false
SQL Server should now start normally.
If the problem was not caused by tempdb being read-only, then use the following steps:
- Check to make sure the Master.dat file exists in the <SQL_root>\Data directory. There may be a case where the master device was installed to another directory. To determine this, check the errorlog from the <SQL_root>\Log directory. If you find an operating system error 2 ("Could not find the file specified"), it will also list the path to the directory where SQL Server expects to find Master.dat.
If you locate Master.dat and it is not in the <SQL_root>\Data directory, use the following command to start the MSSQLServer service:
sqlservr /d<path_to_Master.dat> /e<path_to_errorlog> NOTE: There is no space between the command switches (that is, "d" or "e") and the paths. For more information on the SQLSERVR command-line
executable program, see the SQL Server Books Online.
If SQL Server starts, the startup entries in the registry are incorrect.
To correct them, skip to step 4 of this procedure, below.
- In Control Panel Services, select the MSSQLServer service and click
Startup. In the Log On As section, note what account SQL Server is
running under. Make sure this Windows NT account has all the appropriate
permissions to read all the SQL Server registry keys, as well as the
directory containing the Master.dat file. For additional information on
MSSQLServer service permissions, see the following article in the
Microsoft Knowledge Base:
Q164167 INF: Troubleshooting SQL Security Manager Messages
- Check to make sure that the sp_configure values are not set too high.
For information on how to do this, see the following article in the
Microsoft Knowledge Base:
Q173090 INF: Changing Configuration Values When SQL Server Won't Start
- If none of the preceding steps resolves the problem, run Registry Rebuild for SQL Server from SQL Server setup. To do this, perform the steps
below.
CAUTION: It is recommended that you make a complete backup of your
system before performing the registry rebuild.
- Restart the computer and log on as the administrator of the local
computer.
- Use SQL Server Setup to note the options that are currently
configured in the registry, for example, the network libraries that
SQL Server is currently listening in on, or the Security model
(Standard, Integrated, or Mixed) that SQL Server is using.
-
From a command prompt, issue the following command from the
<SQL_root>\Binn directory:
setup /t RegistryRebuild = On
NOTE: This command must be typed exactly as shown, including
capitalization. The spaces surrounding the equal sign (=) are
required.
SQL Server Setup will start. It will appear as though SQL Server is
being reinstalled, but it is just rewriting the registry
information. Ensure that the path to where SQL Server and Master.dat
are located is correct. Reset any options noted in the previous step
(step b.)
NOTE: Information on the character set, sort order, and size of the
master database is stored within the existing Master.dat file.
- Start SQL Server normally.
MORE INFORMATION
For more information on the RegistryRebuild option of Setup, see the
following article in the Microsoft Knowledge Base:
Q157805 BUG: RegistryRebuild Option of Setup Is Not Documented
Additional query words:
initconfig event log errorlog
Keywords :
Version : winnt:6.0,6.5
Platform : winnt
Issue type : kbprb
|