SQL Upgrade Troubleshooting in the script 4.5.6.2to5.0.0.sql
When upgrading the database and having the following issue with creating the UIX_SIP:
Perform the following steps:
Edit the scripts 4.5.6.1to5.0.0.sql. Default location is
C:\Agat\SphereShield.Setup\Payload\SqlScripts\Upgrade\ArchiveSearch for UIX_SIP and Remove the following code:
BEGIN TRY DECLARE @indiciesScript varchar(max)= N'USE [{DB_NAME}] ALTER TABLE [FEDERATION_POLICY_CACHE] DROP CONSTRAINT [UIX_SIP] CREATE UNIQUE NONCLUSTERED INDEX [UIX_SIP] ON [FEDERATION_POLICY_CACHE] ( [LOCAL_SIP] ASC, [OTHER_SIP] ASC, [POLICY_TYPE] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ' SET @scriptToExecute = REPLACE(@indiciesScript, N'{DB_NAME}', @dbName) EXECUTE (@scriptToExecute) END TRY BEGIN CATCH print 'Have error in create UIX_SIP index' END CATCH
3. Go Back → Next → Upgrade once more