Skip to Content
0

Can rs_subcmp allow datatype diffs that are implicitly convertable?

Apr 10 at 08:15 PM

31

avatar image

The new rs_subcmp is powerful, if a little hard to use.

But I have a situation where we're incrementally changing the schema for various databases across multiple replicated servers (specifically, upgrading from int to bigint)

The repserver has no problem replicating from int to bigint during our transition period, but rs_subcmp is more picky. It complains about type mismatches with messages like these:

  • Type mismatch for column #1 between the primary (8) and the replicate (30). [c/subcmp.c(3587)]
  • Length mismatch for column #1 between the primary (4) and the replicate (8). [c/subcmp.c(3596)]
  • Found 2 inconsistencies between the primary and the replicate - exiting ... [c/subcmp.c(3681)]

(Note, I am not using the -x schema compare option)

It's annoying that rs_subcmp doesn't have an option to skip the column type comparison

Any other suggestions for doing this? (other than writing a raft of custom select commands that do the conversion)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Avinash Kothare 6 days ago
0

Not tried myself but will it help if you put a view -- with needed datatypes -- on the table in question ?

This may trick rs_subcmp into thinking that column datatypes match !

HTH

Avinash

Share
10 |10000 characters needed characters left characters exceeded