How to move SQL data files to a new partition or Disk drive on the same SQL server


How to move SQL data files to a new partition or Disk drive on the same SQL server.

The drive that SQL was initially installed on may be running out of space. Or you may wish to move the data files to another drive to improve SQL performance. 


Microsoft recommends that the SQL executable files be on a different disk drive than the data files for performance reasons. In addition, you may want to move the data files to a new drive which has more space.

Note that moving the data files is much simpler and faster than moving all of SQL, which would require a re-install of SQL and several additional steps.

To move the data files, follow this procedure:

  1. Backup the SQL database. We don't actually require this, but it only takes a few minutes and then we have a backup "just in case". You can backup the database from the Kaseya System > Configure page. Click "Backup now". The backup location MUST be on a drive on the SQL server.
  2. Stop the Kaseya Services
  3. Open the SQL Management Console and expand the "Databases" tree. Highlight the ksubscribers database, right click and select properties. There is a tab that I believe is named "Files". On that dialog you will find the path to the Ksubscribers data files. There are two files, one with an extension of MDF and another with an LDF extension. Make a note of the location.
  4. In SQL Management Console, highlight "Ksubscribers". Right click and in the "Tasks" menu select "Detach".
  5. Now move those data files to the new location. (We suggest you move them, not just copy them.)
  6. In the SQL Management Console, highlight "Databases". The Ksubscribers will not be there because it has been detached. Right click in "Databases" and select "Tasks" > "Attach". You will be asked where the data files are, point SQL to the new location.
  7. Restart the Kaseya Services.



In addition to moving the data files, you could also make sure the backup location on the System > Configure page in Kaseya points to a drive other than drive C.



Kaseya v6.3 (Also applies to other versions)

Have more questions?

Contact us

Was this article helpful?
1 out of 1 found this helpful

Provide feedback for the Documentation team!

Browse this section