|Oracle 8i Data Cartridge Developer's Guide
Release 2 (8.1.6)
Part Number A76937-01
Roadmap to Building a Data Cartridge, 4 of 5
The following requirements and guidelines apply to certain database objects associated with the data cartridge.
The database components that make up each cartridge must be installed in a schema of the same name as the cartridge name. If a cartridge needs multiple schemas, the first 10 characters of the schema must be the same as the cartridge name. Note that the maximum permissible length of schema names in Oracle8i is 30 bytes (30 characters in single-byte languages.)
The following database components of a data cartridge must be placed in the cartridge schema:
The choice of a schema name determines the Oracle username, because the schema name and username are always the same in Oracle8i.
Some database-level constituents of cartridges may be global in scope, and so not within the scope of a particular user (schema) but visible to all users. Examples of such globals are:
All globals should start with the cartridge name. For example, a global role for the Acme video cartridge should have a unique global name like C$ACMEVID1ROL1, and not merely ROL1.
Currently, error codes 2000-2099 are reserved for user errors or application errors. When a cartridge encounters an error, it should generate an error of the form ORA 2000: %s, where %s is a place holder for a cartridge-specific error message. Cartridge developers must ensure that their error messages are unique. You can ensure uniqueness by having all cartridge-specific error messages consist of a cartridge message name in the format C$pppptttm-nnnn, as well as a cartridge message text. For example, an error raised by the Acme video cartridge might reported as:
In this example:
ORA 2000is the server error code.
C$ACMEVID1is the cartridge name.
0001is the number assigned by Acme for this specific error.
No such fileis the description of the error, as written by Acme.
In many cases, a cartridge installation directory is desirable. All the operating system-level components of the cartridge, such as shared libraries, configuration files, and so on, can be put under a directory that is specific to a vendor or organization.
This directory name should be the same as the prefix chosen by the organization, and the directory should be created under the root directory for the platform. For example, if the Acme Cartridge Company needs to store any files, libraries, or directories, it must create a directory /ACME, and then store any files in cartridge-specific subdirectories.
Message files that associate cartridge error or message numbers with message text can be put in one or more cartridge-specific subdirectories.
Configuration files can be placed in a cartridge-specific subdirectory. For example:
Use one of the following guidelines for each shared library (.so or .dll file):