发新话题
打印

[原创] 设置CODE PAGE( 此文章被查看:2506次,被回复:4篇!! )

设置CODE PAGE

只要在命令行里输入下面的命令
installutil setdbcodepagetoplatformcodepage -dbset cqschema admin password

其中:
cqschema是你在maintenancetool中建的schema的名字;
admin是你在cq designer中登录时的admin用户
password是admin的密码(默认为空,在设置codepage前改为非空);

如果出现下面的话 就算成功了:
**********************************************
Starting test setdbcodepagetoplatformcodepage
**********************************************

.....(省略)
(主要是要看到)Successfully validated all database.
.....(省略)

**********************************************
Exit code 0 for test setdbcodepagetoplatformcodepage
**********************************************

那么如果不成功的话,可以参考下面一篇解决文章,就可以成功了:
--------------------------------------------------------------------------------------------------------------------------------
QUESTION: How does the code page validation work in ClearQuest 2003.06?

ANSWER:
    Once the code page has been set by installutil, the user databases inherit the data code page from the master. A user database can't have a separate code page from the master. When setting the data code page, think of it as setting the codepage of the ENTIRE dbset (master and user databases altogether).


    There are two types of validation going on.
    (1) The first is string in code page validation. Any text stored in either the user or master databases must be in the "data code page". The core does this
validation in memory (not by writing to the database), using the win32 API for code page conversions. If validation fails, an error message pops up like "The field "fieldname" contains characters not in the data code page…." followed by a list of invalid characters and their locations.

    (2)Second is database validation. When the data code page is set using installutil or by creating a new schema repository (and sample user database)
using the ClearQuest Maintenance Tool, a database validation is performed on the master database and all user databases (the whole dbset). This validation is done by writing all the characters in the data code page to the database and reading them back. If this fails, an error message pops saying the database does not support the requested data code page.


    As of the ClearQuest 2003.06 release, everything in ClearQuest now does the validation described in 1 (including installutil, maintenance tool, and
clearquest designer).ONLY installutil and the Maintenance Tool do the database validation described in 2.


    If a new database is created in the ClearQuest Designer, the database is not validated. This is a defect. The workaround is to rerun installutil
setdbcodepagetoplatformcodepage after creating a new database.


QUESTION:How to set the ClearQuest code page value?

SUMMARY:
User attempts to open ClearQuest designer for the first time. Enters in a user name of "admin" with no password. They receive the following error message:

"The data code page value for the 2003.06.00 schema repository is not set. Until you set the data code page value, only ASCII data can be entered into the databases. For instruction on how to set the data code page value, see the ClearQuest documentation…"

TROUBLESHOOTING TIPS:
1. Open the Command Prompt
2. cd: \Program Files\Rational\ClearQuest
3. Enter the following command:
E:\Program Files\Rational\ClearQuest>installutil lscodepage -dbset 2003.06.00 admin ""

The output should be similar to this:
"Starting test lscodepage
Code page of 2003.06.00: 20127 (US-ASCII) (default)
Code page of client: 1252 (ANSI - Latin I)"


4. Enter this command to change the codepage for the ClearQuest database:
E:\Program Files\Rational\ClearQuest>installutil
setdbcodepagetoplatformcodepage -dbset 2003.06.00 admin ""


The output will appear like this:
"Starting test setdbcodepagetoplatformcodepage
Validating that database MASTR supports code page 1252 (ANSI - Latin I)...
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: 1252 (ANSI - Latin I)."

You should now be able to open design and not see the message to fix the code
page.

-----------------------------------------------------------------------------------------------------------------------------------

在网上找了下code page的原理,见 http://www-128.ibm.com/developerworks/cn/rational/r-liusf/


[ 本帖最后由 刘刘 于 2006-9-13 14:58 编辑 ]



© 本文为 刘刘SCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员
i am on my way ....

TOP

呵呵,不错,鼓励原创!
不过,俺希望楼主能继续把20030615 MaintanceTool里提供的设置工具也一起补充进来,这样就是一个完整的CodePage设置的教程了!



© 本文为 懂你SCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员
优惠购买Rational,Telelogic,Hansky产品,企业VIP服务、实施
VIP服务电话:13581809377

TOP

要把code page的原理说下



© 本文为 amongSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员
Where are we ?

TOP

刚刚解决这个问题..呵呵.

© 本文为 st_simon 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

——惊是一种突然的觉醒。
我生下来不是求人谅解与同情的。

TOP

呵呵,公司最近刚处理了codepage的问题,处理完了我才找到这个帖子....看来以后要更勤奋的搜索~
刘刘的那个连接网址已经介绍的很清楚了.
我也在这里找到一篇一样的 http://www.uml.org.cn/pzgl/200604132.htm
是同一个人写的.这里也有很多关于cc/cq的学习资料,大家可以多学习学习~

© 本文为 brenda 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

TOP

发新话题