Cache Backing Store Exception

Topics: Caching Application Block
Dec 12, 2008 at 12:14 PM
Hi,
I want to use database MSSQL2000 as a backing store for my application cache. So I configured accordingly.
I am stuck at an exception,
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, MyCache]) failed: Could not find stored procedure 'LoadItems'.

From where can I add 'LoadItems' SP to my database.
(FYI: I am using Enterprise Library 4.1 october release.)

Just in case, following is my config:

<connectionStrings>
    <add name="MyConnectionString"
      connectionString="Data Source=MyServer;Initial Catalog=MyDB;User ID=(my user);Password=(my password)"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
<cachingConfiguration defaultCacheManager="MyCache">
    <cacheManagers>
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
        numberToRemoveWhenScavenging="10" backingStoreName="MyCacheBackup"
        type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="MyCache" />
    </cacheManagers>
    <backingStores>
      <add databaseInstanceName="MyConnectionString"
        partitionName="DBCache" encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.Database.DataBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching.Database, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="MyCacheBackup" />
    </backingStores>
  </cachingConfiguration>
Dec 12, 2008 at 12:58 PM
I got the solution.
I found the SQL scripts in Enterprise Library Source Directories.

My concern is, in every discussion forums, the configuration settings are mentioned, but not a single post explained, what else is needed to configure the caching application block in order to make it running.

any ways keep up the good work.

Thanks
Jan 27, 2011 at 9:05 AM
Edited Jan 27, 2011 at 9:06 AM

Hi Rahul,

I got the same issue with EntLib 5.0. Thanks for the pointer about the SQL scripts residing the src directories, I could get it working. Thanks for posting this.

Sep 6, 2012 at 6:48 AM
Edited Sep 6, 2012 at 6:49 AM

Hi,

under the src folder i can find only the single .msi file.

I also runned the .msi file its pop up a batch file and execute some build operations..

How i can get the scripts and how to get all tables and SP in my database...?

Solution plz.

Sep 6, 2012 at 2:14 PM

The script should be found at <source install folder>\Blocks\Caching\Src\Database\Scripts\CreateCachingDatabase.sql

You can install the source code from: http://www.microsoft.com/en-us/download/details.aspx?id=6836

Or you can get the source from codeplex: http://entlib.codeplex.com/SourceControl/list/changesets (or direct link to the sql file: http://entlib.codeplex.com/SourceControl/changeset/view/90009#528391 )

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com