Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error while moving model database


Error while moving model database

Author
Message
IT researcher
 IT researcher
SSC Veteran
SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)

Group: General Forum Members
Points: 294 Visits: 1798
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?
Evgeny
 Evgeny
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1251 Visits: 735
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');
Evgeny
 Evgeny
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1251 Visits: 735
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');


Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8780 Visits: 16554
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" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search