Configuring SQL-SERVER without starting the service

Is it possible to change the location of temp.mdf or other files without starting SQL-Server?

I wanted to restart the old server, but one of them was a USB hard drive, it was already used somewhere else. Now I can not start the SQL-Server service in Configuration Manager.

The event log has the following entry:

Event Type: Error Event Source: MSSQLSERVER Event Category: (2) Event ID: 17207 Date: 30.08.2011 Time: 15:53:10 User: N/A Computer: SQLSERV Description: 

FCB :: Open: Betriebssystemfehler 3 (no error found) beim Erstellen oder ร–ffnen der Datei 'M: โ€‹โ€‹\ temp.mdf'. Diagnosis and correction Sie den Betriebssystemfehler, und wiederholen Sie den Vorgang.

Here is the information about this error.

Q:. How can I change the location of database files that reference non-existing disks without starting the SQL-SERVER service? I did not see an option in Configuration-Manager. Or is there some kind of "safe mode" in SQL Server?

0
sql-server sql-server-2005 windows-server-2003
source share
1 answer

Take a look at the options here on MSDN

You can start the server and change the location of TEMPDB using the ALTER command using SQLCMD.

Alternatively, you can simply temporarily add another drive so that the correct path exists. TempDB is recreated at startup, so itโ€™s sufficient to ensure path availability. Then you can move file locations if necessary when the server is running.

+3
source share

All Articles