cannot restart sl server, temp db is not created

  • Clearing tempdb database.

    Error: 5171, Severity: 16, State: 1.

    f:\MSSQL.1\MSSQL\LOG\tempdb.mdf is not a primary database file.

    Error: 1802, Severity: 16, State: 4.

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

    Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.

    SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

  • Is there a question here? You need more disk space.

  • Did you do anything to the tempdb files? Did you copy then anywhere, rename anything or anything like that. Basically, what did you do to the server between the time SQL was shut down and the time that you restarted it.

    f:\MSSQL.1\MSSQL\LOG\tempdb.mdf is not a primary database file.

    Indicates that one of the tempdb files isn't valid. Are there any other messages in the error log?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I did nothing. The only thing is that we changed autentication from mixed to Windows only. Then we tried to restart the server. What I s interesting is that I noticed tempdb mdf and ldf files yesterday were on E drive. But when we tried to restart they were created in F drive.

  • Someone must have altered them somehow and not restarted the server. Were there any trace flags set on the service startup?

    You can move the files back using the process here: http://support.microsoft.com/kb/224071

  • Does the path F:\MSSQL.1\MSSQL\LOG\ exist?

    If so, what files are in there?

    Are there any other errror relating to tempDB or Model in the error log?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi, thank you for trying to help. The path exists, the files there are tempdb.mdf and tempdbldf. Also there is a lot of space available there.

  • I will try to do it. I have to change start up params or sql server to be in single user mode and restore only master db. Then look at tempdb mdf and ldf or move them or increase the size.

    Then change again startup params back to what it was and try to restart sql server again

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply