Upgrading a Commerce Server 2000 Beta Release Installation
This document provides instructions for upgrading your Commerce Server 2000 beta or post-beta databases to the Final Preview release of Commerce Server, and for installing Microsoft® Windows® 2000 Service Pack 1 and the required hotfixes. To download the Commerce Server Beta Upgrade package, see http://www.microsoft.com/commerceserver/evaluation/trial/default.asp.
Important Before performing these procedures to upgrade your Commerce Server installation, you must back up your site, databases, and Commerce Server Business Desk applications. These procedures require that you delete your Commerce Server Data Warehouse databases, and make other changes to your site.
You must perform these upgrade steps for the following releases:
- Beta (IDS4) to Final Preview
- IDS5 to Final Preview
- IDS6 to Final Preview
To upgrade from Commerce Server Final Preview to Commerce Server 2000, you use three programs that are available on the Commerce Server 2000 CD. For instructions, see Upgrading a Commerce Server Final Preview Installation.
In this document, references to Commerce Server Beta release include all releases of Commerce Server prior to the Final Preview release.
The following topics are addressed:
Overview of the Upgrade Process
- Create a copy of your original site, databases, and Business Desk applications. You will upgrade this duplicate site, and when you have finished, move it to production.
Important You must back up your Data Warehouse databases. These procedures require you to delete the data in the Data Warehouse databases.
Also, if you have customized your Business Desk applications, it is important that you make a copy so you can apply your custom changes to the upgraded Business Desk applications.
- Stop all applications on the duplicate site.
- Back up and then delete your Data Warehouse database.
- Install Windows 2000 Service Pack 1 and the required hotfixes on your Commerce Server installation and each of your servers (Web servers and database servers), if you have not already done so.
- Stop all Commerce Server services.
- Upgrade to SQL Server 2000, if you are using a pre-release version of Microsoft® SQL Server™ 2000.
- Run the CS2KUpgrade tool on each server hosting a Business Desk application.
- Uninstall Commerce Server Beta release.
- Uninstall the Business Desk clients and delete additional files.
- Install the current release of Commerce Server 2000.
- Unpack the Upgrade.pup package.
This step unpacks a new Data Warehouse resource and a copies new Business Desk files to your site.
- Synchronize the Internet Information Services (IIS( 5.0 metabase properties with the Administration database.
- Update Global.asa and your site ASP files, and run Reportacls.vbs.
- Run IISReset.
- Test the upgraded site.
After you perform these steps, it is recommended that you upgrade your Commerce Server Final Preview installation to Commerce Server 2000. For instructions, see Upgrading a Commerce Server Final Preview Installation.
Optional Steps
After you upgrade your Commerce Server installation, you may need to perform the following steps, depending on the customization and needs of your site:
- Import your Web log files to the Data Warehouse. Perform this step only if you want to retain the pre-upgrade data in your Data Warehouse. Data in the Data Warehouse is not upgraded by the CS2KUpgrade tool.
- Customize the Business Desk application. Perform this step only if you want to apply customized changes to your Business Desk application that you may have made before upgrading.
- Customize the \retail\pipeline\total.pcf file. If you customized total.pcf before the upgrade, it is recommended that you open the pipeline and note the component properties so you can re-apply them after the upgrade.
What is the CS2KUpgrade Tool?
The CS2KUpgrade tool is primarily a set of SQL Server scripts. Each script upgrades a specific Commerce Server database.
Features
The CS2KUpgrade tool does the following:
- Runs on a stand-alone basis.
- Runs on each database listed in the Administration database.
- Upgrades the Commerce Server databases directly, without making copies of the databases.
- Upgrades database tables that need to be upgraded; it does not upgrade tables that have already been upgraded.
- Preserves orders. Baskets are deleted.
Steps Performed by the CS2KUpgrade Tool
The CS2KUpgrade tool performs the following steps during an upgrade of a Commerce Server installation:
- Checks that the version of Commerce Server 2000 is Beta or later.
- Opens the Administration database to retrieve the database connection strings and a list of sites.
- For each site, lists all the resources of the site. For each resource of the site:
- Identifies the SQL script to be run for the resource.
- Runs the script, passing in the Administration connection string retrieved in Step 2.
- Copies new Business Desk files to your Business Desk application, overwriting the existing files.
- Deletes the Data Warehouse global resource.
- Writes progress messages and error messages to the event log.
List of Database Changes
The following table lists the changes the CS2KUpgrade tool makes to the Commerce Server Beta databases:
| Database |
Changes by CS2KUpgrade Tool |
| Campaigns |
- Upgrades the SQL scripts in the Administration database that are used by the PUP object.
- Upgrades all format templates in the Campaigns database to include the page group ID in both the click URL and the image URL (for download). Only data is changed; no schema are changed.
|
| Catalog |
- Changes the width of ProductID and VariantID columns in the CatalogProducts table from nvarchar(128) to nvarchar(256).
- Upgrades the u_defaultvalue column in the CatalogAttributes table from varchar(4000) to nvarchar(3600).
- Upgrades the data values in the IsSearchable column of the CatalogProducts table from 1 to 1.
- Determines if the vendor association and catalog sets tables are in the Catalog database, and if not, moves the tables from the Transaction database to the Catalog database.
|
| Transactions |
- Renames the Dimension table to TransDimension.
- Renames the Category table to Transcategory.
- Determines if the vendor association and catalog sets tables are in the Catalog database, and if not, moves the tables from the Transaction database to the Catalog database.
|
| Orders |
- Changes the widths of two columns.
|
| Baskets |
- Drops three tables.
- Deletes all baskets.
- Updates entries in the Administration database that have the following scripts, used by Commerce Server Site Packager:
- RegionData.sql
- TaxAndShipping.sql
- Requisition.sql
|
| Profiles |
- Adds the Targeting Context profile definition.
- Increases the width of the ExprBody column of the ES_ExprInfo table from 1000 to 3400.
- Updates two stored procedures: sp_DelProfilePropHelper and sp_DelDataMember, and adds a new one: sp_GetProfileSources.
- Changes the display name of the profile definitions catalog to Profile Catalog.
- Adds display names for the data members u_pref1 through u_pref5.
- Adds a unique constraint to the OrganizationObject.u_org_name column and the UserObject.u_logon_user column in the AD_SQL profiles. This change prevents duplicate users and organizations with the same names.
|
In addition, Commerce Server Setup installs a new set of stored procedures for:
- Product Catalog System
- Targeting System
- Profiling System
Upgrading Your Commerce Server Installation
Step 1: Create a copy of your original site, databases, and associated Business Desk applications
Important You must back up your Data Warehouse databases. These procedures require you to delete the data in the Data Warehouse databases.
Also, if you have customized your Business Desk applications, it is important that you make a copy so that you can apply your custom changes to the upgraded Business Desk application.
The following table lists what you must copy, and provides example directory and database names.
| Copy the following |
Example |
| Site directory |
\InetPub\wwwroot\<site name directory> |
| Business Desk application directory |
\InetPub\wwwroot\<BusinessDesk directory> |
| Data Warehouse database |
<site name>_dw |
| Commerce Server database |
<site name>_commerce |
| Custom and/or third-party component files and data |
\Microsoft Commerce Server\Custom_Files |
Step 2: Stop all applications
On the duplicate site, use Internet Services Manager to stop all applications, including your Business Desk applications.
Step 3: Back up and then delete your Data Warehouse databases
- Back up your Data Warehouse SQL Server database and your OLAP server database.
- Use OLAP Manager to delete your OLAP database.
- In Microsoft SQL Server Enterprise Manager, right-click your Data Warehouse database, and then note the location of the physical files.
- Using Enterprise Manager, delete the Data Warehouse database.
- Use Windows Explorer to verify that the Data Warehouse physical files have been deleted. The physical files are:
<site name>_dw.mdf
<site name>_dw_log.LDF
If the physical files still exist, stop SQL Server, delete the physical files, and then re-start SQL Server.
Step 4: Install Windows 2000 Service Pack 1 and required hotfixes
On each of your servers, install Windows 2000 Service Pack 1 and required hotfixes. For instructions, see Installing Windows 2000 Server Pack 1 and Installing Windows 2000 Hotfixes.
Step 5: Upgrade to SQL Server 2000
If you are running a pre-release version of SQL Server 2000, you must install the released version. For instructions about installing SQL Server 2000 and required software, see the following:
Step 6: Stop all Commerce Server services
- Use Windows 2000 Services to stop the Predictor service, List Manager service, and Direct Mailer service.
Step 7: Run the CS2KUpgrade tool on each server hosting a Business Desk application
- For each server hosting a Business Desk application, log on with Administrator privileges.
- At the command-line interface, type CS2KUpgrade.exe, and then press ENTER. For example, type C:\Backup_of_Site\CS2KUpgrade.exe.
The CS2KUpgrade tool starts. If it is interrupted, restart it. The tool will continue processing where it stopped.
The CS2KUpgrade tool writes error messages to the event log as needed.
Step 8: Uninstall Commerce Server Beta
- Click Start, point to Settings, point to Control Panel, and then click Add/Remove Programs.
- Select Commerce Server 2000, and then click Change/Remove.
- Follow the online instructions, and restart your computer if prompted.
Step 9: Uninstall the Business Desk clients and delete additional files
You must perform this step on each computer that has the Business Desk client installed, including the Commerce Server computer.
- On each Business Desk client computer, delete the following files:
%systemroot%\WINNT\Downloaded Program Files\{AA504C4F-447F-4AE7-8A72-73324F38478F}
%systemroot%\WINNT\Downloaded Program Files\ClientSetup.RunSetup
- On each Business Desk client computer, uninstall the Business Desk client, and re-install it the next time you access the Business Desk application. For instructions, see Uninstalling the Business Desk Client and Installing the Business Desk Client.
Step 10: Install the current release of Commerce Server 2000
Step 11: Unpack the Upgrade.pup package
Use Commerce Server Site Packager to unpack Upgrade.pup. This step adds a new global Data Warehouse resource to your site.
- For each site in your Commerce Server installation, unpack Upgrade.pup and install the global Data Warehouse resource. For detailed instructions, see "Adding a Resource to a Site" in Commerce Server 2000 Help.
- Repeat Step 1 to associate the global Data Warehouse resource you installed with each site that will use it.
Step 12: Synchronize the IIS metabase properties with the Administration database
- Expand Commerce Server Manager, expand Commerce Sites, and then click the site you want to administer.
- Expand Applications, right-click the application you want to configure, and then click Properties.
- In the <application> Properties dialog box, in the Web Server tab, click the Synchronize values button to copy the following properties from IIS to the Commerce Server Administration database: IIS Web site, TCP port, SSL port, and local domain.
When you click the Synchronize values button, Commerce Server synchronizes the properties at the application level and the properties for all the Web server objects below the application. For the properties at the application level (TCP port and SSL port), Commerce Server reads the values of the first Web server. It assumes that all the Web servers are configured the same, which is required for a Web farm to work correctly.
Step 13: Update Global.asa and your site ASP files, and run Reportacls.vbs
You must make the following changes to your application if it is based on a Solution Site and and one of the following releases:
- Beta (IDS4). Perform the entire procedure in Step 13.
- IDS5. Update Pickship.asp only.
- IDS6. Do not perform the procedure in Step 13.
To update Global.asa and your site ASP files, and run Reportacl.vbs
- Open Global.asa using a text editor such as Notepad.
- Change two strings to the new string name as shown in the following table:
| Old String Name |
New String Name |
| GetStateNamesListFromCountryCode |
GetRegionNamesListFromCountryCode |
| GetStateCodeFromCountryCodeAndStateName |
GetRegionCodeFromCountryCodeAndRegionName |
- Save your changes and close Global.asa.
- Perform the same step to change all occurrences of these two strings in your site ASP files.
- Navigate to the \Include folder, and open addr_lib.asp using a text editor such as Notepad.
- In addr_lib.asp, change the following two strings as shown here:
| Old String Name |
New String Name |
| GetStateNameFromCountryCodeAndStateCode |
GetRegionNameFromCountryCodeAndRegionCode |
| GetStateCodeFromCountryCodeAndStateName |
GetRegionCodeFromCountryCodeAndRegionName |
- Save your changes and close Addr_lib.asp.
- Open Pickship.asp using a text editor such as Notepad.
- Add the following line to implement default currency rounding:
oOrderForm.value("_currency_lcid") = 0
Before the following line:
Set slShipments = objSCMRT.PreviewShipments( _
oOrderForm, objContext, arrSplitters)
For information about rounding, see "Rounding" in the "Order Processing Pipeline" section of Commerce Server 2000 Help. For information about other ways to implement currency rounding, see the files moneyinfo.h and moneyinfo.cpp in the Commerce Server 2000 Software Development Kit (SDK).
- Save your changes and close Pickship.asp.
- At the command-line interface, run ReportACLs.vbs for each Business Desk application. This script is included in the Upgrade utility package. It sets the access control lists (ACLs) on your Business Desk application.
For example, type the following:
cscript reportacls.vbs <system drive>\inetpub\wwwroot\<Business Desk application>
Step 14: Run IISReset
Step 15: Test your upgraded site
After you perform these steps, it is recommended that you upgrade your Commerce Server Final Preview installation to Commerce Server 2000. For instructions, see Upgrading a Commerce Server Final Preview Installation.
Optional: Customizing Your Upgraded Site
After you upgrade your Commerce Server installation, you may need to perform the following steps, depending on the needs of your site.
- Import your Web log files to the Data Warehouse by running the Commerce Server 2000 Web Log Import Data Transformation Services (DTS) task. Perform this step only if you want to retain the pre-upgrade data in your Data Warehouse. Data in the Data Warehouse is not upgraded by the CS2KUpgrade tool.
For instructions, see "Importing Web Log File Data" in Commerce Server 2000 Help.
- Customize the Business Desk applications. Perform this step only if you want to apply customized changes to your Business Desk application that you may have had before upgrading. Use the back up of your Business Desk applications to re-apply the custom changes. If you secured specific modules for use by certain business managers, you will need to re-secure them.
- Customize \retail\pipeline\total.pcf file. If you customized total.pcf before the upgrade, you will need to re-apply your changes after the upgrade.
The new Order Splitter component cannot read the Pipeline Configuration File (.pcf) stream in the Commerce Server Beta release, so it ignores the stream and uses default values.
Planning for Solution Site Upgrades
Most of the changes in the Solution Sites from the beta release to the Final Preview release focus on three areas:
- Addressing algorithmic inefficiencies
- Restructuring the code base to make it easier for developers to use
- Fixing bugs
Addressing Algorithmic Inefficiencies
To address algorithmic inefficiencies, code previously used in a function call has been added inline to the code. This means that if you are modifying any of the business logic provided by the Solution Sites, your customized versions of these functions may depend on functions that are no longer used by the Solution Sites.
Improving the Code Base
In the Solution Sites Beta release code, business logic functions were called just before calling a rendering function that was used for displaying the data on the page. For example:
Dim mscsOrderGrp
Dim htmContent
Set mscsOrderGrp = LookupBasket()
htmContent = RenderBasket(mscsOrderGrp)
Response.Write htmContent
To improve the code base, changes have been made that involve restructuring the call stack of each ASP such that the bottom of the call stack will always be a rendering function, and the top of the call stack will always be a business logic function. For example:
Dim htmContent
htmContent = RenderBasket()
Response.Write htmContent
Function RenderBasket()
Dim mscsOrderGrp
Set mscsOrderGrp = LookupBasket()
‘…
End Function
This means that if the code for RenderBasket() has been modified by a third party between the Solution Sites Beta and Solution Sites Final Preview releases, the implementation of RenderBasket() in the Solution Sites Final Preview code may possibly break, or overwrite the modification (which in turn may break other code written with a particular implementation of RenderBasket() in mind).
Fixing Bugs
Bug fixes are not known to cause any problems with code written on Beta release Solution Sites. It is recommended that you take advantage of the bug fixes in the Final Preview release.
Strategies for developing sites that are easy to upgrade
The Solution Sites consist primarily of ASPs and schemas. All the binary components used by the Solution Sites are platform components, so the Solution Sites, as an application built on top of the Commerce Server 2000 platform, do not update the platform components. This presents the primary challenge for upgrading the Solution Sites, because ASP does not provide the built-in version control and self-registration mechanisms that DLLs offer.
Upgrading an ASP consists of copying one file on top of another, typically without regard to other files that may have a dependency on the original file. In addition, since an ASP is ASCII text, the source code is available for developers to modify, unlike a compiled DLL. There is no way to prevent the code from being modified by a developer and thus no way to ensure changes from the original code are not overwritten.
It is recommended that you take the following steps with your code to make sure you are in the best possible position to take advantage of enhancements to the Solution Sites, with minimal effort.
Isolate your code from the Solution Site code
Since ASPs are "upgraded" by copying over an existing file, and no version checking is possible, you should isolate all code specific to your implementation in include files that are not included with the Solution Sites. For example, if you have added a function for handling a custom pricing calculation that is used by the product display page (product.asp), you should create your own include file with the function declaration, such as product-ext.asp.
Then, when you upgrade to later releases of the Solution Sites, you only need to add a new include statement to product.asp instead of re-coding product.asp to handle your custom scenario.
Track the changes you make to Solution Sites functionality
This tactic goes hand-in-hand with the previous recommendation. Because the Solution Sites do not fit every possible scenario, it is possible that you have changed some of the business logic or rendering code in the Solution Sites to meet your needs. For example, you may have added code to handle currency conversion and exchange rates in the basket display page (basket.asp), and therefore you would have changed the code that renders the basket for display to the user. Instead of relying on the RenderBasket() function to exist directly in basket.asp, you should move your modified version to an include file, and comment-out or remove the original RenderBasket() code. This will allow you to preserve your changes, while still taking advantage of some of the performance enhancements and bug fixes made to the business logic code, although you will not be able to immediately take advantage of bug fixes made in the rendering code you modify.