Microsoft SQL Server・HowtoMicrosoft SQL Server・HowtoThis howto contains configuration help on using MS SQL Server with Turbine. This Howto supplements the TDK Howto page. このHowtoはTurbineにMS SQL Serverを使用する際の設定のヘルプを含みます。 このHowtoはTDK Howtoページを補足するものです。 We appreciate all patches and contributions that improve this document. 私たちはこのドキュメントを改善するパッチや貢献に感謝します。 Create Microsoft SQL Server・DatabaseMicrosoft SQL Server・Databaseの作成Use the SQL Server Enterprise Manager to create the database. When using the TDK, it helps to name the database the same name as your project. If the name is not the same, you will need to manually change the database name in your properties files. After the database is created, you will need to create a new user, or give an existing user permissions to the new database. Create the new user with SQL Server Authentication, and assign the users default database to the newly created database. Make sure the database user has the db_owner role. Please refer to SQL Server documentation for further details. データベースを作成するにはSQL Server Enterprise Managerを使用してください。 TDKを使用する場合、データベースをあなたのプロジェクトと同じ名前とすることを推奨します。 名前が同じではない場合、プロパティファイル中のデータベース名を手動で変更する必要があるでしょう。 データベースが作成された後、新規のユーザを作る必要があるか、 あるいは既存のユーザに新しいデータベースへのアクセス許可を与える必要があるでしょう。 SQL Serverへの認証が通る新規のユーザを作り、 新しく作成されたデータベースをそのユーザのデフォルト データベースとして割り当ててください。 データベースユーザがdb_ownerのロールを持っていることを確認してください。 その他の詳細に関してはSQL Serverドキュメンテーションを参照してください。 JDBC DriverJDBCドライバMicrosoft has a JDBC driver for MS SQL Server in beta. Alternately, a third party commercial driver from JDBC(TM) Technology - Drivers, the JDBC-ODBC bridge driver from Sun, or the free driver from FreeTDS can be used. マイクロソフトに JDBC driver for MS SQL Serverのベータ版があります。 JDBC(TM)Technology - Driversによるサードパーティのドライバでは、SunのJDBC-ODBC ブリッジ-ドライバ、またはFreeTDSのフリーのドライバを使用することができます。 The driver from FreeTDS, as of version 0.51, is unstable and buggy, and not recommended for production environments. Use at your own risk. FreeTDSのドライバはバージョン0.51の時点では、不安定でバグが多く、実用には推奨されません。自己責任で使用してください。 The JDBC-ODBC bridge driver from Sun is included with the Java 2 SDK Standard Edition as package sun.jdbc.odbc. Sun's statement on this driver is, "Note that the bridge driver included in the SDK is appropriate only for experimental use or when no other driver is available." So use at your own risk. Also, if you are using a non-windows box to run Turbine, you will need to find ODBC drivers for SQL server for that platform. For UNIX environments, you can use unixODBC. Please follow the ODBC driver instructions and setup a DSN for the new database. You must uncheck the box that says, "Use ANSI nulls, paddings and warnings.". SunのJDBC-ODBC ブリッジ-ドライバはパッケージ sun.jdbc.odbc としてJava 2 SDKに含まれています。 Sunのこのドライバについての説明書きは、 "SDKに含まれたブリッジ-ドライバは実験的なもの、または他のドライバが利用できない場合にのみ使用してください。"となっており、自己責任での使用となっています。 さらに、Turbineの運用に非Windows環境を使用している場合、 そのプラットフォーム用のSQL ServerのODBCドライバを探す必要があるでしょう。 UNIX環境については、unixODBCが使用できます。 ODBCドライバの使用説明書に目を通し、 新しいデータベース用のDSN(訳注:DataSourceName)をセットアップしてください。 "Use ANSI nulls, paddings and warnings."というチェックボックスの選択は解除しなければなりません。 Edit properity filesプロパティファイルの編集In the ...\WEB-INF\build\build.properties file make sure that; ファイル ...\WEB-INF\build\build.properties を確認しましょう; database=mssql database.manual.creation = true And set the JDBC connection information: JDBCコネクション情報の設定: databaseDriver = [JDBC Driver] databaseUser = [db username] databasePassword = [db password] databaseHost = [hostname] databaseUrl = [Follow JDBC Driver Docs]
If you are using the Microsoft driver
(i.e.
もしMicrosoftのドライバ( jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod=cursor If you are using the JDBC-ODBC bridge driver: JDBC-ODBC ブリッジ-ドライバを使用している場合: databaseUrl = jdbc:odbc:[DSN Name] databaseHost = [hostname] databaseDriver = sun.jdbc.odbc.JdbcOdbcDriver databaseUser = [db username] databasePassword = [db password] In the ..\WEB-INF\conf\TurbineResources.properties file, set; ファイル ...\WEB-INF\conf\TurbineResources.properties の設定; services.DatabaseService.database.adaptor=DBMSSQL services.DatabaseService.database.adaptor.DBMSSQL=[JDBC Driver] |