How To Generate Profile Scripts to Be Used During Unpackaging (307942)
The information in this article applies to:
- Microsoft Commerce Server 2000
This article was previously published under Q307942 SUMMARY
This step-by-step article describes how to generate profile schema scripts to be used during the unpackaging process by the profile system.
back to the top
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:
- Use Microsoft SQL Server Enterprise Manager to extend the UserObject table and add your own attributes. For more information, see the SQL Server documentation.
- 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:
- Use SQL Server Enterprise Manager to generate scripts for your extended profile schema. For more information, see the SQL Server documentation.
- 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.
back to the top
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:
- Start the Commerce Server Microsoft Management Console (MMC).
- In the Commerce Server Manager snap-in, click Global Resources.
- 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)
- Click the Profiles global resource, click Profile Catalog, and then click Data Sources.
- 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.
- 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. - After you locate all of the OLE DB data sources, you need to determine to which database each data source is bound:
- Right-click the OLE DB data source, and then click Properties.
- 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.
- Now that you know the name of the databases and database servers, you need to determine which tables to script in each database:
- Click Data Source, and then click Data Objects.
NOTE: Data objects are tables that are exposed to the Profile system. - 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.
- 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.
back to the top
REFERENCES
You can also find this information in the Commerce Server 2000 online documentation at the following Web site:
back to the top
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB307942 |
---|
|