Change the Default Locations for Data and Log Files in SqlServer

By Default in SqlServer, new database files are being created and stored in %Program Files%\\Microsoft SQL Server\\MSSQLXXX.MSSQLSERVER\\MSSQL\\DATA. This path can be changed to desired or configured path.

To change Data and log files path

  1. Connect to SqlServre using SSMS
  2. Select connected Server and then Properties
  3. From Server properties –> Select Page (left side) –> Database Settings
  4. Update Database default locations – Data/Log/Backup paths
  5. Close the connections and restart the SQL server service. As per Microsoft must restart SQL Server service to take the effect

Leave a Reply

Scroll to Top
%d bloggers like this: