Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have SQL Server 2008 R2 with 323 databases consuming some 14 GB on my C: drive, a fast SSD.

Because I want to reclaim some space on my C: drive, I would like to move them to my D: drive.

I have found this MSDN article, but that seems to be the procedure to move only one database.

Is there an automatic way or script to move all my databases at once?

share|improve this question

You can cheat and link the directory across drives after you move it. Then no changes need to be done within the database configuration.

mklink /d MovedDirectory D:\MovedToDirectory
share|improve this answer
    
Will this also give the same NTFS rights to D:\MovedToDirectory as there were originally on C:\MovedDirectory? – BioGeek Jul 17 '13 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .