|
Home TOC Index |
|
Search
Feedback |
Cloudscape Server
The examples in this manual have been tested with the Cloudscape DBMS, which is included in the J2EE SDK.
Starting Cloudscape
Before your enterprise beans can access a Cloudscape database, you must run the Cloudscape server from the command line:
cloudscape -startYou should see output similar to the following:
Mon Aug 09 11:50:30 PDT 1999: [RmiJdbc] COM.cloudscape.core.JDBCDriver registered in DriverManager Mon Aug 09 11:50:30 PDT 1999: [RmiJdbc] Binding . . .. Mon Aug 09 11:50:30 PDT 1999: [RmiJdbc] No installation of RMI Security Manager... Mon Aug 09 11:50:31 PDT 1999: [RmiJdbc] RmiJdbcServer bound in rmi registryStopping Cloudscape
To stop the server type the following command:
cloudscape -stopYou should see output similar to the following:
Attempting to shutdown RmiJdbc server RmiJdbc Server RmiAddr is: //buzz/RmiJdbcServer WARNING: Shutdown was successful!
Note: If you stop the server with Control-c, files will not be closed properly. When the server is started the next time, it must perform recovery by rolling back noncommitted transactions and possibly applying the forward log.
Running the Interactive SQL Tool
The Cloudscape product includes a text-based, interactive tool called
ij. (This tool is not supported by Sun Microsystems, Inc.) You can run theijtool by typing this command:cloudscape -isqlWithin the tool, each command you type must end in a semicolon. The commands in the next example display all rows from the
orderstable, execute a SQL script namedmyscript.sql, and end the tool session:ij> select * from orders; ij> run 'myscript.sql'; ij> exit;The following example runs a SQL script from the command line:
cloudscape -isql < myscript.sqlThis command lists the names of all user tables in the database:
ij> select tablename from sys.systables where tabletype = 'T';The next example displays the column names of the
orderstable:ij> select columnname from sys.syscolumns where referenceid = (select tableid from sys.systables where tablename = 'orders');Before you deploy an entity bean with container-managed persistence, you use
deploytoolto generate the bean's SQL statements. Because the table names in these SQL statements are case sensitive, you must enclose them in double quotes:ij> select * from "TeamBeanTable";For more information on the
ijtool, please refer to the online documentation on the Cloudscape Web site:http://www.cloudscape.comCloudscape Server Configuration
The default database used by the Cloudscape server is named
CloudscapeDB. This database will reside in thecloudscapedirectory of your J2EE SDK installation. TheCloudscapeDBdatabase will be created automatically the first time it is accessed. The driver for the Cloudscape server is already configured in theconfig/default.propertiesfile. No further changes by you are necessary.
|
Home TOC Index |
|
Search
Feedback |