インストールおよびアップグレード > Installation and Configuration Guide > 高度な設定 > データベースの初期化とデータのロード > データベーススキーマの作成
  
データベーススキーマの作成
データをロードするには、データベーススキーマを作成する必要があります。以下のシナリオでは、Windchill のインストール中にデータをロードする必要があります。
新しい Windchill をインストールした後にデータベーススキーマを作成する
追加の Windchill モジュールをインストールした後にデータベーススキーマを作成する
このセクションでは、PTC ソリューションインストーラによってデータベーススキーマを自動的に作成しないように指定した場合に、データベーススキーマを手動で作成する方法について説明します。
データベーススキーマの作成は、Windchill シェルで行います。Windchill シェルを開くには、以下のいずれかのコマンドを使用します。
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