MSSQL Server not starting after fresh installation

After the installation of Microsoft SQL Server 2014 Express I encountered a problem that the services could not be started. It seems that the installation have set the paths to the model, MSDB and tempdev to the wrong location. After uninstall the SQL Server instance and reinstalling it, the problem persists. No settings are altered in the setup properties, also I could not reproduce this same error on another server even using the same deployment image for the Azure VM. The solution is to change the paths to those 3 databases to the right location with starting the instance in the master-only recovery mode.

First thing to do is to start the command prompt with elevated rights.

When it is started we need to start MSSQL with the following command:


Note that MSSQLSERVER is the instance name of the service that encounter the problem.


Connect to the instance by using Windows Authentication to interactively run Transact-SQL with the following command:

Or with the instance name as:

Now you want to check with:

What is wrong with the file paths. Look up on the server for the right location, for SQL Server 2014 Express x64 it is in my case “C:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLDATA“.


With the following command I change the path of the files to the right location:

Use exit to close the SQLCMD, stop the MSSQLSERVER instance in the master-only recovery mode and start the instance normal.


Then I launched the SQL Management Studio to check if everything is working as, but the users I provided during the setup as administrators of the instance can’t logon. Also the ‘sa’ user is not able to logon to the instance.


Here is the solution to reset the ‘sa‘ users password.

Again open the elevated command prompt and start the instance in the master-only recovery mode.


After that use the following command to reset the password of the ‘sa’ user.


Restart the service of the MSSQL instance. Start the SQL Management Studio and connect with SQL Server Authentication.


Now you can create the other users you need to provide access to this instance.


Some of the errors in the eventlog: