SmartClient 更改數據庫及導入數據

Custom database configuration

The SmartClient object-relational connector supports rapid end-to-end application prototyping and SDK evaluation. To configure this connector for use against a database other than the embedded HSQLDB instance:

1. Install JDBC driver

To install a JDBC driver, copy the downloaded .jar file, or unzip the downloaded .zip file, into your isomorphicSDK\WEB-INF\classes directory.

2. Create 'isomorphic' database

By default, the example applications provided in the SmartClient SDK look for their data in a database named isomorphic. You must create this database and import the sample data in order to use the example applications. Follow your database vendor's instructions for creating new databases and tablespaces.

Alternatively, you may edit the parameters in isomorphicSDK\WEB-INF\classes\server.properties to use an existing database. If you choose to do this, you must edit and save server.properties and restart your servlet container before attempting to import the sample data.

3. Configure SmartClient object-relational connector

The instructions in this section explain how to manually edit your configuration settings. Alternatively, you may use the graphical SmartClient Admin Console to edit these settings. If you are viewing this page from your application server, click here to open the Admin Console. Otherwise, open the console from: http://<your server>:<your port>/isomorphicSDK/tools/adminConsole.jsp.

To manually edit your configuration, open isomorphicSDK\WEB-INF\classes\server.properties in a text editor. This file contains configuration blocks for HSQLDB, MySQL, Oracle, PostgreSQL, and DB2. The sql.defaultDatabase variable controls which block is actually used by the system. To use a database other than the embedded HSQLDB, comment out the line that reads sql.defaultDatabase: HSQLDBand uncomment the line that reads sql.defaultDatabase: <your database type>.

After you have selected the database type, ensure that other configuration parameters in this file are set appropriately for your system. For a custom installation, you may need to change the values of the following variables:

sql.<DBtype>.driver.serverNameName or IP address of the system on which the database is running
sql.<DBtype>.driver.portNumberTCP port on which the database is listening for connections
sql.<DBtype>.driver.databaseNameName of the database as known by the database server
sql.<DBtype>.driver.userDatabase username for SmartClient requests. Ensure that this user has the following privileges: create/alter/drop tables; create/drop sequences (Oracle); insert/update/replace/delete rows.
sql.<DBtype>.driver.passwordPassword for the given database username.

Refer to the comments in server.properties for more information.

Note: You must restart your servlet engine whenever changes have been made to server.properties.

4. Import SDK sample data

To import the sample data:

  1. Open the SmartClient Admin Console.

  2. Click Import DataSources in the options tree at top left.

  3. Click/shift-click or right-click to select all datasources in the list at top right.

  4. Click on the Import button.

Importing all sample data may take more than 10 seconds. A dialog will appear when the import operation has completed.

If you get an out of memory error when importing a very large data set (e.g. the productRevenue sample data), you will need to increase the maximum heap size of your JVM (e.g. java.exe -Xmx128M).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值