只要在
命令行里输入下面的
命令:
installutil setdbcodepagetoplatformcodepage -dbset cq
schema 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 编辑 ]