Moving model database I have moved the model database by using following method


For each file to be moved, run the following statement.

ALTER DATABASE model
MODIFY FILE ( NAME = modeldev , FILENAME = 'G:\model\model.mdf' )
ALTER DATABASE model
MODIFY FILE ( NAME = modellog , FILENAME = 'G:\model\modellog.ldf' )

Stop the instance of SQL Server to perform maintenance.
Move the file or files to the new location.
Restart the instance of SQL Server or the server.


While restarting instance of server i am getting following error as shown below.

"The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details."

How to solve this error?
Follow below steps :

    a. start SQL Server in master-only recovery mode

     for Default instance : NET START MSSQLSERVER /f /T3608

     for Nameed Instance  : NET START MSSQL$instancename /f /T3608

    b. Check the file location 

          SELECT name, physical_name AS CurrentLocation, state_desc
            FROM sys.master_files
            WHERE database_id = DB_ID(N'model');

    4. sp_detach_db 'model'
        go

    3. Move the Model.mdf and Modellog.ldf files from OLD_LOCATION to NEW_LOCATION
    4. Reattach the model database as follows:
    use master
    go
    sp_attach_db 'model','G:\model\model.mdf','G:\model\modellog.ldf'
    go
   5. Stop SQL Server : NET STOP MSSQLSERVER or NET STOP MSSQL$instancename
   6. Restart SQL Server Normally : NET START MSSQLSERVER or NET START MSSQL$instancename
   7. Verify the new location : sp_helpdb model