Professional Documents
Culture Documents
3-UCCX DB Replication Video
3-UCCX DB Replication Video
3-UCCX DB Replication Video
Konstantin Vaksin
TECHNICAL CONSULTING ENGINEER
• Databases overview
• Platform Replication
Agenda • UCCX Replication
• Databases summary
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Databases overview
Database
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
UCCX Solution Databases
IBM Informix
Platform DB
Finesse CUIC
CM DB
UCOS
CentOS Linux
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Platform Database Instance
• Appears in services list as “A Cisco DB”
• CLI: run sql <your command here>
• ccm DB holds cluster and platform info, configuration
• Table processnode contains server names, table ‘applicationuser’ contains app user login
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Cisco Unified CCX Database
Stores all the data to generate historical
and real-time reports
Historical
Datastore (HDS)
db_cra
Stores all the configuration data from CCX Configuration
Admin such as Applications, CSQs, etc
Datastore (CDS)
Stores scripts, prompt files, custom
documents and grammars Repository
Datastore (RDS)
db_cra_repository
• CLI: run uccx sql db_cra <your command here>
• CLI: run uccx sql db_cra_repository <your command here>
Use “run uccx sql db_cra”
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Platform Replication
Before VOS 6.0
Hub and spoke topology.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
After VOS 6.0
Fully meshed topology
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
How it works? 1. IPSEC communication
Publisher Subscriber
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
How it works? 1. IPSEC communication
• show open ports regexp 8500
• file view activelog
platform/log/clustermgrxxxx.log
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
What is happening after?
Publisher Subscriber
TCP Port 8002
TCP Port 1500
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
What can be the issue?
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
What can be the issue?
admin:show network cluster
192.168.33.53 finesse12s.cc.lab finesse12s Subscriber finesse
DBSub authenticated using TCP since Sun Oct 13 10:23:22 2019
192.168.33.52 finesse12p.cc.lab finesse12p Publisher DBPub
authenticated
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
utils dbreplication runtimestate
admin:utils dbreplication runtimestate
DB Version: ccm12_0_1_10000_17
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Possible states?
Value Meaning Description
It’s the setting up process of Replication. CLI’s reset, rebuild, autorecovery might
0 Initialization State
have caused it.
It indicates that set up is still in progress. But huge delay in changing into the state of
1 The Number of replicates is incorrect
2 might implicate that something is wrong.
Logical connections are established and the tables are matched with the other
2 Replication is good
servers on the cluster.
Logical connections are present but not sure whether the tables match across the
cluster. Check dbmon logs.
3 Mismatched tables/Out of Sync
Probable reasons would be – a node might be down.
-update/data from one node would not have been passed onto other.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
How can we reset replication?
Step 1. Stop replication!!!!! In earlier versions, you need to go to each subscriber. Now
you can use command from publisher:
• utils dbreplication stop all
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
Replication Monitor
admin:utils dbreplication runtimestate
DB Version: ccm12_0_1_10000_17
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Replication Monitor
admin:utils dbreplication runtimestate
DB Version: ccm12_0_1_10000_17
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
Replication Monitor
admin:file view activelog cm/trace/dbl/20191018_153239_fin-b_g_3_ccm12_0_1_10000_17_dbl_repl_cdr_define.log
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
Replication Monitor
admin:file list activelog cm/trace/dbl/ date details
18 Oct,2019 15:35:09 380,574 20191018_153356_dbl_repl_cdr_Broadcast_ccmdb.log
18 Oct,2019 15:35:12 14,568 20191018_153510_dbl_repl_cdr_Broadcast_phxdb.log
Oct 18 2019 15:34:05 ------ Table scan for ccmdbtemplate_g_2_ccm12_0_1_10000_17_1_147_typedberrors end ---
------
DB Version: ccm12_0_1_10000_17
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
UCCX Replication
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
CCX Database Replication
• View from CCX Admin or CLI
• Connected / Active state shows healthy replication
• Dropped / Timed Out status indicates replication issue
When to use?
• CSQ/Application page doesn’t list any CSQs/Applications
• Newly created skills don’t appear or the entire Skills page is empty
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
Database commands at your finger tips!
utils uccx database dbreplication <tag>
• setup: will setup the UCCX DB Replication between the nodes
• repair: This command repairs mismatched data between cluster
nodes; it does not repair replication setup
• reset: does 3 steps
1. Remove Database replication
2. Setup Database replication
3. Initiate a data repair process
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
utils uccx database forcedatasync
This command gets the data from the other node in the cluster; effectively
overwriting the data on this node.
When to use?
• A single node in the cluster is corrupted and all efforts to restore database has
failed
• It puts a strain on the links between the nodes based on database side, so be
mindful of the same
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28
Database Repair - Checklist
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
Database Replication Reset
• Replication can be broken if Subscriber is unavailable for too long and send queues buffer is exceeded
• Typically 3-4 days (*can vary with load)
Alert Raised!
• Alert will be raised DBReplicationStopped
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
Database Replication Reset
DB Master DB Standby
1. Teardown Replication.
CDS 2. Setup Replication. CDS
3. Merge Data
HDS HDS
RDS RDS
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
Disable/Enable CDS/HDS
HDS HDS
Enable CDS/HDS
RDS RDS
1. Setup HDS replication.
2. Merge HDS data.
3. Copy node 1 CDS to node 2.
4. Activate node 2 CDS.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
Synchronize Data - GUI
Tools -> Datastore Control Center ->
Datastores
RDS RDS
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
Force Database Sync – CLI Command
Local DB Remote DB
CDS
Overwrite Target = CDS
Local!
HDS HDS
RDS RDS
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
Reporting Review - Datasources
Subscriber’s CUIC
Also uses Subscriber’s
db_cra
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36
Database Issues – Further Analysis
• From Real-Time Monitoring Tool (RTMT) collect logs for Cisco Unified CCX Database
DB
online.uccx.log file for
issues related to database
service
DB REPLICATION
uccx_repl_output_util.log
file for issues related to
database replication
uccxwallboard
Wallboard User limited to
RtCSQsSummary and
RtICDStatistics tables
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38
Reporting and Database Performance
• Review the configured CUIC reports and their frequency
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 39
Reporting and Database Performance
• If tables have millions of rows, review purge config:
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 40
Databases summary
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 41
Platform vs UCCX Replication
• Platform stored in different database instance
• Platform replication commands start with “utils dbreplication *”
• UCCX replication commands start with “utils uccx dbreplication *”
• Platform replication status also shown in RTMT
• CUIC and Finesse use platform database instance
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 42
UCCX Replication
Publisher Subscriber
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 43
Maintaining database consistency across both nodes
Attempt configuration
change on Node 1
After a few
2-phase Commit change seconds, data is
commit pushed to Node2
for config
changes
If the database is down for any reason, the call data is written
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
into flat files that can be used to restore into the database
44
later.
DB Replication States – basic check