preference_management - james-gone/knowledge GitHub Wiki

在混合环境的服务器端导出导入 preference

混合环境指服务器端的操作系统有 Linux 或者 Unix,调度 Dispatecher 服务器是 Windnows 。

在这样的环境下, Linux / Unix 服务器端的字符集是用的 UTF-8 。

如果从 Windows 中文环境的胖客户端导出首选项 preference.xml 的时候,会导出字符集是 ISO-8859-1 的 xml 文件。使用这样导出的首选项 preference.xml 文件再导入测试或者开发环境时,可能造成一些错误。

未避免错误,更好的方式是,从 Linux / Unix 服务器端, 使用工具导出首选项 preference.xml 做备份,以及导入更新。

  • utilities preferences_manager
\# 导入
\# To import the site preferences in an XML file, \
\# skipping the processing for all.
\# To preferences in the XML file that exist in the database, 
\# enter the following command on a single line:
preferences_manager -u=infodba -p=password -g=dba -mode=import \
-scope=SITE -file=C:\temp\site_pref.xml -action=SKIP

\# 导出
\# enter the following command on a single line:
preferences_manager -u=infodba -p=password -g=dba -mode=export \
-scope=SITE -file=/tmp/site_pref.xml

  • excuted
ssh infodba@prdentsvr
cd /app/Siemens/Teamcenter10/bin
preferences_manager -u=admin -p=admin-password -g=dba -mode=export -scope=SITE \
-out_file=/home/infodba/preference$(date +%Y%m$d).xml \
-report_file=/home/infodba/preference_export$(date +%Y%m%d).log
⚠️ **GitHub.com Fallback** ⚠️