打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
CQSchema不同服务器间的导出导入
分类: SCM
 

导出和导入ClearQuest的模式

分类: ClearQuest 150人阅读 评论(0) 收藏 举报

目录(?)[+]

 

疑问

什么工具可以用来导出和导入IBM Rational ClearQuest的模式?

答案

ClearQuest有一个命令行工具,cqload,它允许从模式存储库(MASTR)中导出整个模式并且可以导入到另一个模式存储库中。这个工具把模式导出到一个文件里,用户可以指定文件名和存储位置。请在ClearQuest信息中心查看导出和导入模式的主题来获得更多的信息。

cqload工具必须在DOS命令行下才能使用。另外,要导出的模式必须是没有处于检出状态的。如果运行cqload的时候ClearQuest Designer是打开的,那么需要关闭并重启它才能显示运行cqload所产生的变更。

exportschema子命令用于将整个模式导出到一个文本文件,之后您可以用importschema子命令把这个文本文件中的模式导入到另一个模式存储库中。下面是相关的语法说明和实例:


cqload exportschema -dbset <connection name> <cq-login> <cq-password> <schema name> "<script full path name>"

参数描述
<connection name>在ClearQuest维护工具里已经存在并且关联到模式存储库的连接名。2003.06.00 (在例子中出现的值)是2003版本的ClearQuest维护工具里自动生成的默认值
<cq-login>ClearQuest管理账号登陆名
<cq-password>ClearQuest管理账号的密码(如果没有密码就输入"")
<schema name>在ClearQuest Designer里显示的schema准确的名字。要区分大小写
<script full path name>这个值必须用双引号引起来,允许使用UNC格式的路径

例子:

cqload exportschema -dbset 2003.06.00 admin "" DefectTracking "c:\temp\schema.txt"

这个命令将DefectTracking模式的内容导出到文件c:\temp\schema.txt里。

importschema子命令是用于从文本文件导入整个模式到模式存储库中。您可以用它在不能访问主模式存储库的站点或不同的模式存储库共享完整的模式。

cqload importschema -dbset <connection name> <cq-login> <cq-password> "<script full path name>"

例子:

cqload importschema -dbset 2003.06.00 admin "" "c:\temp\schema.txt"

对于这两个子命令,当执行完时会显示是否成功导出或导入的说明信息。

其他注意事项:




详解二:

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了。
转载请注明源自www.SCMLife.com,请保留版权. 本贴地址:http://bbs.scmlife.com/viewthread.php?tid=768
 
 
还有种命令是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
转载请注明源自www.SCMLife.com,请保留版权. 本贴地址:http://bbs.scmlife.com/viewthread.php?tid=768
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
java – Room – 未向注释处理器提供Schema导出目录,因此我们无法导出架构
spring security 3.1配置过程从简单到复杂详细配置
Rational ClearQuest手册
ClearCase与ClearQuest的集成
应用Rational 工具简化基于J2EE的项目 (二)启动项目
初始化基本设置
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服