Execution of an eSync profile fails with one of the following error messages:
- Exiting as cannot load target model Master in remote database.
- Exiting as cannot load target model Master in local database.
Important! Backup the database before making any changes.
Ektron 8.6.1 introduced Package Synchronization and the eSync infrastructure now handles the context changes when switching from one type of sync to another. For example, when you execute a package sync profile, items related to the package (knowledge, history, logs, and so on) must be loaded from a set of locker tables into the primary eSync tables. However, before that can occur, the existing values in the primary tables must be stored in the other locker table locations.
The steps to perform the eSync context change are logged in a table. The following query shows recent activity:
SELECT Top 100 * FROM scope_chglog_tbl ORDER BY scope_chglog_dtm DESC
If the tables that are involved in this context switch grow large enough, the duration may exceed SQL Server timeout values, and the "cannot load target model" error results. The first place to check is the destination server sync logs; they can be accessed using the Workarea logged into the destination CMS. (See Viewing a Log of all Syncs for a Sync Server Relationship in the Ektron Reference ).
Log entries are created when changes cannot be applied from the source on the destination, (for example, due to a constraint issue such as a foreign key violation. Left unresolved, eSync logs these "skipped changes" during each execution. Over time, especially in a busy eSync environment, the amount of data in the log table can become significant, leading to longer context change durations due to the increased time it takes to copy the contents between the locker tables and the primary tables.
You should check the destination sync logs periodically and resolve any errors.
When viewing the eSync log, note the value in the Skipped column. Transient increases are okay but skipped counts that remain constant or increase over a period of several eSync runs should be investigated by clicking on the yellow triangle and drilling down to the actual error. When the cause is eliminated, and if the cannot load target error remains, consider cleaning up the log table with the following queries (adjusting the date to keeping 30 days of entries in the tables):
DELETE FROM scope_loginfo_locker WHERE scope_manager_id = 1 and sync_end_time < '2014-04-01 01:00:00.000'
DELETE FROM scope_loginfo WHERE sync_end_time < '2014-04-01 01:00:00.000'
Another source of information is to run the Disk Usage By Top Tables report on each database. In particular, note if tables prefaced with scope_ are among the those at the top of the report. Large row counts and large row sizes may indicate a situation that you should further investigate, such as skipped changes at the destination.
Other possible causes of the error message include:
- The database transaction log is full.
- The database permissions are not correct; the connection account must minimally have: db_datareader , db_datawriter , db_ddladmin , and db_executor .
- It the database version is 8.7 but less than version 9.0, the stored procedure in the database may be looking at an older version of the logs instead of the newer logs in locker table. This can be corrected with the following script but you must back up all databases that you esync with and apply it to all of them. Please download and run this file on all databases.
NOTE: MAKE A BACKUP OF DATABASES BEFORE RUNNING ANY SCRIPTS AND ONLY RUN ON 8.7 VERSIONS.
Target Model Master Updated Script
If these steps do not solve your issue, contact Ektron Support.