Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error while moving model database Expand / Collapse
Author
Message
Posted Monday, April 8, 2013 6:32 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, July 20, 2014 10:15 PM
Points: 265, Visits: 1,713
I have moved the model database by using following method

1. 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' )
2. Stop the instance of SQL Server to perform maintenance.
3. Move the file or files to the new location.
4. Restart the instance of SQL Server or the server.

While restarting instance of server i am getting following error.


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?
Post #1439787
Posted Monday, April 8, 2013 6:51 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 10:35 AM
Points: 1,104, Visits: 687
Start sql server in minimal configuration and check paths using this script:

SELECT name, physical_name AS CurrentLocation, state_desc
FROM sys.master_files
WHERE database_id = DB_ID(N'model');
Post #1439797
Posted Monday, April 8, 2013 6:58 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 10:35 AM
Points: 1,104, Visits: 687
Here is detail instructions: http://msdn.microsoft.com/en-us/library/ms345408.aspx .

Why you restarted server, I usually use that script for model:

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

ALTER DATABASE model SET OFFLINE;

--Move files

ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'new path');
ALTER DATABASE model MODIFY FILE ( NAME = modellog, FILENAME = 'new path');

ALTER DATABASE model SET ONLINE;

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

Post #1439802
Posted Monday, April 8, 2013 7:20 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:09 AM
Points: 6,170, Visits: 13,311
winmansoft (4/8/2013)
I have moved the model database by using following method

1. 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' )
2. Stop the instance of SQL Server to perform maintenance.
3. Move the file or files to the new location.
4. Restart the instance of SQL Server or the server.

Nothing wrong with the sequence itself, however, you must check that the SQL Server service account has permission to read\write the folder

G:\model\



-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1439815
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse