Issue:
When running the step MDB_SETUP1.5 as part of Unicenter Asset Portfolio Management patching against an MDB running on Microsoft SQL Server 2012 the following error is logged in install_mdb.log and the step fails:
DEBUG - Incorrect syntax near '50000'.
INFO - MDBTools_0308I - Installation of last object failed, requeuing it to the end of the list.
Environment:
UAPM 11.3.4
Microsoft SQL Server 2012
Cause:
This issue is caused by an incompatibility in some of the stored procedures updated by the patch with the latest versions of Microsoft SQL Server. The syntax for displaying an error has changed and needs to be updated.
As an example one of the commands within a stored procedure that is not compatible with SQL 2012 looks as follows:
RAISERROR 50000 'MODE needs to be either ENABLE or DISABLE'
Workaround:
The solution requires manual updates in some scripts of the extracted patch in question, for example C20 RO85260.
Changes need to be done on the following files that come with the UAPM patch and can be found under the following directories of the extacted MDB_SETUP1.5.exe file:
...\MDB_SETUP1.5\Common_asset_mssql\schemas\MDB Base\DBProcedure\CMN_ENABLE_DISABLE_SP.xml
...\MDB_SETUP1.5\Common_asset_mssql\schemas\MDB Base\DBProcedure\ENABLE_DISABLE_DEP_OBJS_2000.xml
...\MDB_SETUP1.5\Common_asset_mssql\schemas\MDB Base\DBProcedure\ENABLE_DISABLE_DEP_OBJS.xml
...\MDB_SETUP1.5\Common_asset_mssql\schemas\MDB Base\DBSql\ENABLE_DISABLE_DEP_OBJS.xml
You should edit the above files and look for the string (which appear more than once in each file):
RAISERROR 50000
The string should be changed as follows:
FROM:
RAISERROR 50000 '<message>'
TO:
RAISERROR ('<message>', 16, 1)
As an example the string
RAISERROR 50000 'MODE needs to be either ENABLE or DISABLE'
is changed to
RAISERROR ('MODE needs to be either ENABLE or DISABLE', 16, 1)