Monday, January 24, 2011

Changing the maximum lengths of core metadata fields in Content Server

This has came up in almost every UCM engagement we undertook in the last several years... And chances are - you might be scratching your head about it too... or you’ve given your business folks one of these "No can do" responses, that are so effective for draining their confidence in both - Oracle UCM and you personally.

So, without any further introduction - here's the trick that will help you make these core fields, such content title, security role, account and many other standard metadata fields - longer - to accommodate your business model and your requirements.... and re-gain that confidence and even score some points :)

This will also resolve the archive import issues such as "Content item was not successfully checked in. The Title may not exceed 80 characters" ... or AD/LDAP integration issues - when the roles or accounts you're getting from your LDAP provider are longer then 35 characters, the maximum length of the Role and Account fields.

And the answer is simply this: connect to your database with administrative privileges and alter the lengths of the Title, Role, Account or another standard metadata filed you need to be longer then it is. You'll need to restart the Content Server for the changes to take effect.

For instance, to change the maximum length of Content Server Security Role, you'll need to alter RoleDefinition table and change the length of the dRoleName field.

If Oracle is your database - use the following SQL statement: 

DEV_OCS.RoleDefinition modify (dDocTitle varchar(255) not null)

Where DEV_OCS is your Content Server schema name.... I'm, sure you've got the idea...

The Title field is referenced in Revisions, ArchiveHistory, WorkflowHistory and ProblemReports.

To be on a safe side and make sure you haven't missed a table or two, generate SQL (DDL) for all of the Content Server tables and search this file for your field - for instance, dDocTitle, dRoleName or dDocAccount.

Just one note of caution. Changing the length of content type, security group or account may affect performance! Proceed with caution.