Need to increase length for custom column, which has been updated within MDB (usp_owned_resource table). However, when viewing the length in APM UI, the database change does not show within the config view and the validation for the old length exists.
Release : 17.1 or higher
Component : CA Asset Portfolio Management
In the following example, our objective here is to change the length of the field "testfield4" from 10 to 50
The following is a sample SQL Server script that will modify the length of "testfield4" field in tables usp_owned_resource and aud_usp_owned_resource and reflect the change in field size in table arg_field_def.
BEGIN TRANSACTION
-- These SQL statements changes the length of the "testfield4" field in table usp_owned_resource and aud_usp_owned_resource. The original field length for "testfield4" field was 10. In this example, we will change the field size from 10 to 50.
ALTER TABLE usp_owned_resource
ALTER COLUMN testfield4 nvarchar(50)
ALTER TABLE aud_usp_owned_resource
ALTER COLUMN testfield4 nvarchar(50)
-- This SQL statement will update the design specification of the "testfield4" field to match the above change in table arg_field_def
UPDATE arg_field_def set data_size = 50 where field_name = 'testfield4'
COMMIT TRANSACTION
recycle IIS on both the APM Web and Application Servers
Please note that the above are direct changes being applied to SQL Server. We strongly advise to run the above in a testing environment as well as to ensure one has made appropriate backups before attempting the above.
We also advise against applying this procedure to extend any Out of box fields that Service Management provides natively. This is due to the need to maintain a strong control of the baseline database schema. Patch installs and updates can override or undo any such schema changes made and cause database corruption.