This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9796|Reply: 0

[Source] SQL Server migrates database files to another disk

[Copy link]
Posted on 4/23/2022 2:05:46 PM | | | |
Requirements: When creating a new database, if the file path and name are not specified, the default database MDF and LDF files will be stored thereC:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATABelow the path, you can right-click to view the database properties to view the file location, as shown in the figure below:



C drive is my system disk, the capacity is not too large, and I want to migrate the HangfireDb database to the E drive.

To detach the database, right-click Database -> Task -> Detach, as shown in the following figure:



Check "Remove link" and "Update statistics" and click OK.

Copy the database MDF and ldf files to another disk, as shown in the following figure:



Open the SQL Server Management Studio management tool again and right-click Database -> Attach, as shown in the following image:



Select the database file and location, and click OK.



(End)





Previous:Angular element ngif hidden visibility is displayed and hidden
Next:Rufus prompts failed to download file error solution
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com