How to recover a deleted contact record: By deleting the related TLOG entries related to the original contact record and creating a transfer set on the backup data

Version 3

    Details

    How to recover a deleted contact record: By deleting the related TLOG entries related to the original contact record and creating a transfer set on the backup data.

    The below approach and steps will require some efforts but is the alternative with the highest success rate

    The workflow for this approach is
    - Removing the information related to the deleted records in the current database (TLOG records)
    - Create a manual sync set of the "Current contact record only" from the old restored database
    - Retrieve this sync set manually into the current production database

     

    - The original record with the additional contact information should  appear again, usually all related information like  historical items, calendar items etc should also reappear as it is more or less a completely fresh record for the current production system (any references in the TLOG entries should have been deleted)


    Resolution

    - It is highly recommended prior any action also to review the related articles How to recover a deleted contact record: By merging the original contact record into a new created record and creating a…  and How do I recover a deleted contact record? Process with restoring a GoldMine database backup and applying recent changes apart from the deleted record   as  they contain different approaches for recovering a deleted Contact  Record within GoldMine

    [STEPS]

    - GoldMine  Technical Support will not assist in performing these actions and they are provided as-is. It is recommended to contact your GoldMine Solutions Partner  or Consultant to discuss the steps further

     

    1. Backup the current database
    2. Determine the most recent backup where the record still existed (keep in mind that all interaction with and on the contact record since the backup and until now will be lost) and restore the database into a DIFFERENT DATABASE than the production database.
    3. Determine the Accountno for the original Contact record (for example via Select Accountno, Contact, Company, City from CONTACT1 where Contact like 'Contact name')
    4. Adjust and run the following queries via the SQL Server Management Studio

    delete  from PRODUCTIONDB.dbo.conttlog where frecid in (select recid from  BACKUPDB.dbo.contact1 where accountno ='CONTACT_ACCOUNTNO')
    delete  from PRODUCTIONDB.dbo.conttlog where frecid in (select recid from  BACKUPDB.dbo.contact2 where accountno ='CONTACT_ACCOUNTNO')
    delete  from PRODUCTIONDB.dbo.conttlog where frecid in (select recid from  BACKUPDB.dbo.contsupp where accountno ='CONTACT_ACCOUNTNO')
    delete  from PRODUCTIONDB.dbo.conttlog where frecid in (select recid from  BACKUPDB.dbo.conthist where accountno ='CONTACT_ACCOUNTNO')
    delete  from PRODUCTIONDB.dbo.conttlog where frecid in (select recid from  BACKUPDB.dbo.contgrps where accountno ='CONTACT_ACCOUNTNO')
    delete from PRODUCTIONDB.dbo.gmtlog where frecid in (select recid from BACKUPDB.dbo.cal where accountno ='CONTACT_ACCOUNTNO')
    delete  from PRODUCTIONDB.dbo.gmtlog where frecid in (select recid from  BACKUPDB.dbo.Mailbox where accountno ='CONTACT_ACCOUNTNO')
    delete from PRODUCTIONDB.dbo.gmtlog where frecid in (select recid from BACKUPDB.dbo.OPMGR where accountno ='CONTACT_ACCOUNTNO')
    delete from PRODUCTIONDB.dbo.gmtlog where frecid in (select recid from BACKUPDB.dbo.cases where accountno ='CONTACT_ACCOUNTNO')
    delete from PRODUCTIONDB.dbo.gmtlog where frecid in (select recid from BACKUPDB.dbo.notes where accountno ='CONTACT_ACCOUNTNO')

     

    5. Adjust GoldMine  (the best is on a test environment or when no users are working in  GoldMine) to connect to the restored database both Contact set and  GoldMine base files
    6. Open the backup database within GoldMine  (verify in Help > About GoldMine > System that the GoldMine files  and Contact set files are pointing to the backup database)
    - It is also recommended to verify how many records per tab the record has. (for example via right click > Summary on the certain tabs the contact record has)
    7. Make sure that the new created record is still ACTIVE
    8.
    Tools > Synchronize > Synchronization Wizard to open the Wizard window

    9.  Start a new session > Next
    10. Create a transfer set > Next
    11. Select / Enter the desired path > Next
    12.a. Right  click in Send Record Types, click Select All on pop-up menu then scroll  down to the Linked Documents and Uncheck the whole section
    12.b. Right click and Select All in the calendars users section > Next
    13. Select 'Only the current contact record'  > Next
    14. Select No > Finish

    15. adjust GoldMine to connect to the original production database with both Contact set and GoldMine base files)
    16. Open the production database within GoldMine (verify in Help > About GoldMine > System (GoldMine files and Contact set files are pointing to  the production database again)
    17. Tools > Synchronize > Synchronization Wizard to open the Wizard window

    18. Start a new session > Next
    19. Retrieve a transfer set > Next
    20. Select / Enter the desired path > Next
    21.a.Right  click in Send Record Types, click Select All on pop-up menu then scroll  down to the Linked Documents and Uncheck the whole section
    21.b.Right click and Select All in the calendars users section > Next

    22. Select the appropriate Contact Set (Production database)
    23. Finish
    24. Verify after the synchronization if the available and recovered amount of information is acceptable

     


    Additional Note when restoring the backup database into the same Microsoft SQL Server Instance
    -  ATTENTION: in all 3 cases it might be necessary to rest the Service  Broker for the SQL database as restoring into the same SQL server will  create a duplicate Service Broker ID (see KM Article # 12856)

     

    1. Open the SQL Server Management Studio
    2. Open a New Query
    3. Copy and paste and adjust the following statement

     

    USE master
    GO
    ALTER DATABASE [DatabaseName] SET NEW_BROKER WITH ROLLBACK IMMEDIATE
    GO

     

    Replace DatabaseName with the upgraded and copied database name

    4. Execute the query