Restore Related Issues

Restore Related Issues


KB-ID: RES01

Exception Trace : Violation of PRIMARY KEY constraint 'ViewConfiguration_PIDX_PK'. Cannot insert duplicate key in object 'dbo.ViewConfiguration_PIDX'. The duplicate key value is (375, ViewConfiguration).

Cause of the issue : Breakage in partial restore in 10500.

Steps to resolve the issue :
  1. You can either choose to reinitialize the existing DB (this process would wipe out all data in the DB) or create a newDB. If you wish to reinitialize the existing DB, then open CMD and navigate to Drive:\ManageEngine\ServiceDesk\bin and invoke the reinitializeDB.bat file. Then you will be asked for a confirmation if you wish to reinitialize the DB.  Type in 'y' in CMD and hit enter. If you wish to create a new DB, then Drive:\ManageEngine\ServiceDesk\bin and invoke the changeDBServer.bat file. This will bring up a GUI where you can put in a new DB Name and save the configurations.
  2. Now, in the same CMD window, invoke the run.bat file. This will load all the modules and will start ServiceDesk Plus Application.
  3. After all the modules load, you should see a message "Server started in :: [XXXXX ms]". Once you see this, please try to access the application. If you see the login page, then login using the default credentials i.e administrator/administrator.
  4. If you are able to login successfully, come back to the CMD window and hit CTRL+C. This will stop all modules and kill the modules that were loaded. At the end, you will be asked if you want to terminate the application. Please type in 'y' in there and hit enter.
  5. Once you are back in the CMD window, invoke the restoreData.bat as indicated below.
                Drive:\ManageEngine\ServiceDesk\bin > restoreData.bat > 1.txt


KB-ID: RES02

Exception Trace : Incorrect syntax near the keyword 'key'.java.sql.BatchUpdateException: Incorrect syntax near the keyword 'key'.

Cause of the issue : Handling of reserved keyword as column name not handled

Steps to resolve the issue :
  1. Open CMD and navigate to Drive:\ManageEngine\ServiceDesk\bin and type in the below command.
                Drive:\ManageEngine\ServiceDesk\bin> write restoreData.bat
  2. This will open up the restoreData.bat file in write mode. In this file locate the string " Dsdp.restore.error.ignoretables ".
  3. Once located, add the following after the equal to (=) sign : globalpersonalize,
          Note:
    You will have to add the word globalpersonalize
    and the comma (,) after it.
  4. Now, you can either choose to reinitialize the existing DB (this process would wipe out all data in the DB) or create a new DB. If you wish to reinitialize the existing DB, then open CMD and navigate to Drive:\ManageEngine\ServiceDesk\bin and invoke the reinitializeDB.bat file. Then you will be asked for a confirmation if you wish to reinitialize the DB.  Type in 'y' in CMD and hit enter. If you wish to create a new DB, then Drive:\ManageEngine\ServiceDesk\bin and invoke the changeDBServer.bat file. This will bring up a GUI where you can put in a new DB Name and save the configurations.
  5. Now, in the same CMD window, invoke the run.bat file. This will load all the modules and will start ServiceDesk Plus Application.
  6. After all the modules load, you should see a message "Server started in :: [XXXXX ms]". Once you see this, please try to access the application. If you see the login page, then login using the default credentials i.e administrator/administrator.
  7. If you are able to login successfully, come back to the CMD window and hit CTRL+C. This will stop all modules and kill the modules that were loaded. At the end, you will be asked if you want to terminate the application. Please type in 'y' in there and hit enter.
  8. Once you are back in the CMD window, invoke the restoreData.bat as indicated below.
                Drive:\ManageEngine\ServiceDesk\bin > restoreData.bat > 1.txt
  9. If the restore is successful, then we will have to manually add the data present in globalpersonalize table. You can then raise a supprt ticket where we can help you with adding the entries in this specific table manually.
               

KB-ID: RES03

Exception Trace : Violation of UNIQUE KEY constraint / Cannot insert duplicate key in object 'dbo.ABC'

Cause of the issue : Duplicate value exists violating the UK constraint

Steps to resolve the issue :
  1. Locate the error from the CMD window and you should see the phrase 'Cannot insert duplicate key in object 'dbo.ABC'. The duplicate key value is (XYZ ).' In this error ABC is the table where the duplictae value exists and XYZ is the duplicate value itself.
  2. If you are performing a restore on a Test/Dev environment, then login into the Production Environment, change the duplicate value from XYZ to XYZ_1.
  3. Once the duplicate value is renamed, then take a fresh backup and perform a restore again.
  4. If the restore is performed on a Production Environment, please raise a supprt ticket where we can help you withhandling this issue.

KB-ID: RES04

Exception Trace : Unable to restore database : Batch entry 0 INSERT INTO WorkOrder (WORKORDERID,REQUESTERID,OBOID,CREATEDBYID,CREATEDTIME,RESPONDEDTIME,DUEBYTIME,COMPLETEDTIME,TIMESPENTONREQ,TITLE,DESCRIPTION,
MODEID,SLAID,WORKSTATIONID,DEPTID,SITEID,AUTOCLOSETIME,CLOSEAUTHKEY,ISPARENT,TEMPLATEID,SERVICEID,IS_CATALOG_TEMPLATE,FR_DUETIME,
HASCHANGE,HASCAUSEDBYCHANGE,HASPROBLEM,HASDEPENDENCY,SURVEYSTATUS,HASDRAFT,RESOLVEDTIME,HASPROJECT,CIID)

Cause of the issue : Column WORKSTATIONID present in the workorder table in the backup, but is not available in the DB that's created.

Steps to resolve the issue :
  1. Connect to ServiceDesk Plus DB by following the steps available here .
  2. Once connected, execute the below query.
    If DB is PgSQL - alter table workorder add column workstationid bigint;
    If DB is MSSQL -
    alter table workorder add workstationid bigint;
  3. Now, in the same CMD window, invoke the restoreData.bat as indicated below.
                Drive:\ManageEngine\ServiceDesk\bin > restoreData.bat > 1.txt
  4. If you are on any version above 9.4, then you will have to execute the below query after the restore completes successfully.
          alter table workorder drop column workstationid;
    If you are on any version belo 9.4, then you need not follow this step.

                  New to ADSelfService Plus?

                    • Related Articles

                    • How do I restore the backup data?

                      NOTE: For builds > 10.6 While migrating to different database you can use backupdataold.bat / backupdataold.sh. Here backup will be in .data format and this can be restored in across DB platform. While restoring .data file we have to use below ...
                    • Inputs required for analyzing Performance Issues

                      We need a couple of details to analyze Performance issue. So, please send the below details : Below mentioned details should be gathered before restarting the application. 1. Let us know whether you are taking Scheduled full backup or backup without ...
                    • Unable to restore database : zip file too large

                      In oldest versions like 8.0, 8.1. 8.2, 8.3, you may come across restore issues when the backup file is huge (even more than 3 or 4GB). In those cases, this article would be helpful. Scenario 1: If you come across this when you are trying to setup UAT ...
                    • Backup & Restore (from 14000) - Behavior changes

                      Backup: POSTGRES & MSSQL: -> When taking a backup using the command backUpData.bat/backUpData.sh the backup will be created in the EZIP format. This is the native model of PGSQL / SQL. -> When taking a backup using the command ...
                    • List of mail fetching issues and solutions

                      Scenario 1 : Mail fetching issue due to Invalid or No PKIX certificate .   Log traces for Mail Fetching  issues Exception when connecting to store.|javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: ...