Microsoft Knowledge Base Email Alertz

This step-by-step article describes how to generate profile schema scripts to be used during the unpackaging process by the profile system.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 307942 - Last Review: July 1, 2004 - Revision: 1.4

How To Generate Profile Scripts to Be Used During Unpackaging

This article was previously published under Q307942

On This Page

SUMMARY

This step-by-step article describes how to generate profile schema scripts to be used during the unpackaging process by the profile system.

Packing Extended Profile Schema

If you want to create a package that contains an extended profile schema, you need to generate the script before you package your site. The following steps outline how to package an extended profile schema:
  1. Use Microsoft SQL Server Enterprise Manager to extend the UserObject table and add your own attributes. For more information, see the SQL Server documentation.
  2. Add the new data members to the data object. For information about how to add a new data member, see the following Microsoft Web site:
    http://msdn.microsoft.com/en-us/library/ms956393.aspx (http://msdn.microsoft.com/en-us/library/ms956393.aspx)
  3. Use SQL Server Enterprise Manager to generate scripts for your extended profile schema. For more information, see the SQL Server documentation.
  4. When you package your site, Site Packager prompts you to specify the location of the schema definition script that you generated. If you do not specify your script, Site Packager packages the default script, which does not include your extension.
NOTES:
  • If you are using the default profile schema (SQL Server or Active Directory), scripted SQL files have already been created, which are located in the \Program Files\Microsoft Commerce Server\ folder. If you are using SQL Server, the file is named ProfileSQL.sql. If you are using Active Directory, the file is named ProfileAD.sql.
  • If you back up and restore the entire database, the schema remains intact; therefore, when you are prompted for the profile schema scripts (during the packaging process), leave them blank and continue. When this field is blank, none of the tables (and so forth), which already exist in the restored database, are re-created during the unpackaging process; however, if you specify an incorrect script, the profile system schema and data may be overwritten or otherwise damaged.

Determining Which Tables to Script

Depending on the extent of customization that exists on your Commerce Server 2000 profile system, you may need to script additional tables other than the default UserObject table.

To determine which tables need to be scripted:
  1. Start the Commerce Server Microsoft Management Console (MMC).
  2. In the Commerce Server Manager snap-in, click Global Resources.
  3. Locate the Profiles global resource for your Commerce store. For example, by default, the Profiles global resource for the Retail solution site is displayed as:
    Profiles(computername_Retail_Commerce)
  4. Click the Profiles global resource, click Profile Catalog, and then click Data Sources.
  5. Each object that is displayed directly under Data Sources is either an LDAPv3 (possibly Active Directory) data source or an OLE DB data source. By default, the data source of the Retail solution site is ProfileService_SQLSource.
  6. Right-click a data source, and then click Properties. On the Data Source tab, note whether the source is LDAPv3 or OLE DB; you only need to script the OLE DB data sources.

    Repeat this step for each data source.
  7. After you locate all of the OLE DB data sources, you need to determine to which database each data source is bound:
    1. Right-click the OLE DB data source, and then click Properties.
    2. On the Partitions tab, select a partition, and then click Edit. Note the initial catalog (which is the database) and data source (which is the database server).

      Repeat step a and step b for each partition that is listed.
  8. Now that you know the name of the databases and database servers, you need to determine which tables to script in each database:
    1. Click Data Source, and then click Data Objects.

      NOTE: Data objects are tables that are exposed to the Profile system.
    2. In the details pane, a list of the exposed tables is displayed; note the Name column where each name that is listed is a table name.

      Repeat step a and step b for each data source that is listed.
  9. With the names of the databases, the database servers, and the tables that are in each database, you can script the profile system. For information about how to generate SQL scripts, refer to the SQL Books Online.

    NOTES:
    • You may require assistance from your SQL administrator for this procedure.
    • If more than one data source is used, be sure to combine the scripts from each data source together.
    • In the master SQL script, be sure to correctly identify which data source you are using and during which time you are using it.

REFERENCES

You can also find this information in the Commerce Server 2000 online documentation at the following Web site:
http://msdn.microsoft.com/en-us/library/ms915082.aspx (http://msdn.microsoft.com/en-us/library/ms915082.aspx)

APPLIES TO
  • Microsoft Commerce Server 2000 Standard Edition
Keywords: 
kbhowto KB307942
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

jalpesh - jpv_7580 NOSPAM-AT-NOSPAM hotmail.com Report As Irrelevant  
Written: 10/19/2004 3:09 AM
Its is good for the first time user of the comerce server but please get more details about the extended profile schema where we have to do the modification or follow a procedure during the packing or unpacking a site thanks for your advise your forum helping great for beginner like me. jalpesh