question

Mehdi593 avatar image
Mehdi593 asked

TempDB location does not exist

SQL Server Service was Stopped. SQL server service not starting. Please Help Me.
tempdb
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Debasish avatar image
Debasish answered
Hi, It would be better to post what error you are getting to start SQL service.If tempdb location are not available & because of this SQL service is not starting, then you have to start sql service with minimal configuration option (-f option) & give actual path of tempdb
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

thank for your answer, how to use -f option & give actual path of tempdb?? sql service is not starting. please help me.
0 Likes 0 ·
1.Open Command Prompt as an administrator and then go to the BINN directory where SQL Server is installed and type sqlservr.exe -f to start sql service with minimal configuration. 2.Once it start connect with SQLCMD –S servername –E 3.Then run script to modify Tempdb file
0 Likes 0 ·
Mehdi593 avatar image
Mehdi593 answered
i don't know tempdb file name :(
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

USE master; GO ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf'); GO ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'F:\SQLLog\templog.ldf'); GO Replace the filenames with where you would like tempdb to move to. If you have more than the normal mdf and ldf files, repeat the above process for each of the files replacing the necessary name and filename with the correct values you have configured https://docs.microsoft.com/en-us/sql/relational-databases/databases/move-system-databases
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.