Will running knowledge re-index utility pdm_k_reindex found error "The program was not successful due to a critical error", what to do?

Document ID : KB000025651
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Running the utility pdm_k_reindex on a Service Desk system that uses a SQL Server database with replication or log shipping gives an on-screen error of:

C:\>pdm_k_reindex
 
Got knowledge export/import transaction status Ping the EBR indexing daemon...
Got the hostname of the EBR indexing daemon.
Copy EBR admin entities...
Switch search table name to EBR_FULLTEXT...
Switch reindex table name to EBR_FULLTEXT_ADM...
Truncate EBR_FULLTEXT table...
The program was not successful due to a critical error. Please see the log files for further details.

The Service Desk Manager stdlogs contain errors such as:

01/11 19:37:08.53 SQLServer01    sqlagt:EBR_FULLTE    6748 ERROR        sqlsrvr.c              646 Execution
failed. MISC_DB_ERROR 01/11 19:37:08.72 SQLServer01 pdm_k_reindex 7892 SEVERE_ERROR BPebrReindex.c 614
EBR::REINDEX::EBR::BPebrReindex::recvmsg::in "MTH::EBR::REINDEX::truncate_table_reply::EBR_FULLTEXT" method.
Error: 15: AHD04199: An unexpected error occurred. Contact your administrator. [Microsoft OLE DB Provider for SQL
Server] [ SQL Code=4711 SQL State=42000] Cannot truncate table 'dbo.EBR_FULLTEXT' because it is published for
replication.

Note that the table name in the SEVERE_ERROR messages may change, depending on which tables are replicated.

Solution:

When the pdm_k_reindex SDM utility is run, a TRUNCATE TABLE command is issued over tables:

CI_TWA_CI
DLGTSRV
EBR_FULLTEXT
EBR_FULLTEXT_ADM
EBR_PATTERNS
EBR_PROPERTIES
EBR_SYNONYMS
EBR_SYNONYMS_ADM
OPTIONS

If SQL replication or log shipping exists, the "TRUNCATE TABLE" command is prevented and the pdm_k_reindex fails.

The solution is for the SQL DBA to disable both replication and log shipping for the duration of the pdm_k_reindex on the above tables.

Additional: See TEC473005 "Database transactions performed during a pdm_k_reindex" (2008) for a list of steps performed by the pdm_k_reindex command, although note that as Jan 2013 it is incomplete as to the full list of table names included above.