Wednesday, November 13, 2013

Reinstall SCCM 2012 CAS server

This week i have been busy installing System Center Config Manager 2012 SP1 on a big new delivery site my company is building.

Long story short, installing SCCM 2012 in a new environment is not that difficult BUT when you experience an entire system down during an upgrade of config manager 2012 from SP1 to R2, the recovery of such a Hierarchy is some challenge.
this is the situation: (i use CM12 as a short for System Center Config Manager 2012)

  • CM12 CAS based on SP1 named CasServer installed with CM12 SP1 CU3
  • CM12 Primary site as child of the previous CAS installed with CM12 SP1 CU3
  • The CAS has a separate (physical) SQL server 2012 with a name like SQLServer
  • The Primary has SQL 2012 installed locally as its own Database server named PriServer
sccmsitecas-pri

 
  • The CAS was in the middle of the upgrade of CM12 SP1 to R2
The Entire Cluster went down at that moment the setup was configuring the CAS database. After the recovery of the cluster my CM12 configuration was just hopeless. none of the consoles worked and services were complaining about anything.

I tried the following recovery scenarios:
  • Restore of the CAS DB on SQLServer: SUCCESS
  • Recovery of the CAS with the option: "recover site from manually restored database" : SUCCESS
  • Check of full functionality in CM12 manager: FAIL - Database replication from CAS to PRI failed with error message:
  • Next scenario: Upgrade CAS to CM12 R2: FAIL replication will not start because of inconsistent content in the queue of the Primary site server
  • Next scenario: Uninstall PRI and CAS and reinstall CAS, recover old CAS DB and restart CM12: SUCCES though it has some hooks that i will explain here.
How to recover a CAS while the current CAS DB is in unknown state:
  • Have a good CAS Database backup ready and online to use
  • Uninstall All connected primary sites from the CAS (how you do that is another subject i will try to explore later)
  • Uninstall the CAS and remove the database while uninstalling (that's an option)
  • Open the registry on SQLServer. backup- and delete the RegKey tree: HKLM\SOFTWARE\Microsoft\SMS
  • Install the CAS as a brand new Server with a brand new Database
  • Stop all SMS services on the newly installed CAS
  • Go to the SQL manager and connect to the SQLServer Database engine
  • From the Databases entry right click the newly created DB and select task Detach.
    • check drop connections
  • Now right click on Databases and select task restore Database; use the option Source - Device
  • Select Backup media type: File and click the Add button; browse to the browse with the ... button to the .BAK file of the Database Backup you have saved previously
  • SQL will check the BAK file and, if checks ok, will display its contents. if OK by you hit the OK button and the restore will start
  • After all this went well the CAS server should restart as soon as you open the CM12 management interface.
  • Now do install all Cumulative updates you have applied to the level you did on the previous CM12 configuration (the one before the crash or restore)
At this point your CAS should be fully functional again

My next post will focus on the restore of the Primary sites.

    No comments:

    Post a Comment