Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 60917 invoked from network); 28 Jun 2005 22:48:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2005 22:48:58 -0000 Received: (qmail 38242 invoked by uid 500); 28 Jun 2005 22:48:54 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 37977 invoked by uid 500); 28 Jun 2005 22:48:51 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 37108 invoked by uid 500); 28 Jun 2005 22:48:43 -0000 Delivered-To: apmail-incubator-derby-cvs@incubator.apache.org Received: (qmail 36961 invoked by uid 99); 28 Jun 2005 22:48:24 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 28 Jun 2005 15:48:16 -0700 Received: (qmail 60307 invoked by uid 65534); 28 Jun 2005 22:48:14 -0000 Message-ID: <20050628224814.60305.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r202296 [3/16] - in /incubator/derby/docs/trunk/src: adminguide/ devguide/ getstart/ ref/ tools/ tuning/ Date: Tue, 28 Jun 2005 22:46:37 -0000 To: derby-cvs@incubator.apache.org From: fuzzylogic@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: incubator/derby/docs/trunk/src/adminguide/cadminspace21579.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/cadminspace21579.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/cadminspace21579.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/cadminspace21579.dita Tue Jun 28 15:46:15 2005 @@ -1,4 +1,6 @@ + - - -Reclaiming unused space: Overview - +Reclaiming unused space +A table +or index (sometimes called a conglomerate) can contain unused space +after large amounts of data have been deleted or updated. + +Compressing tables and indexes + -

A table or index -(sometimes called a conglomerate) can contain unused space after large amounts -of data have been deleted or updated. This happens because, by default, does not return unused -space to the operating system. Once a page has been allocated to a table or -index, does not -automatically return the page to the operating system until the table or index -is dropped, even if the space is no longer needed. However, does +

This happens because, by default, does +not return unused space to the operating system. After a page has been allocated +to a table or index, does +not automatically return the page to the operating system until the table +or index is dropped, even if the space is no longer needed. However, does provide a way to reclaim unused space in tables and associated indexes.

+

If you determine that a table and its indexes have a significant amount +of unused space, use the SYSCS_UTIL.SYSCS_COMPRESS_TABLE procedure to reclaim +that space. The procedure returns the reclaimed space to the operating system. +By default, the SYSCS_UTIL.SYSCS_COMPRESS_TABLE procedure instructs to +compress the table and its related indexes concurrently, which can use a lot +of temporary disk space and memory.

+

For example, after you have determined that the FlightAvailability +table and its related indexes have too much unused space, you could reclaim +that space with the following command:

call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'FLIGHTAVAILABILITY', 0);

The +third parameter in the SYSCS_UTIL.SYSCS_COMPRESS_TABLE() procedure determines +whether the operation will run in sequential or non-sequential mode. If you +specify 0 for the third argument in the procedure, the operation +will run in non-sequential mode. In sequential mode, compresses +the table and indexes sequentially, one at a time. Sequential compression +uses less memory and disk space but is slower. To force the operation to run +in sequential mode, substitute a non-zero smallint value for the third argument. +The following example shows how to force the procedure to run in sequential +mode:

call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'FLIGHTAVAILABILITY', 1);
+
For more information about this command, see the .
- Modified: incubator/derby/docs/trunk/src/adminguide/derbyadmin.ditamap URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/derbyadmin.ditamap?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/derbyadmin.ditamap (original) +++ incubator/derby/docs/trunk/src/adminguide/derbyadmin.ditamap Tue Jun 28 15:46:15 2005 @@ -19,7 +19,7 @@ - + Apache Software Foundation @@ -28,25 +28,25 @@ Apache Derby - + - + - - - + + + - - + + - + @@ -59,101 +59,105 @@ - + - + - + - + - + - - + + - - + + - + + + - - + - + - - - + - + - - + + - + - - - - - - + + - + - + + + + + - - - - + - + + - + - + - + - + @@ -162,16 +166,16 @@ - + - + - + @@ -187,41 +191,40 @@ - - - - + + - + - - + - - + + - + - + - - - - - - + + + + + + @@ -235,8 +238,8 @@ - - + + @@ -245,11 +248,10 @@ - + - - + Modified: incubator/derby/docs/trunk/src/adminguide/radminapps811974.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminapps811974.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminapps811974.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminapps811974.dita Tue Jun 28 15:46:15 2005 @@ -17,27 +17,26 @@ limitations under the License. --> -Network Server error messages +Error message differences Network Servererror messages and Error messagesand the Network Server -

The Network Server reports only the first error/warning if multiple -errors or warnings occur for a given statement. For example: ij> create table ai (x int, y int generated always as identity +

The Network Server reports only the first error or warning message +if multiple errors or warnings occur for a given statement. For example: ij> create table ai (x int, y int generated always as identity (increment by 200000000)); ij> insert into ai (x) values (1),(2),(3),(4),(5),(6),(7), (8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19);

-

The Network Server generates the following error with the exception -message appended to error: ERROR 42Z24: Overflow occurred in identity for column 'Y' in table 'AI': +

The Network Server generates the following error message and appends +the exception message to the error: ERROR 42Z24: Overflow occurred in identity for column 'Y' in table 'AI': SQLSTATE: 22003: The resulting value is outside the range for the data type INTEGER.

-

Using the embedded -driver, you would see the following two SQL exceptions: : ERROR 42Z24: Overflow occurred in identity for column 'Y' in table 'AI'. +

The embedded +driver, however, would generate two SQL exceptions:ERROR 42Z24: Overflow occurred in identity for column 'Y' in table 'AI'. ERROR 22003: The resulting value is outside the range for the data type INTEGER.

-

This is because the Network Client driver reports only one SQLException -or one SQLWarning per statement.

+

This is because the network client driver reports only one SQLException +or one SQLWarning per statement.

- Modified: incubator/derby/docs/trunk/src/adminguide/radminappsclientxmp.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminappsclientxmp.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminappsclientxmp.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminappsclientxmp.dita Tue Jun 28 15:46:15 2005 @@ -20,20 +20,19 @@ Network client driver examples
Example 1

The following example connects to the -default server name localhost on the default port, 1527, and -to the database sample. It specifies the user and password URL -attributes. You must set these attributes before attempting to connect to -the server.

jdbc:derby://localhost:1527/sample;user=judy;password=no12see;
+default server name localhost on the default port, 1527, and to the database +sample. It specifies the user and password URL attributes. You must set these +attributes before attempting to connect to the server.

jdbc:derby://localhost:1527/sample;user=judy;password=no12see;
Example 2

The following example specifies both and Network Client driver attributes: jdbc:derby://localhost:1527/sample;create=true;user=judy; password=no12see;

Example 3

This example connects to the default server -name localhost on the default port, 1527, and includes the path -in the database name portion of the URL.

jdbc:derby://localhost:1527/c:/my-db-dir/my-db-name;user=judy; +name localhost on the default port, 1527, and includes the path in the database +name portion of the URL.

jdbc:derby://localhost:1527/c:/my-db-dir/my-db-name;user=judy; password=no12see;
-
Example 4

The following is a sample program fragment -that connects to the Network Server using the Network Client driver:

String databaseURL = "jdbc:derby://localhost:1527/sample"; +
Example 4

The following example shows how to use +the network client driver to connect the network client to the Network Server:

String databaseURL = "jdbc:derby://localhost:1527/sample"; // Load Derby Network Client driver class Class.forName("org.apache.derby.jdbc.ClientDriver"); // Set user and password properties Modified: incubator/derby/docs/trunk/src/adminguide/radminconfig.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconfig.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconfig.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconfig.dita Tue Jun 28 15:46:15 2005 @@ -27,8 +27,8 @@ Syntax derby.drda.traceAll=[true|false]
Default

False.

Examplederby.drda.traceAll=true -
Static or Dynamic

Dynamic. System values can be -changed using commands or the servlet interface after the Network Server has +

Static or dynamic

Dynamic. System values can be +changed by using commands or the servlet interface after the Network Server has been started.

Modified: incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdalogconnections.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdalogconnections.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdalogconnections.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdalogconnections.dita Tue Jun 28 15:46:15 2005 @@ -26,8 +26,8 @@ Syntax derby.drda.logConnections=[true|false]
Default

False.

Examplederby.drda.logConnections=true -
Static or Dynamic

Dynamic. System values can be -changed using commands or the servlet interface after the Network Server has +

Static or dynamic

Dynamic. System values can be +changed by using commands or the servlet interface after the Network Server has been started.

Modified: incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdatracedirectory.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdatracedirectory.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdatracedirectory.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconfigdb2jdrdatracedirectory.dita Tue Jun 28 15:46:15 2005 @@ -23,14 +23,14 @@ derby.drda.traceDirectory -
Indicates the location for tracing files.
+
Indicates the location of tracing files.
Syntax derby.drda.traceDirectory=tracefiledirectory -
Default

If the derby.system.home property +

Default

If the derby.system.home property has been set, it is the default. Otherwise, the default is the current directory.

Examplederby.drda.traceDirectory=c://trace -
Static or Dynamic

Dynamic. System values can be -changed using commands or the servlet interface after the Network Server has +

Static or dynamic

Dynamic. System values can be +changed by using commands or the servlet interface after the Network Server has been started.

Modified: incubator/derby/docs/trunk/src/adminguide/radminconfigportnumber.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconfigportnumber.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconfigportnumber.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconfigportnumber.dita Tue Jun 28 15:46:15 2005 @@ -27,7 +27,7 @@
Default

If no port number is specified, 1527 is the default.

Examplederby.drda.portNumber=1110 -
Static or Dynamic

Static. You must restart the Network +

Static or dynamic

Static. You must restart the Network Server for changes to take effect.

Modified: incubator/derby/docs/trunk/src/adminguide/radminconfigstartnetworkserver.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconfigstartnetworkserver.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconfigstartnetworkserver.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconfigstartnetworkserver.dita Tue Jun 28 15:46:15 2005 @@ -22,14 +22,14 @@ derby.drda.startNetworkServer -
Use the derby.drda.startNetworkServer property to simplify -embedding the Network Server in your application. When you set derby.drda.startNetworkServer, +
Use the derby.drda.startNetworkServer property to simplify +embedding the Network Server in your application. When you set derby.drda.startNetworkServer, the Network Server will automatically start when you start . Only one Network Server can be started in a JVM.
Syntaxderby.drda.startNetworkServer=[true | false] -
Default

false

+
Default

False.

Examplederby.drda.startNetworkServer=true -
Static or Dynamic

Static. You must shut down the +

Static or dynamic

Static. You must shut down the Network Server and restart for this change to take effect.

Modified: incubator/derby/docs/trunk/src/adminguide/radminconsist24642.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconsist24642.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconsist24642.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconsist24642.dita Tue Jun 28 15:46:15 2005 @@ -1,5 +1,4 @@ - -Sample queries +Sample SYSCS_CHECK_TABLE queries -QueriesSample - +QueriesSample -

This section provides examples that illustrate how to use SYSCS_UTIL.SYSCS_CHECK_TABLE() in -queries.

-

Check the consistency of a single table:

-VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE('APP', 'FLIGHTS') -

Check the consistency of all of the tables in a schema, stopping -at the first failure:

-SELECT tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE( +

This section provides examples that illustrate how to use the +SYSCS_UTIL.SYSCS_CHECK_TABLE function in queries.

+

To check the consistency of a single table, run a query that is +similar to the one shown in the following example:

+VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE('APP', 'FLIGHTS') +

To check the consistency of all of the tables in a schema, stopping +at the first failure, run a query that is similar to the one shown in the +following example:

+SELECT tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE( 'SAMP', tablename) FROM sys.sysschemas s, sys.systables t -WHERE s.schemaname = 'SAMP' AND s.schemaid = t.schemaid
-

Check the consistency of an entire database, stopping at the first -failure:

-SELECT schemaname, tablename, +WHERE s.schemaname = 'SAMP' AND s.schemaid = t.schemaid +

To check the consistency of an entire database, stopping at the +first failure, run a query that is similar to the one shown in the following +example::

+SELECT schemaname, tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE(schemaname, tablename) FROM sys.sysschemas s, sys.systables t -WHERE s.schemaid = t.schemaid
+WHERE s.schemaid = t.schemaid
- Modified: incubator/derby/docs/trunk/src/adminguide/radminconsist30301.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconsist30301.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconsist30301.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconsist30301.dita Tue Jun 28 15:46:15 2005 @@ -1,5 +1,4 @@ - - The SYSCS_CHECK_TABLE function @@ -25,27 +23,24 @@ -

The SYSCS_UTIL.SYSCS_CHECK_TABLE() checks the consistency -of a table. You -run this function in an SQL statement, as follows:

+

The SYSCS_UTIL.SYSCS_CHECK_TABLE() function checks the consistency +of a table. In +particular, the SYSCS_UTIL.SYSCS_CHECK_TABLE function verifies the +following conditions:

    +
  • Base tables are internally consistent
  • +
  • Base tables and all associated indexes contain the same number of rows
  • +
  • The values and row locations in each index match those of the base table
  • +
  • All BTREE indexes are internally consistent
  • +
You run this function in an SQL statement, as follows:

VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE( - SchemaName, TableName) -

SYSCS_CHECK_TABLE returns a smallint. If the table is consistent -(or if SYSCS_CHECK_TABLE is run on a view), SYSCS_CHECK_TABLE returns -a non-zero value. Otherwise, SYSCS_CHECK_TABLE throws -an exception on the first inconsistency it finds.

-

SYSCS_UTIL.SYSCS_CHECK_TABLE verifies the following:

-
    -
  • Base tables are internally consistent.
  • -
  • Base tables and all associated indexes contain the same number of rows.
  • -
  • The values and row locations in each index match those of the base table.
  • -
  • All BTREE indexes are internally consistent.
  • -
-
Both SchemaName and TableName must be any expression -that evaluates to a string data type. If you created a schema or table name -as a non-delimited identifier, you must present their names in all upper case. -For example:
- VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE('APP', 'CITIES') + SchemaName, TableName)where SchemaName and TableName are +expressions that evaluate to a string data type. If you created a schema or +table name as a non-delimited identifier, you must present their names in +all upper case. For example:VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE('APP', 'CITIES') +

The SYSCS_UTIL.SYSCS_CHECK_TABLE function returns a smallint. +If the table is consistent (or if you run SYSCS_UTIL.SYSCS_CHECK_TABLE on +a view), SYSCS_UTIL.SYSCS_CHECK_TABLE returns a non-zero value. Otherwise, +the function throws an exception on the first inconsistency that it finds.

For a consistent table, the following result is displayed:

1 ----- @@ -54,4 +49,3 @@ 1 row selected
- Modified: incubator/derby/docs/trunk/src/adminguide/radminconsist38781.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminconsist38781.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminconsist38781.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminconsist38781.dita Tue Jun 28 15:46:15 2005 @@ -1,4 +1,6 @@ + - - -Sample error messages - - + +Sample SYSCS_CHECK_TABLE error messages +This section provides examples of error messages that the SYSCS_UTIL.SYSCS_CHECK_TABLE() +function can return. + +SYSCS_CHECK_TABLE error messages + -

This section provides examples of error messages that SYSCS_UTIL.SYSCS_CHECK_TABLE() can return.

-

The row counts of the base table and an index differ:

-ERROR X0Y55: The number of rows in the base table does not match +

If the row counts of the base table and an index differ, error +message X0Y55 is issued:

+ ERROR X0Y55: The number of rows in the base table does not match the number of rows in at least 1 of the indexes on the table. Index 'T1_I' on table 'APP.T1' has 4 rows, but the base table has 5 rows. The suggested corrective action is to recreate the index. -

The index refers to a row that does not exist in the base table:

-ERROR X0X62: Inconsistency found between table 'APP.T1' and index +

If the index refers to a row that does not exist in the base table, +error message X0X62 is issued:

+ ERROR X0X62: Inconsistency found between table 'APP.T1' and index 'T1_I'. Error when trying to retrieve row location '(1,6)' from the table. The full index key,including the row location, is '{ 1, (1,6) }'. The suggested corrective action is to recreate the index. -

A key column value differs between the base table and the index:

-ERROR X0X61: The values for column 'C10' in index 'T1_C10' and +

If a key column value differs between the base table and the index, +error message X0X61 is issued:

+ ERROR X0X61: The values for column 'C10' in index 'T1_C10' and table 'APP.T1' do not match for row location (1,7). The value in the index is '2 2 ', while the value in the base table is 'NULL'. The full index key, including the row location, is '{ 2 2 , (1,7) }'. The suggested corrective action is to recreate the index. -
+ +
Modified: incubator/derby/docs/trunk/src/adminguide/radmindrdahost.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radmindrdahost.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radmindrdahost.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radmindrdahost.dita Tue Jun 28 15:46:15 2005 @@ -23,19 +23,19 @@ derby.drda.host -
Indicates that Network Server listen on a specific network interface. -This allows multiple instances of Network Server to run on a single machine +
Causes the Network Server to listen on a specific network interface. +This property allows multiple instances of Network Server to run on a single machine, each using its own unique host:port combination. The host needs to be set -to enable remote connections. By default, the Network Server will only listen +to enable remote connections. By default, the Network Server will listen only on the loopback address. If the property is set to 0.0.0.0, Network Server will listen on all interfaces. Ensure that you are running under the security -manager and that you have user authorization enabled before enabling remote +manager and that user authorization is enabled before you enable remote connections with this property.
Syntax derby.drda.host = hostname -
Default

If no host is specified, the Network Server +

Default

If no host name is specified, the Network Server listens on the loopback address of the current machine (localhost).

Examplederby.drda.host=myhost -
Static or Dynamic

Static. You must restart the +

Static or dynamic

Static. You must restart the Network Server for changes to take effect.

Modified: incubator/derby/docs/trunk/src/adminguide/radmindrdakeepalive.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radmindrdakeepalive.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radmindrdakeepalive.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radmindrdakeepalive.dita Tue Jun 28 15:46:15 2005 @@ -1,7 +1,6 @@ - - - + DataSource access example - - +

The following example uses org.apache.derby.jdbc.ClientDataSource to -access the Network Server:

-public static javax.sql.DataSource getDS(String database, String user, String +access the Network Server:

+ public static javax.sql.DataSource getDS(String database, String user, String password) throws SQLException { -org.apache.derby.jdbc.ClientDataSource ds = new org.apache.derby.jdbc.ClientDataSource(); +org.apache.derby.jdbc.ClientDataSource ds = + new org.apache.derby.jdbc.ClientDataSource(); // DatabaseName can include URL Attributes -ds.setDatabaseName(database); +ds.setDatabaseName(database); if (user != null) - ds.setUser(user); + ds.setUser(user); if (password != null) - ds.setPassword(password); + ds.setPassword(password); // The host on which Network Server is running ds.setServerName("localhost"); @@ -44,8 +45,8 @@ return ds; } -

The program then can connect: -javax.sql.DataSource ds = getDS("mydb;create=true", null, null); +

The program then can connect: javax.sql.DataSource ds = getDS("mydb;create=true", null, null); // Note: user and password are required on connection Connection conn = ds.getConnection("usr2", "pass2");

- + + Modified: incubator/derby/docs/trunk/src/adminguide/radminovnssample.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminovnssample.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminovnssample.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminovnssample.dita Tue Jun 28 15:46:15 2005 @@ -1,4 +1,6 @@ + - - + The NsSample sample program +The NsSample demonstration program is a simple JDBC application +that interacts with the Network Server. - -Network ServerNsSample sample program +Network ServerNsSample sample program - - + -

The NsSample program is a simple JDBC application -that interacts with the Network Server.

-

This topic includes the following sections:

-
    -
  • -
  • -
-
+

The NsSample program performs the following tasks:

    +
  • Starts the Network Server.
  • +
  • Checks that the Network Server is running.
  • +
  • Loads the Network Client driver.
  • +
  • Creates the NsSampledb database if not already created.
  • +
  • Checks to see if the schema is already created, and if not, creates the +schema which includes the SAMPLETBL table and corresponding indexes.
  • +
  • Connects to the database.
  • +
  • Loads the schema by inserting data.
  • +
  • Starts client threads to perform database related operations.
  • +
  • Has each of the clients perform DML operations (select, insert, delete, +update) using JDBC calls. For example, one client thread establishes an embedded +connection to perform database operations, while another client thread establishes +a client connection to the Network Server to perform database operations.
  • +
  • Waits for the client threads to finish the tasks.
  • +
  • Shuts down the Network Server at the end of the demonstration.
  • +

You must install the following files in the %%\demo\programs\nserverdemo\ directory before you can run the sample program:

    +
  • NsSample.java

    This is the entry point into the +sample program. The program starts up two client threads. The first client +establishes an embedded connection to perform database operations, and the +second client establishes a client connection to the Network Server to perform +database operations.

    You can change the following constants to modify +the sample program:

    +
    NUM_ROWS
    +
    The number of rows that must be initially loaded into the schema.
    +
    +
    ITERATIONS
    +
    The number of iterations for which each client thread does database related +work.
    +
    +
    NUM_CLIENT_THREADS
    +
    The number of clients that you want to run the program against.
    +
    +
    NETWORKSERVER_PORT
    +
    The port on which the Network Server is running.
    +
  • +
  • NsSampleClientThread.java

    This file contains two +Java classes:

      +
    • The NsSampleClientThread class extends Thread and instantiates a NsSampleWork +instance.
    • +
    • The NsSampleWork class contains everything that is required to perform +DML operations using JDBC calls. The doWork method in the NsSampleWork +class represents all the work done as part of this sample program.
    • +

  • +
  • NetworkServerUtil.java

    This file contains helper +methods to start the Network Server and to shutdown the server.

  • +
  • Compiled class files:
      +
    • NsSample.class
    • +
    • NsSampleClientThread.class
    • +
    • NsSampleWork.class
    • +
    • NetworkServerUtil.class
    • +
  • +

+ +
Modified: incubator/derby/docs/trunk/src/adminguide/radminservlet810694.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminservlet810694.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminservlet810694.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminservlet810694.dita Tue Jun 28 15:46:15 2005 @@ -1,4 +1,6 @@ + - - + Start-up page +Use the start-up page to start the server. - -Starting Network Serverfrom the servlet -interface +Starting Network Serverfrom the servlet interface - - + -

Use the Start-up page to start the server.

-

You can choose the following options from the startup page:

-
    +

    In addition to starting the Network Server, you can use the startup +page to perform the following actions:

    • Turn logging on when the server is started.
    • Turn tracing on for all sessions when the server is started.
    • -
    • Start the server.
    • -
    - +
+
+
Modified: incubator/derby/docs/trunk/src/adminguide/radminservlet810717.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminservlet810717.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminservlet810717.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminservlet810717.dita Tue Jun 28 15:46:15 2005 @@ -39,8 +39,9 @@ page is displayed.)
  • Change tracing directory (If you choose this option, the Trace directory page is displayed.)
  • +
  • Test the connection. (If you choose this option, the Test connection page is displayed.)
  • Specify threading parameters for Network Server. (If you choose this option, the Thread parameters page is displayed.)
  • -
  • Stop the application server.
  • +
  • Stop the application server.
  • Modified: incubator/derby/docs/trunk/src/adminguide/radminservlet810910.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/radminservlet810910.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/radminservlet810910.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/radminservlet810910.dita Tue Jun 28 15:46:15 2005 @@ -1,4 +1,6 @@ + - - + Set Network Server parameters - - + -

    The first page is displayed if the thread parameter button is pressed. -This page sets the new parameters. Enter the following applicable information:

    -
      +

      The first page is displayed if the thread parameter button is +pressed. Use this page to set the new parameters. Enter the following information:

      +
      • New maximum number of threads
      • New thread time slice
      • -
      - If the either the maximum or time slice parameters are left -blank, that value is left unchanged from the current setting.
      -

      You are given the option of setting the parameters or returning to the -previous menu.

      -

      The updated values for the maximum and the time slice are displayed when -Set Network Server Parameters is pressed.

      - +
    If either the maximum threads or time slice parameters are left blank, +that value is left unchanged from the current setting.
    +

    Click Set Network Server parameters to display the updated values +for the maximum threads and the time slice parameters.

    +
    +
    Modified: incubator/derby/docs/trunk/src/adminguide/tadminadv804410.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/tadminadv804410.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/tadminadv804410.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/tadminadv804410.dita Tue Jun 28 15:46:15 2005 @@ -23,16 +23,16 @@ Turn on tracing for all sessions by specifying the following property: derby.drda.traceAll=true Alternatively, while the Network Server is running, you can use the following command to turn on -the trace facility:java org.apache.derby.drda.NetworkServerControl trace on [-s <connection number>] -[-h <hostname>][-p <portnumber>] -If you specify a <connection number> then tracing will -be turned on only for that connection. -Set the location of the tracing files by specifying the property: -derby.drda.traceDirectory = <directory for tracing files> -You only need to specify the directory where the tracing files will -reside. The name of the tracing files itself is determined by the system. -If you do not set a trace directory, then the tracing files will be placed -in derby.system.home. +the trace facility:java org.apache.derby.drda.NetworkServerControl + trace on [-s <connection number>] [-h <hostname>][-p <portnumber>] +If you specify a <connection number>, tracing will be turned +on only for that connection. +Set the location of the tracing files by specifying the following +property:derby.drda.traceDirectory = <directory for tracing files> +You need to specify only the directory where the tracing files will +reside. The names of the tracing files are determined by the system. If you +do not set a trace directory, the tracing files will be placed in derby.system.home. + While the Network Server is running, enter the following command to set the trace directory:java org.apache.derby.drda.NetworkServerControl traceDirectory <directory for tracing files>[-h <hostname>] [-p <portnumber>] Modified: incubator/derby/docs/trunk/src/adminguide/tadminadv804451.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/tadminadv804451.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/tadminadv804451.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/tadminadv804451.dita Tue Jun 28 15:46:15 2005 @@ -19,9 +19,9 @@ Turning off the trace facility -

    You can turn off tracing with the following command:java org.apache.derby.drda.NetworkServerControl trace off [-s <connection number

    Enter the following command to turn off tracing:java org.apache.derby.drda.NetworkServerControl trace off [-s <connection number>] [-h <hostname>] [-p <portnumber>]

    The -tracing files are named Server.trace

    +tracing files are named Server.trace.

    Modified: incubator/derby/docs/trunk/src/adminguide/tadminapps811302.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/tadminapps811302.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/tadminapps811302.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/tadminapps811302.dita Tue Jun 28 15:46:15 2005 @@ -1,7 +1,6 @@ - -Encrypted user ID and password +Enabling the encrypted user ID and password security mechanism Encrypted User ID and passwordusing with Network ServerIBM Java Cryptography Extension (JCE) @@ -26,13 +26,14 @@ -

    To use encrypted user ID and password, you need to have IBM JCE -(Java Cryptography Extension) 1.2.1 or later. You can use it with any version -of IBM or Sun's

    To use the encrypted user ID and password security mechanism, +you need IBM JCE (Java Cryptography Extension) 1.2.1 or later. You can use +it with any version of IBM or Sun's Java 2 Platform, Standard Edition, Version -1.2 (J2SE).

    IBM JDK 1.4 or later comes with IBM JCE, so you do -not need to install IBM JCE separately. If you have an earlier version of -IBM JDK or other JDK's, do the following:

    +1.2 (J2SE).

    IBM Developer Kit for the Java Platform 1.4 or later +comes with IBM JCE, so you do not need to install IBM JCE separately. If you +have an earlier version of IBM Developer Kit for the Java Platform or other +Software Development Kits, complete the following steps::

    Copy the following IBM JCE jar files to the jre/lib/ext directory of the IBM SDK's installation home:
      @@ -44,11 +45,11 @@ Modify the java.security file in the jre/lib/security directory. In the section that lists providers (and preference order), replace the text with:security.provider.1=sun.security.provider.Sun -security.provider.2=com.ibm.crypto.provider.IBMJCE

      You -need both lines (if you are installing the IBM JCE on a Sun JDK) and that -order is important.

      -In order to use the encrypted user id and password during JDBC -connection using the Network Client, specify9 as the securityMechanism in +security.provider.2=com.ibm.crypto.provider.IBMJCE

      If +you are installing the IBM JCE on a Sun Java Development Kit, you must specify +both of these lines in the order shown.

      +To use the encrypted user id and password security mechanism during +JDBC connection using the network client, specify9 as the securityMechanism in the connection property. If an encrypted database is booted in the Network Server, users can connect to the database without giving the bootPassword. The first connection to the database must provide the bootPassword, Modified: incubator/derby/docs/trunk/src/adminguide/tadminappschangingyourclasspath.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/adminguide/tadminappschangingyourclasspath.dita?rev=202296&r1=202295&r2=202296&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/adminguide/tadminappschangingyourclasspath.dita (original) +++ incubator/derby/docs/trunk/src/adminguide/tadminappschangingyourclasspath.dita Tue Jun 28 15:46:15 2005 @@ -1,8 +1,6 @@ - - -Changing your class path +Installing required jar files and adding them to the classpath -derbyclient.jar -derby.jarderbynet.jar +derbyclient.jarderby.jar +derbynet.jar -

      To use the Network Server and Network Client driver, add the following -jar files to your server class path:

      +

      To use the Network Server and network client driver, add the +following jar files to your server classpath:

      derbynet.jar

      This jar file contains the Network Server code. It is only necessary for the process that starts the Network Server in addition to the standard .jar files.

      -derby.jar

      This file must be in your class path to +derby.jar

      This file must be in your classpath to use any of the Network Server functions.

      -derbyclient.jar

      This jar file must be in your class path -to use the Network Client driver. The jar file is necessary for client-side -communication with the Network Server using the Network Client driver. -It needs to be in the client-side class path to use the Network Client driver to access .

      +derbyclient.jar

      This jar file must be in your class +path to use the Network Client driver. The jar file is necessary for client-side +communication with the Network Server using the Network +Client driver. It needs to be in the client-side classpath to use the Network +Client driver to access .

      provides -script files for setting the class path to work with the Network Server. The +script files for setting the classpath to work with the Network Server. The scripts are located in the $\frameworks\NetworkServer\bin directory.

      • setNetworkClientCP.bat (Windows)
      • @@ -52,7 +51,6 @@
      See and for more information -on setting the class path. +on setting the classpath.
      -