Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy database from LoggerA to LoggerB

How to copy database from LoggerX to LoggerX

 

Requires SQL Management Studio...

 

This process assumes Logger B is corrupted.

 

1.     Backup Logger A and Logger B databases (Logger B is for safety precautions).

2.     Take the backup file for Logger A and transfer/FTP it to Logger B server.

3.     Stop Logger B services from service control.(Will not impact call routing)

4.     From   the LoggerB server

http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/icm_enterprise/icm_enterprise_7_5/maintenance/guide/icm75ag.pdf

a.  Using ICMDBA, "Recreate" the database (pg 46).  Make sure the database size (data segment and log segments) are exactly same as on HDS1.
 

b.  Restore database using SQL Management Studio:

                        Right click on the database > Task > Restore > Database
                  Choose "From device" button and select the <database>.bak

                        Click "Restore" check box.

                        Go to Options tab, click "Overwrite the existing database"

                        Click "OK"

This restore will show no progress while checking the backup for corruption but it will once the import has started. Checking for corruption can take a while depending on the speed of the server and size of the DB.

 

5.     After successful import, run the following queries against Logger B database.

Truncate table Recovery

Truncate table Logger_Admin          

                This will truncate table "Recovery" (i.e. delete all rows of table' Recovery') in the database. 

                After it’s truncated and services started, the recovery process will try to get the historical data (rows) from the other Logger since the backup was taken.

 

6.     Start Logger B services.  Wait for some time (10-15 minutes) or until Logger B's max recovery key matches Logger A's max recovery key.      SQL Command to check is:

        Select Max(RecoveryKey) from Recovery

 

7.     Run icmdba and go to Spaced Used Summary and verify both Logger A and Logger B’s min DateTime and max DateTime match.  Note: make sure BOTH min DateTime and max DateTime match!

 

8.   Because we changed the recovery keys on Logger B, we now need to make sure the HDS pointing to Logger B get this new set of keys so that it can sync with Logger B.

 

9   Run the following query against HDS database.

Truncate table Recovery    

 

10.  Cycle HDS services. (Will not impact call routing) Allow enough time for data to get replicated (Logger -> HDS).

 

11.  At the end of this exercise, verify BOTH min DateTime and max DateTime match between Logger A and Logger B and between HDS1 and HDS2.

Version history
Revision #:
1 of 1
Last update:
‎02-18-2011 01:22 PM
Updated by:
 
Labels (1)
Everyone's tags (3)
Comments

Why not just using ICMDBA tool & use the option of synchronize side A ----> side B

Cisco Employee

Good quesion!  The need to copy DB arises when there are holes in the DB (data missing from a time range) due to recovery key mismatch/corruption or any othe reason, if the "synchronization" of the DB does not work.

Sometimes we've seen simply synchorizing sideA -> sideB does not recover the missing data.  Thus, the need for copying the database.

Cisco Employee

ICMDBA sync only sync's configuration data. Not historical data.