Skip to content
Menu
myCloud myCloud

Personal short notes about Cloud

  • XMPie
  • AWS
    • AWS Topics
    • AWS Architecture
    • AWS CLI
    • AWS Health
    • AWS Policies
    • AWS Cost
  • CHEAT SHEETS
myCloud myCloud

Personal short notes about Cloud

Move SQL files to another drive

By mikado on November 27, 2022November 27, 2022

Steps

  1. Launch Microsoft’s SQL Server Management Studio
  2. Login to the SQL instance with an account that has the SysAdmin server role
  3. Expand Databases
  4. Right click the database that needs the files to be moved to another location
  5. Select Properties
  6. In the pane, click Files
  7. Note the paths and filenames related to the db
  8. Right click the database that needs the files to be moved to another location
  9. Select Tasks => Detach…
  10. In the Detach Database window, check Drop Connections
  11. Launch Windows Explorer and browse to the path you noted
  12. Move the database’s files to the new location
  13. “Write down” the paths where you moved the files to.
  14. Return to the Microsoft’s SQL Server Management Studio.
  15. Right click Databases
  16. Select Attach…
  17. Click Add and browse to the path you noted
  18. Select the .mdf filename for the database
  19. If the other files are not found, click the ellipsis next to the filename that is not found
  20. In the Locate Database Files window, “browse” to the location of the file for the database that you wrote down
  21. Select the file and attach

Category: Microsoft

Categories

  • AWS (4)
  • AWS Architecture (8)
  • AWS CLI (5)
  • AWS Cost (3)
  • AWS Health (4)
  • AWS Policies (2)
  • AWS Topics (24)
  • CHEAT SHEETS (16)
  • Container (21)
  • Datadog (4)
  • Jenkins (2)
  • Linux (9)
  • Microsoft (7)
  • Python (1)
  • SCRIPTS (9)
  • Terraform (5)
  • XMPie (6)
©2025 myCloud
Click to Copy