Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Replication Oracle to 2008R2 - truncated update commands? Expand / Collapse
Author
Message
Posted Friday, January 18, 2013 9:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 16, 2015 2:39 AM
Points: 12, Visits: 158
I have set up an Oracle transactional publication on a single table as a test. Snapshot works ok so i assume we have good data mapping. However the replication is failing on update. When i try to view the failing command, using sp_browsereplcmds, it is truncated. .

sp_MSupd_BULLPERSON" (62,'Mr','FRANK','Q','SPENCER',12345,NULL,'678910','M','1939-09-13 00:00:00','M',NULL,NULL,NULL,NULL,'2013-01-18 14:10:36',NULL,NULL,NULL,NULL,NULL,' --missing parameters here.


This makes it impossible to test the sp_MSupd_Table command and isolate any problem field which is causing the update to fail. If i look directly into the MSrepl_commands table the command is encoded. Looking in the sp_browsereplcmds script i see sp_printstatement @query which i assume translates the coded command - is this truncating the command ?

The error shown in the replication monitor does not reveal which field i need to look at

I created a smaller publication so that the entire update with all parameters is visible. this works fine. For the same update it gives no error. Consequently i don't know it there is an errant data mapping in the larger publication or even if the larger publication is sending a truncated command!

Any help appreciated.

Z


Post #1408961
Posted Friday, January 18, 2013 11:22 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:54 AM
Points: 14,207, Visits: 37,134
ok just checking the basics here;
I'm assuming you are reviewing the code in SSMS? by default, to save memory, SSMS limits results to the first 256 characters...have you already changed this to show the first 8K (if the command is larger than 8K, you need to use something else...SSMS will not show more than 8K, even if the string is longer:)





Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1409034
Posted Monday, January 21, 2013 4:57 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 16, 2015 2:39 AM
Points: 12, Visits: 158
Brilliant - never noticed that little SSMS 'feature' before! Well that's got my "command" where i want it.
Needless to say it runs fine from the SSMS window using 'exec' but the replication still fails on update.

Any thoughts where to go next? Nothing much in Googleland


Command attempted:
{CALL "sp_MSupd_BULLPERSON" (62,'Mr','FRANK','Q','SPENCER',123456,NULL,'270944','M','1939-09-13 00:00:00','M',NULL,NULL,NULL,NULL,'2013-01-18 14:10:36',NULL,NULL,NULL,NULL,NULL,'
(Transaction sequence number: 0x0000000000000000000700000000, Command ID: 2)

Error messages:
Invalid distribution command, state 2: transaction 0x0x0000000000000000000700000000 command 2{offset : 175 token offset: 174 state: 50) }. (Source: MSSQL_REPL, Error number: MSSQL_REPL21001)
Get help: http://help/MSSQL_REPL21001
Post #1409487
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse