0

We have a Windows Server 2012 with only C drive with 278 GB space.now c drive have only 20 GB free space,here running ms sql server 2008.how can i extend volume C from another disk without data loss?

N.B.:Raid 1 configured

1
  • If the C: drive only has Windows on it, and no other programs installed on the C: drive, then something is wrong, because Windows Server 2012 should not take up 250 GB of space. If there are other applications installed on C:, you might consider adding another volume and installing applications there instead, to avoid this kind of scenario. – Todd Wilcox May 31 '16 at 12:02
1

C can only be expanded onto part of the same drive. In fact, C can only be expanded onto contiguous free space on the same drive.

Todd Wilcox is right that Windows Server 2012 shouldn't take 250 GB of space. It sounds like you might have SQL Server installed on C, and perhaps your databases are getting large. If so, you can easily move your databases to a new drive, with the following exceptions:

  • The database is replicated and published. If replicated, the database must be unpublished. Before you can detach it, you must disable publishing by running sp_replicationdboption.
  • A database snapshot exists on the database. Before you can detach the database, you must drop all of its snapshots. For more information, see Drop a Database Snapshot (Transact-SQL).
  • The database is being mirrored in a database mirroring session. The database cannot be detached unless the session is terminated. For more information, see Removing Database Mirroring (SQL Server).
  • The database is suspect. A suspect database cannot be detached; before you can detach it, you must put it into emergency mode. For more information about how to put a database into emergency mode, see ALTER DATABASE (Transact-SQL).
  • The database is a system database.

(There are other ways to move the system databases.)

If none of those exceptions apply, you can simply right-click the database and choose detach, then move the files to a new location and right-click databases and choose attach. Or you can back up the database and restore it to the new location and drop the original after, which is generally safer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.