x

Reboot to add TempDB files?

Do I have to reboot the server or restart the instance when I add data files to tempdb?

Thanks

more ▼

asked Oct 28, 2009 at 09:45 AM in Default

avatar image

Tom
23 1 1 3

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

2 answers: sort voted first

No. This code runs without the need for any sort of restart.

ALTER DATABASE [tempdb]
  ADD FILE (NAME = 'testfile', FILENAME = 'D:\Databases\MSSQL10.SQL2K8\MSSQL\DATA\tempdb_extrafile.ndf') 
TO FILEGROUP [PRIMARY];

Edit -> After a little bit of extra background searching, I found this MSDN support article. That one applies to 2000 and gives some extra information on how tempdb files are used.

more ▼

answered Oct 28, 2009 at 09:52 AM

avatar image

Matt Whitfield ♦♦
29.5k 62 66 88

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

Matt is correct - you can add files online. I initially thought that this wasn't possible and penned my answer below!

I'm not going to delete the answer, but just wanted to clarify that changes to tempdb, such as moving the files, would require a restart.

Changes to tempDB will take affect when you restart the SQL Server service related to that instance. Whilst a server reboot will achieve this, you can simply restart the SQL Server instance.

more ▼

answered Oct 28, 2009 at 09:53 AM

avatar image

Kev Riley ♦♦
64k 48 61 81

(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:

x72

asked: Oct 28, 2009 at 09:45 AM

Seen: 6930 times

Last Updated: Sep 18, 2013 at 02:58 PM

Copyright 2016 Redgate Software. Privacy Policy