|
Can I move the tempdb database to a separate drive and leave the rest of the system databases (master, msdb) on a separate drive? Please advice, I would like to apply this to the production database so that the system does not shutdown.
(comments are locked)
|
|
Yes, use the alter database command. Of course change the drive letter and location in the script below to your naming standard and drive(s). Then restart your sql service. Short and sweet.
Oct 23 '10 at 05:26 PM
Blackhawk-17
Thank you so much for the quick response. I will be running the dry run in dev.
Oct 23 '10 at 06:49 PM
Chitra
That is what we are here for. So many others have helped me out on here, it is nice to give back.
Oct 23 '10 at 06:59 PM
Tim
@TRAD +1 I would like to add just one cent: it is a very good idea to have tempdb on the separate drive, and if there is a need to have more than one tempdb file then it is best to store each on the separate physical drive, so each file gets it own spindle. This implies that tempdb file(s) should never be on the same spindle with any non-system database files if possible.
Oct 25 '10 at 08:48 AM
Oleg
(comments are locked)
|
|
Just to add...tempdb is recreated each time the SQL Service starts, hence why you have to restart after changing the locations, so be aware that the 'old' tempdb files will still exist in the original location once you have restarted. These can be safely deleted once the 'new' tempdb is being used. Good follow-up. Seeing the leftover files can be a bit misleading.
Oct 25 '10 at 09:27 AM
KenJ
(comments are locked)
|
|
Also, just to add, size the tempdb data files properly so they do not autogrow in tiny chunks every time causing unnecessary fragmentation. Same goes for the log file. Take into consideration that the log file can take some time to create at service startup if its large, as the database will zero-out the file.
(comments are locked)
|
|
I recently read that if your cores are less than 8 go with one per core, then if you have more than 8 start with 8 and increase in units of 4. It depends... if you tie your cores up with I/O then they can't do other processing at the same time. Each workload will require analysis and a balance.
Oct 03 '12 at 05:46 PM
Blackhawk-17
(comments are locked)
|


@user-489 if my answer got you what you needed, do you mind checking the check box to mark it as the answer.