x

TempDB location does not exist

SQL Server Service was Stopped. SQL server service not starting. Please Help Me.

more ▼

asked Dec 03 at 03:24 PM in Default

avatar image

Mehdi593
1 1

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Dec 04 at 01:23 PM

avatar image

Debasish
59 4 6 9

thank for your answer,

how to use -f option & give actual path of tempdb??

sql service is not starting.

please help me.

6 days ago Mehdi593

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

5 days ago Debasish
(comments are locked)
10|1200 characters needed characters left

i don't know tempdb file name :(

more ▼

answered Dec 05 at 07:59 AM

avatar image

Mehdi593
1 1

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

5 days ago anthony.green
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x79

asked: Dec 03 at 03:24 PM

Seen: 35 times

Last Updated: 5 days ago

Copyright 2017 Redgate Software. Privacy Policy