Open the SQL Server configuration manager.
We are moving the master database of Default Instance. Right click on the SQL Server service and open properties.
Go to “Startup Parameters”.
In the startup parameters ‘-dC:\Program Files….’ is the directory of the master database data file. Click on the existing parameter for data file, change the directory and click “Update”.
“-lC:\Program….” Is for the directory of transaction log file of master change we have to relocate that too to the new location. Click “Update”.
When we “Apply” the changes we get warning stating that changes will be only be applied once we restart the services.
Stop SQL Server Service.
Move the Master database (both .mdf and .ldf file) from the old location to the new location stated in “Startup Parameters”.
Start the SQL Server service.
To verify the results run “Select * from sys.master_files”. Check the location of master database.