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


Error while moving model and msdb system databases.


Error while moving model and msdb system databases.

Author
Message
abdul.samad.121
abdul.samad.121
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 114
Hi,

I am using SQL Server 2008 and I have three SQL Server instances installed and I am trying to move the model and msdb system databases of only one instance.

I have added -T3608;-m;-c startup parameters from configuration manager for that specific instance and I have restarted the service.

I have followed the same steps as described in the following link : http://support.microsoft.com/default.aspx?scid=kb;en-us;224071

I am getting these error msgs whenever I try to attach and detach the model and msdb databases using sp_detach 'model' and sp_attach_db <<path to mdf and ldf>>.

“Cannot detach an opened database when the server is in minimally configured mode” when trying to sp_detach_db ‘model’.

*** and the database instance service is getting stopped automatically and soon after that I am getting the following error msg if I try to execute sp_attach_db .

"A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)"

I don't know why the database instance service is getting stopped automatically.

I have checked everything I could ie TCP/IP (enabled),named pipes(enabled),... but nothing worked.

Do I need to make any other settings before starting the process?

Please reply to this post as early as possible. Thanks in advance.


Abdul Samad
Wildcat
Wildcat
SSC-Addicted
SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)SSC-Addicted (465 reputation)

Group: General Forum Members
Points: 465 Visits: 1444
1st, using the following script to move model and msdb to destination:

--- Moving msdb
alter database msdb modify file (name = MSDBData, filename = 'X:\MSSQL\DATA\MSDBData.mdf')
go
alter database msdb modify file (name = MSDBLog, filename = 'X:\MSSQL\Log\MSDBLog.ldf')
go
--- Then, manually copy the files to the destination

--- Moving model
alter database model modify file (name = modeldev, filename = 'X:\MSSQL\DATA\model.mdf')
go
alter database model modify file (name = modellog, filename = 'X:\MSSQL\Log\modellog.ldf')
go
--- Then, manually copy the files to the destination



2nd, stop SQL Server

3rd, manually copy model and msdb files to destination

4th, restart SQL server

5th, DONE. (to verify, select * from master.sys.master_files)
Perry Whittle
Perry Whittle
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11617 Visits: 16844
Abdul

as already stated you do not need to put the SQL server instance into single user mode to modify the file paths for model and msdb databases. Also, do not be tempted to change the filenames either!!

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

"Ya can't make an omelette without breaking just a few eggs" ;-)
abdul.samad.121
abdul.samad.121
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 114
Thanks a lot "Wildcat" for taking your precious time out and replying to my post , the method you have suggested is just awesome and the easiest one. I thought we can move only tempdb database using that method but it worked for msdb and model database too;
it has resolved my problem of moving msdb and model databases.

Thanks again.
Perry Whittle
Perry Whittle
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11617 Visits: 16844
You may want to bookmark the following link for future reference

http://msdn.microsoft.com/en-us/library/ms345408.aspx

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

"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