Wednesday, July 11, 2007

How to export/import schema in ClearQuest (Part 1)

How to export/import schema in ClearQuest (Part 1)

1. Import schema to one schema repository which the schema is not existing

a. export the schema using the following command.
cqload exportschema –dbset dbsetname admin_user pwd schema_name exportpath

dbsetname is the name of the schema repository. You can find the dbset name under clearquest maintenance tool

schema_name is the name of the schema which you want to export. In clearquest, the schema repository composed of multiple schema which define the different entiry/fields/action/flow

Here is the example to export the schema gqasch from the schema repository of cqms. testingclan.site with admin,
cqload exportschema –dbset cqms.testingclan.site admin 123456 gqasch c:\temp\schemaexport.txt

After run the command, you can find the whole schema file under c:\temp

b. Import the schema using the following command.
cqload importschema –dbset dbsetname admin_user pwd importfilepath
dbsetname is the same meaning as that in exportschema command. In the importschema command, no need to specify the schema name like exportschema since the name is in the export file

Here is the example to import above schema to the repository of cqms.productclan.site with user admin,
cqload importschema –dbset cqms. productclan.site admin 345678 c:\temp\schemaexport.txt

After import ,you can find the schema gqasch in the ClearQuest designer with the same version as the cqms.productclan.site.

Pls note that if the target schema repository has the schema named gqasch, the import command will fail

2. Import schema to one schema repository which the schema is existing already
In the SDLC, we should setup multiple env for our products for different usage. The production env is for end-user while the testing env is for the enhancement/bugfix before migration to the production for example. Here we assume that cqms. productclan.site is our production env and cqms.testingclan.site is our testing env. After the above export/import actions, each schema repository contains the schema gqasch with version 9.
The following steps is to show how to apply the updated schema to the production env after gqasch version 12 (after multiple check-out/check-in) is ready in testing env.

1. export the latest version of gqasch
Since the schema gqasch exists in the product env(cqms.productclan.site) already, we need use the exportintegration to export the schema.

The syntax of the command is,
cqload exportintegration –dbset dbset admin_user pwd schema_name begin_rev end_rev record_type_to_rename schema_pathname

dbset, admin_user, schema_name has the same meaning as mentioned above.
begin_rev, end_rev means the versions to be exported. If begin_rev is 9 and
env_rev 10, it means export the version 9 and 10 of schema_name
record_type_to_rename is always set "" although it will be used sometimes

Now let’s export the latest schema gqasch 12 from testing env using following command,

cqload exportintegration –dbset cqms.testingclan.site admin 123456 gqasch 12 12 "" c:\temp\updatedschema.txt

Pls be noted the parameter of begin_rev and end_rev is set to 12 12 instead of 9 12.

We can find the updated schema under c:\temp

2. import the updated version of gqasch
The following steps are to show how to import the schema to the production env(cqms.productclan.site)

Using the importintegration to import the updated schema.
The syntax of importintegration is
cqload importintegration –dbset dbset admin_user pwd schema_name new_record_type_name integration_name integration_version schema_pathname formname

Here is the command to import the schema to production clan
cqload importintegration –dbset cqms.productclan.site admin 345678 gqasch "" "comment of the schema, just description" 12 c:\temp\updatedschema.txt

One thing should be noted that after import, the version of the schema gqasch is 10 intead of 12.

Export/import schema is frequently used in the schema upgrade. Here is the summary of exportschema/importschema and exportintegration/importintegration usage
a. exportschema/importschema is to export/import the whole schema with all version from the original to the target schema repository. The schema name and the version are same in both repository.
b. Importintegration/exportintegration is to export/import partial version from the original to the target schema repository.
c. Command cqload importschema fails if the schema name is existing in the target schema repository. Cqload importintegration fails if the schema name is not existing in the target schema repository.
d. The version in target repository is same as the exported schema after using importschema. The version in target repository is increase by 1 after using importintegration regardless of the version of exported schema.


To Be Continued

3 comments:

Anonymous said...

[B]NZBsRus.com[/B]
Dismiss Idle Downloads Using NZB Downloads You Can Quickly Search High Quality Movies, Console Games, Music, Applications and Download Them @ Accelerated Rates

[URL=http://www.nzbsrus.com][B]NZB Search[/B][/URL]

Anonymous said...

Reckon the demonic with two backs casinos? countenance this novel [url=http://www.realcazinoz.com]casino[/url] advisor and overlay online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also dissect our untrained [url=http://freecasinogames2010.webs.com]casino[/url] orientate at http://freecasinogames2010.webs.com and broaden the contend against the be before of virtual tiring materialize !
another novel [url=http://www.ttittancasino.com]casino spiele[/url] emigrate is www.ttittancasino.com , preferably than of german gamblers, slow in not employed online casino bonus.

Anonymous said...

prepositor in lady this without menu or constraint [url=http://www.casinoapart.com]casino[/url] hand-out at the gaffer [url=http://www.casinoapart.com]online casino[/url] manual with 10's of with it [url=http://www.casinoapart.com]online casinos[/url]. beget a go to pieces at [url=http://www.casinoapart.com/articles/play-roulette.html]roulette[/url], [url=http://www.casinoapart.com/articles/play-slots.html]slots[/url] and [url=http://www.casinoapart.com/articles/play-baccarat.html]baccarat[/url] at this [url=http://www.casinoapart.com/articles/no-deposit-casinos.html]no lodge casino[/url] , www.casinoapart.com
the finest [url=http://de.casinoapart.com]casino[/url] to UK, german and all owed the world. so in test of the one-off [url=http://es.casinoapart.com]casino en linea[/url] corroborate us now.