000016389 - When upgrading to Archer 5.4 SP1  the error ?An error occurred at step 1 of script 5.3.10000.1024.sql? is thrown.

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 22, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000016389
Applies ToThe customer?s environment had tblFolder entries 1, it then skipped to ID 17 and incremented in order. The script was failing because it was looking for tblFolder ID 2.
IssueUpgrade RSA Archer to version 5.4 SP1

When upgrading to RSA Archer 5.4 SP1, the following error is thrown in the FrameworkInstall log file:

SetupUtils.Database.SqlException: An error occurred at step 1 of script 5.3.10000.1024.sql (length=8474, max=0) ---> System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblNotificationTemplate_tblFolder". The conflict occurred in database "Archer", table "dbo.tblFolder", column 'folder_id'.

The statement has been terminated.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at SetupUtils.Database.ScriptExecutor.ExecuteCommand(String scriptName, String cmdText, Int32 step)

   --- End of inner exception stack trace ---

   at Archer.Installer.Pages.PerformInstallationPage.InstallDatabase(Operation dbOp, String connectionString, String instanceName, Boolean allowSkipOnError)

   at Archer.Installer.Pages.DBOperationHandler.Execute()

   at Archer.Installer.Pages.PerformInstallationPage.OnWizardNext(WizardPageEventArgs e)

 

Inner exception:

System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblNotificationTemplate_tblFolder". The conflict occurred in database "Archer", table "dbo.tblFolder", column 'folder_id'.

The statement has been terminated.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at SetupUtils.Database.ScriptExecutor.ExecuteCommand(String scriptName, String cmdText, Int32 step)

ClientConnectionId:e5198243-bad6-4ef0-9eb6-7d9c01057b03


Resolution

To resolve the issue, an entry with ID 2 was inserted with the following scripts:

 

--Change original Policy Management guid to avoid conflicts

 

update tblFolder set guid='1C65F46C-1F74-4410-BB13-ECCA82D5AD3A', alias='Policy_Management_________________'

where folder_id=196

 

--Insert new Policy Management record with ID=2

 

set identity_insert tblfolder ON

 

insert into tblFolder(folder_id,folder_name,is_system,module_id,guid,aso_status,alias,create_date,create_login,update_date,update_login)

 

values(2,'Policy Management',0,NULL,'2C65F46C-1F74-4410-BB13-ECCA82D5AD3A',0,'Policy_Management__________________','1900-01-01 00:00:00.000',2,'2013-12-12 18:55:48.073',2)

 

 

set identity_insert tblfolder OFF

 

 

--Make necessary associations to tblIview and tblNotificationTemplate

 

update tblIView set folder_id=2 where folder_id='196'

 

update tblnotificationtemplate set folder_id=2 where folder_id='196'

Legacy Article IDa63456

Attachments

    Outcomes