1. First, confirm whether Tempdb.mdf and Templog.ldf exist in the corresponding database instance (under the data folder);
2. If they exist, change their name or move them to another place (mainly for backup, they may not be needed after success)
3. Open a command line window and use the following command:
sqlservr -c -f -T3608 -T4022
Note: The sqlservr program is under the binn of your sqlserver installation path. If you have multiple sqlserver instances installed on your machine, you need to use the -s parameter. For specific parameter settings, please refer to the sqlserver help.
4. Open the query analyzer, connect to the server, and execute exec master..sp_resetstatus Tempdb
5. Press CTRL+C in the command prompt window (shut down the server, do not use other methods to shut down).
6. Restart SQL Server.