Monday, March 17, 2014

Reset SharePoint Config Cache

  The   path for the Configuration Cache under Windows Server 2008 is: C:\ProgramData\Microsoft\SharePoint\Config\<GUID>


Stop the Timer service. To do this, follow these steps:
1.      Click Start, point to Administrative Tools, and then click Services.
2.      Right-click SharePoint 2010 Timer, and then click Stop.
3.      Close the Services console.
4.      On the computer that is running Microsoft SharePoint Server 2010 and on which the Central Administration site is hosted, click Start, click Run, type explorer, and then press ENTER.
5.      In Windows Explorer, locate and then double-click the following folder: C:\ProgramData\Microsoft\SharePoint\Config\GUID
Notes
1.      The GUID placeholder specifies the GUID folder. There may be more than one of these.
2.      The ProgramData folder may be hidden. To view the hidden folder, follow these steps:
·         On the Tools menu, click Folder Options.
·         Click the View tab.
·         In the Advanced settings list, click Show hidden files and folders under Hidden files and folders and then click OK.
3.      (You can also simply type this directly in the path if you do not want to show hidden files and folders.)
4.      Back up the Cache.ini file. (Make a copy of it. DO NOT DELETE THIS FILE, Only the XML files in the next step)
5.      Delete all the XML configuration files in the GUID folder (DO NOT DELETE THE FOLDER). Do this so that you can verify that the GUID folders content is replaced by new XML configuration files when the cache is rebuilt.
Note When you empty the configuration cache in the GUID folder, make sure that you DO NOT DELETE THE GUID FOLDER AND THE CACHE.ini file that is located in the GUID folder.
If Cache .ini is Missing
6.      Double-click the Cache.ini file.
7.      On the Edit menu, click Select All.
8.      On the Edit menu, click Delete.
9.      Type 1, and then click Save on the File menu. (Basically, when you are done, the only text in the config.ini file should be the number 1)
10.  On the File menu, click Exit.
11.  Start the Timer service. To do this, follow these steps:
·         Click Start, point to Administrative Tools, and then click Services.
·         Right-click SharePoint 2010 Timer, and then click Start.
·         Close the Services console.
12.  Note The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.
13.  Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.
14.  Check in the GUID folder to make sure that the XML files are repopulating. This may take a bit of time.


  If Cache.ini is missing under   “C:\ProgramData\Microsoft\SharePoint\Config\” or is deleted by mistake, perform the following Steps:
Now the mission is to get my Timer Job up and functioning. So I took the back-door approach to create GUID folder with Cache.ini file. Here are the steps I performed to get the config GUID of SharePoint.
1.      Stop the SharePoint 2010 Timer process.
1.      Open Windows Registry Editor
2.      Locate the ConfigDB key. Usually, it must be in this place if you are using SharePoint 2010.[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDB]
3.      You will see String Values entries for
4.      DSN: Connection string for your configuration database.
5.      Id: GUID of SharePoint configuration database. Copy this GUID.
6.      Goto C:\ProgramData\Microsoft\SharePoint\Config\ folder. (ProgramData folder is hidden, make sure change windows folder options to make it visible to you)
7.      Create a folder and name it as the GUID (that you just copied from Registry).
8.      Go into this folder, create a text file and name it as Cache.ini.
9.      Now edit this Cache.inikey in value 1 Save and close the file.
10.  Start the SharePoint 2010 Timer process.
11.  Do an IIS RESET
12.  Now check all your application pools are up and running. Otherwise, start them manually.