Hi,
I am trying to install SQL Express 2014 SP2 on a Domain controller. I know that installing SQL Express on a domain controller is not recommended but this is for creating a Vmware which supports our solutions.
The problem that the SQL Server Service won't start is because the SQL is searching for the data files on a wrong location. There a lot of description on the Internet of how to fix this issue.
The following procedure is used to fix this issue.
- Set the SQL Server Service to the 'local system' account.
- Start the SQL Server service with the following command.
- In my case I use 'net start MSSQL$SQLEXPRESS /f /T3608
Then make a connection using 'SQLCMD'.
- 'sqlcmd -S .\express
Then type the following command on line 1:'select name, physical_name, state_desc from sys.master_files order by database_id'
- on line 2 type:go
- the result is that file location will be presented.
Then I used the command
ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = ‘D:\SQLDatabases\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\model.mdf’);
to change the file location. And here is where it goes wrong.
I tried the same configuration in the past and it worked. That is the image below.
But if I try this command then the following happens as seen in the next below.
For some reason the statement is not executed. I have no idea why. It seems to have something to do with Windows Updates. I installed Server 2012 R2 without any updates and I install SQL 2014 SP2 x64. Then the installation is without any errors.
Does someone know why the alter statement won't work. I can perform Select statements without any problem. I checked the SQL Logs but I can't find any error message that has a relation why the Alter statements are not executed.
Thanks in advance,
Best regards,
Martin