| title | Move Database Files | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 03/14/2017 | |||||||||||||
| ms.prod | sql-server-2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 89f01b10-5fae-4ed8-b0fb-a4b9f540fd28 | |||||||||||||
| caps.latest.revision | 34 | |||||||||||||
| author | BYHAM | |||||||||||||
| ms.author | rickbyh | |||||||||||||
| manager | jhubbard |
In [!INCLUDEssNoVersion], you can move system and user databases by specifying the new file location in the FILENAME clause of the ALTER DATABASE statement. Data, log, and full-text catalog files can be moved in this way. This may be useful in the following situations:
-
Failure recovery. For example, the database is in suspect mode or has shut down, because of a hardware failure.
-
Planned relocation.
-
Relocation for scheduled disk maintenance.
| Topic | Description |
|---|---|
| Move User Databases | Describes the procedures for moving user database files and full-text catalog files to a new location. |
| Move System Databases | Describes the procedures for moving system database files to a new location. |
ALTER DATABASE (Transact-SQL)
CREATE DATABASE (SQL Server Transact-SQL)
Database Detach and Attach (SQL Server)