Skip to content
Steps
- Launch Microsoft’s SQL Server Management Studio
- Login to the SQL instance with an account that has the SysAdmin server role
- Expand Databases
- Right click the database that needs the files to be moved to another location
- Select Properties
- In the pane, click Files
- Note the paths and filenames related to the db
- Right click the database that needs the files to be moved to another location
- Select Tasks => Detach…
- In the Detach Database window, check Drop Connections
- Launch Windows Explorer and browse to the path you noted
- Move the database’s files to the new location
- “Write down” the paths where you moved the files to.
- Return to the Microsoft’s SQL Server Management Studio.
- Right click Databases
- Select Attach…
- Click Add and browse to the path you noted
- Select the .mdf filename for the database
- If the other files are not found, click the ellipsis next to the filename that is not found
- In the Locate Database Files window, “browse” to the location of the file for the database that you wrote down
- Select the file and attach
Click to Copy