commerce server 2007

We have unpacked the pub file in production environment and OOB application is working fine. We have some profile data exist in staging commerce server and want to bring it to production server. Since profile data can’t be moved through staging service, we have taken the backup and restored the database in the production. Everything worked fine but after database restore the commerce server manager is not behaving properly. Through MMC, we are not able to modify the profile connection strings. On edit link click, MMC is showing as blank screen. As a work around, we went to soursedef table in profile DB and modify the connection string but it didn’t worked.

To fix this issue (it’s a shot in the dark and it worked), we have exported the profile xml from staging server and imported that xml file in the production. After import, the MMC started working properly. I am not sure the logic behind that but it has fixed my issue. So, thought of sharing this to the community.

Related Articles


If you like this post, please click on our sponsor advertisement.


We have a base catalog with products reaching to fifty thousand. For each country we have created a virtual catalog and to achieve better query performance, we have materialized the virtual catalogs. Means base catalog data is replicated to virtual catalog and the data is directly fetched from physical disk. Frequently we are getting data from business (as incremental or FULL). Everything was working fine till we encounter a problem in production. First of all the rebuild process is taking hours to complete and the second thing is that the virtual catalog rebuild hangs after sometime.

These types of issues will come when we have materialized virtual catalogs . Virtual catalog rebuild failure on Production server is due to deadlock in the Catalog database. The deadlocks are caused due to catalog updates (either add/delete/update product ) during the virtual catalogs rebuild processing. The common point in the deadlock is the CatalogGlobal table held by the Virtual Catalog rebuild process while other process need to set virtual catalog dirty Flag and that only happens when a virtual catalog is set to materialized. This can be a  reason for such issues coming in materialized virtual catalog rebuild failure but not in normal virtual catalog rebuild.

Resolution:

  • The best one of course is to restrict catalog editing on Production, and all changes go through Staging service.
  • Whenever we are running rebuild process , make sure we stop catalog web service for the business user to modify the data. This way no interruption in Virtual rebuild process so no deadlock will be. (and also make sure only one import process executes at a given point of time).
  • Change the materialized virtual catalogs to normal virtual catalogs.

There is a nice article in MSDN blogs which explains when to use normal virtual catalog and materialized virtual catalogs. My recommendation is go with virtual catalog and if you see any performance hit (query taking more time) then try to make that particular virtual catalog as materialize, instead of blindly making all virtual catalogs to materialized. 

Related Articles


If you like this post, please click on our sponsor advertisement.


Recently we have rolled out our code bits and catalog changes in staging environment and the day came to push them to production. Staging server continuously failing with the below exception.

Failed to import business data for ‘Catalog’ resource for project ‘StagingProject’ : Microsoft.CommerceServer.Staging.StagingSubsystemException: CatalogImport failed. See log for details.4100:The category Boots defined as a parent category in the catalog Products does not exist in the catalog. You should create the category before using it as a parent category.at Microsoft.CommerceServer.Staging.CatalogHandler.Import(String project, BusinessData businessData, String projectLocation, String destinationSite)   at Microsoft.CommerceServer.Staging.BusinessDataStagingEngine.ImportBusinessData(String projectName, String projectLocation)…..

With the error description, I felt that the import process is not able to create the categories. So, I manually created the categories in production and tried to execute the staging process but still I am getting the same exception (even though I have the category “Boots” exist in production commerce server).

So, after some analysis, I figured out that there is a bug in commerce server which is triggering this error.Consider the following scenario 

  • In a catalog, you create a new category.
  • You add a previously created category as a child category of the new category.
  • You export the catalog to an XML file.
  • You try to import the virtual catalog in the XML file into a catalog database.

The root cause for this exception is that, when you export a catalog or virtual catalog to an XML file, the sequence of XML nodes is ordered according to the times that the categories were created. Therefore, the earliest categories are displayed at the beginning of the XML file. If there is parent-child association defined in the catalog, the name of the parent category is specified in the ParentCategory element in the definition section of the child category.

This issue occurs because the definition of the child category appears before the definition of the parent category in the XML file. Therefore, the name of the parent category is referred to before the parent category is defined. Because of this, the name of the parent category which causes the import operation to fail.

Microsoft has also confirmed about this defect and released KB 970717. If you face similar issue, please reach out to CS support team and they can provide you the fix. Mostly this will be included in coming service packs.

As per the KB article – “Install the CommerceServer2007SP3-KB970717-ENU.exe file to update the Catalogcreate.sql file for Commerce Server 2009. This makes sure that this issue does not occur for new catalog databases.”  This means that the error will not repeat on the new catalog databases but will persist in old catalog databases. To overcome this problem we ran staging with “full replication” option which makes the source and the destination data same. Now if we try to add new categories (as shown below), the same problem will not repeat.

Installation steps:

  1. Extract the KB 970717 from http://hotfix or can refer to the attachment.
  2. Execute the SQL Script (KB970717.sql) in Highlander_productcatalog in source server.
  3. Execute the hotfix (CommerceServer2007SP3-KB970717-ENU.exe) in source server.
  4. Perform IISReset
  5. Repeat step 2 – step 4 in all destination servers.
  6. Right click on staging project, change the catalog replication mode FULL. Kindly execute the projects so that full data moves from staging to production.
  7. Later change the project setting back to Incremental replication.

Related Articles


If you like this post, please click on our sponsor advertisement.


Last night, I was doing some R&D on commerce server business applications. I was able to debug the code with VS2010. I resumed my work today morning but when I try to debug the code, I am getting two exceptions.

An application configuration error has been detected.  Go to “Add or Remove Programs” to reinstall or repair Microsoft Commerce Server Business User Applications.

image

Your preferences file (C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CustomerAndOrdersManager._Url_ee5krotviage2q2gxoaofroebs0x2hui\6.0.1.0\user.config) appears to have become corrupt. In order to recover, all of your preferences have been reset.

image

What I have done that made my code behave like this? I try to change the version number but still get the same exception.  I navigated to “C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CustomerAndOrdersManager._Url_ee5krotviage2q2gxoaofroebs0x2hui\6.0.1.0” folder and checked that one file exist (with named  – user.config.bad). I restarted my virtual machine to try my luck but no success.

When I recall the change I have performed, only one new configuration element is added to the app.config file of Customer and order manager project.  On observing closely, I figured out that the configuration setting is wrong (instead of value attribute, I have used Value attribute). I corrected the configuration mistake (changed the Value attribute to value) and rename the user.config.bad to user.config. Now I am able to debug my code.

Related Articles


If you like this post, please click on our sponsor advertisement.


During training sessions, I met many people who often confused on how Marketing system works; especially how marketing content (discounts or advertisements) are selected.They keeps on complaining the Marketing system doesn’t work properly and their desired content is not displayed on the website. If you want commerce server to display the advertisements you want then you have configure the marketing system in the similar way. There are many constraints (like request weight, quantity ordered, content size, page groups, industry, etc) commerce server sees before it selects the content and one of them is expressions. In this article, I will try to explain, what is expression and how they are evaluated.

Expression is a condition that commerce server evaluates against available profiles to check whether to deliver the content or not. An expression based targeting is the process of selecting the content you want to deliver based on customer context.  So, in the nutshell, commerce server provides two types of expressions.

1. Catalog expressions – Specify which products you want to apply a discount.

2. Target expressions – where, when and how you want to show the content.

These expression can be clubbed together as target group using AND / OR operators. For example, You can show one advertisements to customers who are from California state and show different advertisements to customers who are from California state and has purchased XBoX from our website.  Lets see what these expressions are

Catalog Expressions – With this, we can define the products or category of products or product properties you ant to apply discount. For example, a catalog expression might me, get 10% discount if the customer has purchased products from XBox category of worth more than 300$.

Target Expressions – With this, you can specify the customers to which you want to target discounts or advertisements.  For example, we can build target expressions to target advertisements or discounts to specify languages and currencies.

Once created, we have to add expressions to a content (either Ad / discount). While adding, we need to mention the action and the action is an enumeration of four values (i.e., Exclude, Require, Sponsor, Target).

image

The action in target expressions plays a major role in selecting the content. The business user should be aware of what action to select for the content.

Exclude:  This is like NOT operation. If the expression is true then the content is not eligible for delivery. If the expression is false then the content is eligible for delivery.

Require: This is like compulsory condition to met in order to deliver the content.  If the expression is true then the content is eligible for delivery if the expression is false then the content is not eligible for delivery.

The above two actions will be major exclude factors. i.e, with this expression we can able to include/exclude required content. Now that we have few contents with in our hand and if we want to nail down the content further then we can use Target or Sponsor actions. Commerce server internally keep score for each content and at the end of process the content with maximum score is returned.

Target: If the expression is true then the score of the content will be increased by 20%(i.e., the probability of selecting that content will be more). If the expression if false then the score is not changed.

Sponsor: If the expression is set to true then only that content is eligible for deliver irrespective of other content of more score and no other content has an expression action =sponsor. If other content has also has action=sponsor then both are eligible for delivery and commerce server will consider scoring to select the content.

Related Articles


If you like this post, please click on our sponsor advertisement.


Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter