BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 02-01-2008, 04:40 PM   #1 (permalink)
New Member
Join Date: Sep 2005
Model: 8830
Carrier: Verizon
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Merge Database Error

Please Login to Remove!

I've been working with RIM over a corrupt database for some time now. The final solution, which they tested and verified that works, was to merge the existing database into a new db. After they tested it, they verified that all the corruption was repaired. The tech I've been working with is out, so I'm left somewhat helpless.

So I set off today testing this theory on my own and roughly half an hour into the merge, it is terminating with an error...

[0057] (02/01 13:38:48) TableMerger::MergeTables - Merging record: UserConfigId='199', DatabaseName='AutoText', UID='1760480179'
[0063] (02/01 13:38:48) SyncBackupRestoreTable::ReplaceFKeys - Replacing foreign key value: UserConfigId=27
[0064] (02/01 13:38:48) SyncBackupRestoreTable::ReplaceFKeys - Using new foreign key value: UserConfigId=199
[0057] (02/01 13:38:48) TableMerger::MergeTables - Merging record: UserConfigId='199', DatabaseName='AutoText', UID='1760480180'
[0000] (02/01 13:38:48) TableMerger::MergeTable - SyncBackupRestore - Finished merging tables.
[0000] (02/01 13:38:48) TableMerger::MergeTable - SyncUserState - Error! Unable to retrieve record set from source database.
[0000] (02/01 13:38:48) TableMerger::LogSQLError - [Microsoft][ODBC SQL Server Driver]Communication link failure Error Code: 0
[0000] (02/01 13:38:48) TableMerger::LogSQLError - SELECT UserConfigId,SyncUserStateTypeId,State FROM SyncUserState 
[0049] (02/01 13:38:48) DBMerger::MergeDatabases - Error merging BES databases.
[0034] (02/01 13:38:48) DBMerger::~DBMerger - Disconnecting from source database.
[0035] (02/01 13:38:48) DBMerger::~DBMerger - Disconnecting from destination database.
[0003] (02/01 13:38:48) main - Program terminating with error code -8
[0009] (02/01 13:38:48) main - DBMerge.exe finished.
The new db was created with the correct revision and patch level.

the original error that they found was a misordering of several tables. The symptom on my end was activation hanging, and when trying to remove a user, an error of "Unable to remove user ""..." (empty quotes instead of the users name.

Any ideas what I can do at this point?
Old 02-01-2008, 06:37 PM   #2 (permalink)
BlackBerry Extraordinaire
gibson_hg's Avatar
Join Date: Dec 2007
Model: NA
PIN: 80081ES
Carrier: NA
Posts: 1,006
Post Thanks: 0
Thanked 0 Times in 0 Posts

You could try using DBCC CHECKDB against the corrupt database to check for inconsistences and then run DBCC DBREINDEX against the tables listed in the log from CHECKDB to reindex the tables.

I have used this a few times when there were issues with certain tables, like the SyncBAckupRestore table listed in your log.

Give that a try, it might help you get the databases merged.
Old 02-02-2008, 12:11 AM   #3 (permalink)
BlackBerry Genius
hdawg's Avatar
Join Date: Aug 2006
Model: hdawg
Carrier: hdawg
Posts: 6,632
Post Thanks: 0
Thanked 0 Times in 0 Posts

try logging into the source sql server remotely

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.