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

It can be done via theĀ Configuration Manager, or via the services.msc from Control Panel–> Administrative Tools

/Siva

Leave a Reply

Your email address will not be published. Required fields are marked *