Backup And Move All SQL Databases To New Partition

I need to backup my sql 2005 databases to another partition and also move the databases onto my d drive
as i have run out of space on the c drive
can anyone help
dougdogAsked:
Who is Participating?
 
maradamConnect With a Mentor Commented:
You don't need to backup and restore database to move them to another partition. You can detach them with sp_detach_db procedure, move files to another partition and then attach with sp_attach_db. You need however some downtime in this method. During detach and move databases will be unavailable to users.
0
 
Faiga DiegelConnect With a Mentor Sr Database EngineerCommented:
Or create a secondary filegorup, point these filegroup to your D drive and use that filegroup as default . In that way all objects created will be stored in this filegroup (physically on your D drive). For current objects that is stored on your primary filegroup (physically on your C drive), you could drop clustered indexes and create it on the secondary filegroup. This is a resource intensive work, schedule it on a not so busy time. Start with the not so important table or those somewhat static tables. Leave the most important table as is. In this way when you create clustered index to the secondary file (phylically your D drive), the base table data is moved to that secondary files :))  


0
 
dougdogAuthor Commented:
thanx guys
0
All Courses

From novice to tech pro — start learning today.