MSCS_CatalogScratch Database

The Product Catalog System uses this "scratch" database for storing persistent and empty tables created by the run-time methods of the Catalog API (Search, SpecificationSearch, Query, GetProducts). It is created by the catalog pup object and by the catalogcreate.sql script.

The MSCS_CatalogScratch database is similar to the tempdb. Commerce Server was designed not to use tempdb because it was necessary to create permanent tables, and tempdb is recreated every time SQL Server is restarted, and user rights would have to be re-applied.

This database must reside on your production catalog database server(s), and both run-time and design-time users of the Product Catalog System must have db_owner permissions on this database.

Use the catalogcleanup.vbs script in the Program Files/Microsoft Commerce Server 2002/Support directory to delete the temporary tables in this database.

Do not use this database for storing your own data.

This database is shared between multiple Catalog Resources (for example, if you have two sites using two different catalog databases, you will still have only one MSCS_CatalogScratch database).

The Product Catalog System stored procedures create temporary tables in this database (if needed), populate them with data, use them, and when the stored procedures end they empty the temporary tables. The stored procedures empty the temporary tables using the Truncate table, so the Transaction log will not be filled.

The empty table is used for a subsequent execution of the stored procedure. Because the table name and schema are persisted, SQL Server can reuse its query plan instead of generating a new query, and this results in better performance.

Database Growth

This database stores empty tables and thus does not use any space. If a table exists it will be used and not recreated.

The stored procedure inserts data temporarily in these tables, uses it, returns the data back to the caller, and then deletes the data in the tables. When not used, these tables are empty and not taking up space in the database. Manage this database the same way you would manage tempdb.

Database Maintenance

Do not rename the database; the database name is hard-coded in the stored procedures.

You do not need to backup or recover this database.

Copyright © 2005 Microsoft Corporation.
All rights reserved.