Using a Custom Schema Script
You can call the overloaded createInstance method
that takes a custom schema script, allowing a database administrator
(DBA) to modify the factory-generated object store database schema.
A custom schema script overrides the values set by the
DatabaseXXXStorageLocation properties during object store creation.
Your customized schema script must be derived from one of the default
(factory generated) scripts available from the ObjectStoreSchemaXXX
properties on the Domain object. The properties
are named ObjectStoreSchemaDB2, ObjectStoreSchemaMSSQL, and ObjectStoreSchemaOracle,
and their values contain the factory-generated schema for an object
store corresponding to the database vendor indicator.
A custom
schema script must contain the correct version information. The version
information in the header of the script must correspond to the Content
Engine's schema revision level indicator, which is stored in the ObjectStore database's
DDState.schema_revision_string column. When the script is retrieved
from the Domain level property, it contains the correct
revision level. However, in rare circumstances (usually involving
an upgrade to the server after the script was retrieved), the schema
revision string that is stored in the database might not match the
revision information in the schema script header. Content Engine will not process the script
if this indicator does not match the schema revision level that is
expected by the Content Engine server and an exception is generated.
The following text is an example of the version information that is
found in the script header (the generation date and revision number will be
different in your environment):
-- Generated for SQL Server databases on: Wed Apr 02 11:11:30 PDT 2008
-- The following SchemaRevision comment must be present and must correspond to
-- the proper schema revision level at the time the ObjectStore is created.
-- SchemaRevision: 14.1.14
The following example shows a WebSphere® Application Server script excerpt (the ellipses indicate additional statements that are deleted for brevity):
CREATE TABLE DocVersion(object_id uniqueidentifier NOT NULL PRIMARY KEY , object_class_id uniqueidentifier NOT NULL , security_id uniqueidentifier NOT NULL ,
… , security_folder_id uniqueidentifier )
CREATE INDEX I_DocVersion22 ON DocVersion (version_series_id, major_version_number DESC, minor_version_number DESC)
…