Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1171837
  • 博文数量: 312
  • 博客积分: 12522
  • 博客等级: 上将
  • 技术积分: 3376
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-27 18:35
文章分类

全部博文(312)

文章存档

2016年(3)

2015年(1)

2013年(1)

2012年(28)

2011年(101)

2010年(72)

2009年(13)

2008年(93)

分类: 项目管理

2009-02-07 12:07:44



CQSchema不同服务器间的导出导入
一、导出schema
运行命令:
X:\Program Files\Rational\ClearQuest>cqload exportschema -dbset exported_schema liuliu 123 TestStudio "E:\scm\bugs.txt"
用法及解释:
cqload exportschema –dbset  //命令及参数
dbset_name                         //sample_schema, ini连接文件的名称
clearquest_login                   //liuliu CQ用户
clearquest_password            //123 用户密码
schema_name                     //TestStudio 导出的库所基于的schema的名称
script_full_path_name          //"E:\scm\bugs.txt"
成功后会看到以下字样,并且在E:\scm目录下生成一个bugs.txt的文本文件,这个文件不用手动创建,完成后将这个文件考到需要导入的机器中的某个路径下。
*********************************************************
Starting exportschema
*********************************************************
*********************************************************
Successfully completed exportschema
*********************************************************
二、导入schema
1、首先在要导入schema的数据库上建立相对应的几个数据库
?   
2、在maintencetool里new个新的schema
?   
3、个人觉得在导入前先设置好codepage(在此前,先将admin默认的空密码改掉)。
设置codepage命令如下:
运行cmd 输入命令:
installutil setdbcodepagetoplatformcodepage -dbset imported_schema admin 123
用法及解释:
installutil setdbcodepagetoplatformcodepage –dbset  //命令及参数
imported_schema                                                 //在mentencetool里建的schema的名称
admin                                                                //admin用户
123                                                                   //admin的密码 改掉后的
成功后会看到如下字样:
*********************************************************
Starting test setdbcodepagetoplatformcodepage
*********************************************************
Validating that database MASTR supports code page 936   (ANSI/OEM - Simplified C
hinese GBK)...
Successfully validated all databases.
Note: this command does not guarantee that all of the text in
this dbset is compatible with this code page setting.  Please
refer to the ClearQuest Release Notes for more information.
Successfully set the code page to: 936   (ANSI/OEM - Simplified Chinese GBK).
*********************************************************
Exit code 0 for test setdbcodepagetoplatformcodepage
*********************************************************
?   
4、下面就可以导入schema了,运行命令:
X:\Program Files\Rational\ClearQuest>cqload importschema -dbset imported_schema admin 123 " E:\scm\bugs.txt "
用法及解释:
cqload importschema –dbset  //命令及参数
dbset_name                        // imported_schema 这是在maintencetool里建的new的ini
clearquest_login                  //admin
clearquest_password           //123 用户密码
schema_script_full_path       //" E:\scm\bugs.txt ",假如将导入机子也有此目录
5、如果报错如下,则需要安装相应的包:
*********************************************************
Starting importschema
*********************************************************
The import file "E:\SCM\export_schema\change.txt" is invalid:
The schema requires the following package(s), which is(are) not currently installed in the database...
    revision '2.0' of package 'Customer'
    revision '3.0' of package 'Notes'
    revision '3.0' of package 'DefectTrackingSetup'.
*********************************************************
ERROR: importschema FAILED!
*********************************************************
6、解法如下,依次输入命令:
C:\Program Files\Rational\ClearQuest>packageutil installpackage -dbset 成都开发部故障管理系统 admin "123456789" Customer 2.0
C:\Program Files\Rational\ClearQuest>packageutil installpackage -dbset 成都开发部故障管理系统 admin "123456789" Notes 3.0
C:\Program Files\Rational\ClearQuest>packageutil installpackage -dbset 成都开发部故障管理系统 admin "123456789" DefectTrackingSetup 3.0
7、安装后再重新输入导入命令,成功后会看到一下字样:
*********************************************************
Starting importschema
*********************************************************

*********************************************************
Successfully completed importschema
*********************************************************
这样,就成功的导入了schema了。
转载请注明源自,请保留版权. 本贴地址:
 
 
还有种命令是import/export 两种版本之间差异的.以下是我近期整理的,大家交流一下吧.例子比较简单
---------------------------------------------------------------------
?Copying a Schema into a Schema Repository
1 Export the schema (all revisions) you want to copy using the command exportschema.
2 Import the copied schema into the schema repository using the command importschema.
Copying a Partial Schema into an Existing Schema
1 Export part of a schema (one or more revisions) using the command exportintegration.
2 Import the copied schema into an existing schema using the command importintegration.
Import CQ DB schema:
Importschema
Use the importschema subcommand, part of the cqload command line utility, to import an entire schema from a text file and add it to your schema repository. This subcommand is useful for sharing schemas with sites that can not access your schema repository or that use a different schema repository. Before using importschema, you must export the schema using the exportschema command. To import a partial schema, use the importintegration subcommand.
Syntax
cqload importschema [–dbset name] login password “schema_pathname”
Example:
cqload importschema –dbset 2003.06.00 admin “” “c:\schema.txt”
The preceding example imports a schema (exported in text form and saved in c:\schema.txt) into the current schema repository.
Importintegration
Use cqload importintegration subcommand to import schema modifications exported with cqload exportintegration.
Note: If ClearQuest MultiSite is in use, importintegration can only be performed at the working master site.
Syntax
cqload importintegration [–dbset name] login password schema_name[ new_record_type_name ] ”integration name” integration_version “schema_pathname” ”form_name”
Example
cqload importintegration -dbset 2003.06.00 admin “***" CR2006 "" "comment" 54 "d:\work\CR2005from45to53.txt" “”
The preceding example imports the exported schema into the CR2006 schema, leaving all record types with their original names.
export CQ DB schema
Exportschema
Use the exportschema subcommand, part of the cqload command line utility, to export an entire schema to a text file. You can then use the importschema subcommand to import the schema into another schema repository.
To export a partial schema, use the exportintegration subcommand.
Syntax
cqload exportschema [–dbset name] login password schema_name “schema pathname”
Example
cqload exportschema –dbset 2003.06.00 admin “” DefectTracking “c:\schema.txt”
The preceding example exports the contents of the DefectTracking schema to the file c:\schema.txt
Exportintegration
Use cqload exportintegration to export specific versions of a schema in a form that can be used to modify an existing schema. To import the data into another schema, use the importintegration subcommand. The exporting and importing schemas should use similar record types.
Syntax
cqload exportintegration [–dbset name] login password schema_name begin_rev end_rev [ record_type_to_rename ] “schema_pathname
Example
cqload exportintegration –dbset 2003.06.00 admin ‘’ Enterprise 5 8 ““  “c:\tmp\export.txt”
The preceding example exports changes made in versions five through eight of the Enterprise schema
转载请注明源自,请保留版权. 本贴地址:

 
阅读(1985) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-03-29 23:16:19

C:\>cqload exportintegration -dbset CQ_Re admin "" DefectTracking_zh 11 11 "" "E:\test\defect.txt" ********************************************************* Starting exportintegration ********************************************************* ********************************************************* Successfully completed exportintegration ********************************************************* C:\>cqload importintegration -dbset 7.0.0 admin "" DefectTracking_zh "" in 11 "E:\test\d

chinaunix网友2009-03-29 22:44:28

C:\>cqload exportintegration -dbset 7.0.0 admin "" Blank 3 3 "" "E:\test\blank.txt" ********************************************************* Starting exportintegration ********************************************************* ********************************************************* Successfully completed exportintegration ********************************************************* C:\>cqload importintegration -dbset 7.0.0 admin "" Blank "" in 3 "E:\test\blank.txt" "" **************