Tuesday 11 September 2012

Moving SCCM 2012 site DB to another drive

OK, I promised to be so pr0, so here it is - fresh topic from today, I just resolved it and I thought I'll share.


Sometimes you must move DB to different drive on the same server, but for SCCM 2012 it's not that straightforward as in SCCM 2007. 
Normally, you'd detach DB, move it to new location  and attach again, like this:

1. Go to SCCM install root /bin/x64/00000409 (00000409 is folder related to language, english in that case)
2. Run preinst /stopsite. Lot of components should stop.
3. In SQL Management Studio, right click DB and select Detach.
4. Copy DB and LOG files to new location
5. In SQL Management Studio attach your DB from new location.
6. Start SMS_* services.

Simple, eh? Yes, but that doesn't work... console still showed "link Failed" status... WTF? 
In rcmctrl.log you'll probably have similar errors:
ERROR: Detected Servie Broker is not enabled.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:19 PM    5468 (0x155C)
ERROR: To fix this, put the database in single user mode and execute 'ALTER DATABASE [CM_SEC1] SET ENABLE_BROKER'.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:19 PM    5468 (0x155C)

What I did:
7. Stop SCCM site again with preinst /stopsite.
8. In Management Studio run query: ALTER DATABASE [YOUR_DB_NAME] SET ENABLE_BROKER  (it may take a while)


You don't need to put DB to single user mode! It worked nicely in multi user mode (but I had site disabled).

This link will help you find out if service broker is enabled and how to enable/disable it.

9. Start SCCM services again.
10. In rcmctrl.log you should see something like that:
  waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:40 PM    5468 (0x155C)
InvokeDrsActivation thread is stopping...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:40 PM    2416 (0x0970)
Stopping all activation sprocs. Waiting 5 seconds for sprocs to finish.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:40 PM    2416 (0x0970)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:40 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:41 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:41 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:42 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:42 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:43 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:43 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:44 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:44 PM    5468 (0x155C)
waiting for 500 miliseconds for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:45 PM    5468 (0x155C)
The asynchronous command finished with return message: [spDRSActivation finished at 9/11/2012 1:38:28 PM. End execute query finished at 9/11/2012 1:38:28 PM.].    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:45 PM    2416 (0x0970)
InvokeDrsActivation thread exited.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:45 PM    5468 (0x155C)
Exiting SMS_REPLICATION_CONFIGURATION_MONITOR thread ...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:38:45 PM    5468 (0x155C)
SMS_EXECUTIVE started SMS_REPLICATION_CONFIGURATION_MONITOR as thread ID 5412 (0x1524).    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:11 PM    5612 (0x15EC)
SMS_REPLICATION_CONFIGURATION_MONITOR is starting...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:11 PM    5412 (0x1524)
RCM registry info - SQLServerName = I03FS500.adgroup.michelin.com; DatabaseName = CM_I03; SiteNumber = 65542    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:11 PM    5412 (0x1524)
Connecting to RCM.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:11 PM    5412 (0x1524)
Waiting for InvokeDrsSync thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:15 PM    5412 (0x1524)
InvokeDrsSync thread exited.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:15 PM    5412 (0x1524)
Waiting for InvokeDrsActivation thread to exit.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:15 PM    5412 (0x1524)
InvokeDrsActivation thread exited.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:15 PM    5412 (0x1524)
Exiting SMS_REPLICATION_CONFIGURATION_MONITOR thread ...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:40:15 PM    5412 (0x1524)
SMS_EXECUTIVE started SMS_REPLICATION_CONFIGURATION_MONITOR as thread ID 6032 (0x1790).    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:14 PM    2052 (0x0804)
SMS_REPLICATION_CONFIGURATION_MONITOR is starting...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:14 PM    6032 (0x1790)
RCM registry info - SQLServerName = I03FS500.adgroup.michelin.com; DatabaseName = CM_I03; SiteNumber = 65542    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:14 PM    6032 (0x1790)
Connecting to RCM.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:14 PM    6032 (0x1790)
Initializing RCM.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:19 PM    6032 (0x1790)
Processing Replication    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:19 PM    6032 (0x1790)
DRS change application started.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:19 PM    4860 (0x12FC)
InvokeDRSSync thread is starting...    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:19 PM    3360 (0x0D20)
DRS sync started.    SMS_REPLICATION_CONFIGURATION_MONITOR    9/11/2012 1:44:19 PM    3360 (0x0D20)

 That's it! Your SCCM console should report "Link Active" status, DB location in "Child Site" tab should be reported correctly!

But I have a hunch that this may be helpful after moving DB :)

Hi!

So, here it is... next (probably) useless blog... but anyway, let me introduce myself. People call me ponton and I do different stuff... like working in IT, playing some games or riding bike. I'll try to keep this blog as professional as I can, but can't promise that :)