安装和升级 > 安装和配置指南 > 高级配置 > 数据库初始化和数据加载 > 创建数据库模式
  
创建数据库模式
必须创建数据库模式以便加载数据。在以下情景中,需要在 Windchill 安装期间加载数据:
完成新 Windchill 的安装后创建数据库架构时
完成附加 Windchill 模块的安装后创建数据库架构时
本节介绍了如何在选择不允许“PTC 解决方案安装程序”自动创建数据库模式的情况下手动创建数据库模式。
已通过 Windchill shell 完成数据库架构的创建。要打开 Windchill shell,请使用下列命令之一:
UNIX or Linux
<WT_HOME>/bin/windchill --java=<JAVA_HOME>/bin/java shell
Windows
<WT_HOME>\bin\windchill.exe --java=<JAVA_HOME>\bin\java shell
Oracle
1. 确保已启动 HTTP Server 和 Windchill 方法服务器。有关详细信息,请参阅启动 HTTP Server 和 Windchill 方法服务器
2. 使用下列命令之一加载数据库架构:
UNIX or Linux
对于单字节字符支持
windchill --javaargs="-Dwt.tools.sql.dbUser=<username> -Dwt.tools.sql.dbPassword=<password>" wt.tools.
sql.SQLCommandTool create_ddl_wt.sql <WT_HOME>/db/sql
对于多字节字符支持
windchill --javaargs="-Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>"
wt.tools.sql.SQLCommandTool create_ddl_wt.sql <WT_HOME>/db/sql3
Windows
对于单字节字符支持
windchill.exe --javaargs="-Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>"
wt.tools.sql.SQLCommandTool create_ddl_wt.sql <WT_HOME>\db\sql
对于多字节字符支持
windchill.exe --javaargs="-Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>"
wt.tools.sql.SQLCommandTool create_ddl_wt.sql <WT_HOME>\db\sql3
3. 使用下列命令之一加载其他列:
UNIX or Linux
windchill --jap=wt.properties\?com.ptc.windchill.upgrade.tools.
upgradeframework.java.args --cpp=wt.properties\?com.ptc.windchill.
upgrade.tools.classpath com.ptc.windchill.upgrade.statemachine.
DynamicLauncher -actc -noui
Windows
windchill.exe --jap=wt.properties\?com.ptc.windchill.upgrade.tools.
upgradeframework.java.args --cpp=wt.properties\?com.ptc.windchill.
upgrade.tools.classpath com.ptc.windchill.upgrade.statemachine.
DynamicLauncher -actc -noui
4. 使用下列命令之一初始化 DBTableHash:
UNIX or Linux
ant -f <WT_HOME>/bin/upgradeTools.xml -v populateDbHashes
Windows
ant.bat -f <WT_HOME>\bin\upgradeTools.xml -v populateDbHashes
SQL Server
1. 使用下列命令之一加载数据库架构:
UNIX or Linux
windchill --javaargs=”-Dwt.tools.sql.autoCommit=true
-Dwt.tools.sql.verbose=6 -Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>” wt.tools.sql.SQLCommandTool
create_ddl_wt.sql <WT_HOME>/db/sqlServer
Windows
windchill.exe --javaargs=”-Dwt.tools.sql.autoCommit=true
-Dwt.tools.sql.verbose=6 -Dwt.tools.sql.dbUser=<username>
-Dwt.tools.sql.dbPassword=<password>” wt.tools.sql.SQLCommandTool
create_ddl_wt.sql <WT_HOME>\db\sqlServer
2. 使用下列命令之一加载其他列:
UNIX or Linux
windchill --jap=wt.properties\?com.ptc.windchill.upgrade.tools.
upgradeframework.java.args --cpp=wt.properties\?com.ptc.windchill.
upgrade.tools.classpath com.ptc.windchill.upgrade.statemachine.
DynamicLauncher -actc -noui
Windows
windchill.exe --jap=wt.properties\?com.ptc.windchill.upgrade.tools.
upgradeframework.java.args --cpp=wt.properties\?com.ptc.windchill.
upgrade.tools.classpath com.ptc.windchill.upgrade.statemachine.
DynamicLauncher -actc -noui
3. 使用下列命令之一初始化 DBTableHash:
UNIX or Linux
ant -f <WT_HOME>/bin/upgradeTools.xml -v populateDbHashes
Windows
ant.bat -f <WT_HOME>\bin\upgradeTools.xml -v populateDbHashes