Java DB

Apache Derby

Derby Developer's Guide

Derby Getting Started
Derby Reference Manual
Derby Developer's Guide
Derby Performance Tuning
Derby Server and Admin Guide
Derby Tools and Utilities
Derby Developer's Guide
-After installing
-Upgrades
-JDBC applications and Derby basics
-Application development overview
-Derby embedded basics
-Derby JDBC driver
-Derby JDBC database connection URL
-Derby system
-A Derby database
-Connecting to databases
-Working with the database connection URL attributes
-Using in-memory databases
-Working with Derby properties
-Deploying Derby applications
-Deployment issues
-Creating Derby databases for read-only use
-Loading classes from a database
-Derby server-side programming
-Programming database-side JDBC routines
-Programming trigger actions
-Programming Derby-style table functions
-Programming user-defined types
-Controlling Derby application behavior
-The JDBC connection and transaction model
-Result set and cursor mechanisms
-Locking, concurrency, and isolation
-Working with multiple connections to a single database
-Working with multiple threads sharing a single connection
-Working with database threads in an embedded environment
-Working with Derby SQLExceptions in an application
-Using Derby as a J2EE resource manager
-Derby and Security
-Configuring security for your environment
-Working with user authentication
-Users and authorization identifiers
-User authorizations
-Encrypting databases on disk
-Signed jar files
-Notes on the Derby security features
-User authentication and authorization examples
-Running Derby under a security manager
-Developing tools and using Derby with an IDE
-SQL tips
-Localizing Derby
-Derby and standards

 

SQL standard authorization exceptions

SQL exceptions are returned when errors occur with SQL authorization.

The following errors can result from the CREATE ROLE statement:

  • You cannot create a role if you are not the database owner. An attempt to do so raises the SQLException 4251A.
  • You cannot create a role if a role with that name already exists. An attempt to do so raises the SQLException X0Y68.
  • You cannot create a role name if there is a user by that name. An attempt to create a role name that conflicts with an existing user name raises the SQLException X0Y68.
  • A role name cannot start with the prefix SYS (after case normalization). Use of the prefix SYS raises the SQLException 4293A.
  • You cannot create a role with the name PUBLIC (after case normalization). PUBLIC is a reserved authorization identifier. An attempt to create a role with the name PUBLIC raises SQLException 4251B.

The following errors can result from the DROP ROLE statement:

  • You cannot drop a role if you are not the database owner. An attempt to do so raises the SQLException 4251A.
  • You cannot drop a role that does not exist. An attempt to do so raises the SQLException 0P000.

The following errors can result from the SET ROLE statement:

  • You cannot set a role if you are not the database owner. An attempt to do so raises the SQLException 4251A.
  • You cannot set a role that does not exist. An attempt to do so raises the SQLException 0P000.
  • You cannot set a role when a transaction is in progress. An attempt to do so raises the SQLException 25001.
  • You cannot use NONE or a malformed identifier as a string or ? argument to SET ROLE. An attempt to do so raises the SQLException XCXA0.

The following errors can result from the GRANT statement:

  • You cannot grant a role if you are not the database owner. An attempt to do so raises the SQLException 4251A.
  • You cannot grant a role that does not exist. An attempt to do so raises the SQLException 0P000.
  • You cannot grant the role "PUBLIC". An attempt to do so raises the SQLException 4251B.
  • You cannot grant a role if doing so would create a circularity by granting a container role to a contained role. An attempt to do so raises the SQLException 4251C.

The following errors can result from the REVOKE statement:

  • You cannot revoke a role if you are not the database owner. An attempt to do so raises the SQLException 4251A.
  • You cannot revoke a role that does not exist. An attempt to do so raises the SQLException 0P000.
  • You cannot revoke the role "PUBLIC". An attempt to do so raises the SQLException 4251B.

For all statements, an attempt to specify an identifier argument more than 128 characters long raises the SQLException 42622.

 

javadb@jdbcurl.com