Oracle 8i Data Cartridge Developer's Guide
Release 2 (8.1.6)

Part Number A76937-01





Go to previous page Go to beginning of chapter Go to next page

Roadmap to Building a Data Cartridge, 4 of 5

Requirements and Guidelines for Data Cartridge Constituents.

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.

Error Message Names or Error Codes

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:

ORA 2000: C$ACMEVID1-0001: No such file

In this example:

Cartridge Installation Directory

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:


Shared Library Names for External Procedures

Use one of the following guidelines for each shared library (.so or .dll file):

Go to previous page Go to beginning of chapter Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.