Author Topic: External hard disk  (Read 2789 times)

HeurekaSupporten

  • Administrator
  • Newbie
  • *****
  • Posts: 4
External hard disk
« on: October 28, 2013, 11:56:42 am »
(Copied from older forum site)
I need to store my Forest Data and Result Data on an external hard disk. Can't find info about how to do this. Suppose I have to make changes in SQL mgmt. studio. COuld be valuable for many users. Thanks in advance. /Erik

HeurekaSupporten

  • Administrator
  • Newbie
  • *****
  • Posts: 4
Re: External hard disk
« Reply #1 on: October 28, 2013, 11:57:14 am »
Use SQL Server Managment Studio to either backup files, or detach and reattach the database files efter moving them to the external disk. Use backup if you just want to store the files and do not intend to use them for a while, or detach/attach if you want to use the databas files directly after moving them. In addition, you can change the default database path to the desired disk, so that new databases are stored at the desired location automatically. However, the performance (time for reading and writing data to the database), is typically much poorer on an external disk than on an internal.

These are the main steps to move the database files with detach/attach. The steps may vary slighty depending on what version of SQL Server you are running:
1. Start SQL Server Managment Studio (SMSS), via the Start-button, and right-click SMSS and choose Run as administrator.
2. Under Databases, right click the desired database and choose Properties.
3. Under Files, note where the database files are located (the mdf-file and the log-file).
4. Click Cancel
5. Right-click the database again, and select Tasks > Detach.
6. When the detach operation is completed, move the database files (mdf and log) to the desired location.
7. In SMSS, reattach the database files by right-clicking Databases and choose Attach according to instructions you can find on several places on the internet, for example here: http://www.serverintellect.com/support/sqlserver/sql-database-attach.aspx

To make a backup:
1. Same as step 1 above.
2. Right-click the database to backup of and select Tasks > Back Up... See futher instructions here: http://www.serverintellect.com/support/sqlserver/database-backup-ssmse.aspx
3. When the backup-process is completed, you can deleted the database, by selecting it and press Delete.