安裝與升級 > Windchill 安裝與組態 > 進階組態 > 資料庫初始化及資料載入 > 建立資料庫結構描述
  
建立資料庫結構描述
必須建立資料庫結構描述,才能載入資料。下列情境需要在 Windchill 安裝期間載入資料:
當您建立資料庫結構描述時,請遵循新 Windchill 安裝
當您建立資料庫結構描述時,請遵循其他 Windchill 模組的安裝
本節說明如果您選擇不要讓 PTC Solution Installer 自動建立資料庫 結構描述,如何手動建立資料庫結構描述。
您可從 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. 請確保已啟動 PTC HTTP Server 與 Windchill 應用伺服器。如需詳細資訊,請參閱啟動 PTC 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. 使用下列其中一個指令來初始化 DBTableHashes:
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. 使用下列其中一個指令來初始化 DBTableHashes:
UNIX or Linux
ant -f <WT_HOME>/bin/upgradeTools.xml -v populateDbHashes
Windows
ant.bat -f <WT_HOME>\bin\upgradeTools.xml -v populateDbHashes