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 ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • 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: ...
                      • How to generate logs during restore process

                        Refer to the steps to redirect logs to a text file while initiating restore process: From the command prompt invoke restoreData.bat file from [SDP-Home]\bin directory. CMD> C:\ManageEngine\ServiceDesk\bin> restoreData.bat >out.txt out.txt will be ...
                      • How to restore your data in ServiceDesk Plus

                        1. Stop the ManageEngine ServiceDesk Plus service from the Services console(services.msc).   2. Click the Windows icon and select Command Prompt (Admin).   3. Go to Bin directory and run restoreData.bat   4.Browse to the backup file from backup ...
                      • Backup Related Issues

                        java.util.zip.ZipException: ERROR = *ERROR: Wrong key or corrupt data*org.postgresql.util.PSQLException: ERROR: Wrong key or corrupt data java.lang.OutOfMemoryError: Java heap space java.io.FileNotFoundException org.postgresql.util.PSQLException: ...
                      • Unable to restore

                        1.CRC (9412-9423):       Download 7zip and extract the contents. The corrupted files will be listed during extracting (but those files will be extracted in the specified location).       Replace those files again in the backup using 7zip (Drag those ...