April 8, 2013 at 6:32 am
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?
April 8, 2013 at 6:51 am
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');
April 8, 2013 at 6:58 am
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');
April 8, 2013 at 7:20 am
winmansoft (4/8/2013)
I have moved the model database by using following method1. 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" 😉
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply