How to move a database file to another computer (MSSQL)?


  1. Stop uplook server services .
  2. Run SQL Server Management Studio .
  3. Find the database (e.g. uplook) and by right-clicking it open choose Task -> Detach .
  4. A new window which enables you to detach the database files from the server will be displayed. Remember the name of the database included in the Database name column. Provided that  the Status column will be described as Ready, press OK to proceed further. After completing this operation, the database will disappear from the list – the files will remain on the disc, though. odłączanie bazy
  5. Find the database files. They are located in C:\Program Files\Microsoft SQL Server\MSSQL <X>\MSSQL\Data  – <X> is a number of SQL server instance. Most frequently, the number will equal 1, but in case when there are several servers installed, you need to check each folder to find the files you need. The files’ names are uplook.mdf and uplook_log.ldf. If the database name mentioned in step 3 was different than ‘uplook’, the names of the files also will differ. Copy the files on another computer. There, launch SQL Server Management Studio.
  6. Right-click on COMPUTER NAME -> DATABASES and choose Attach  from the context menu.
  7. In the newly displayed window, press Add button. A new window will be displayed. There, choose uplook.mdf (or similar) file. Confirm the choice by clicking OK. The database will appear in a database list. podłączanie bazy danych

Was this article helpful?

Related Articles