Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MS SQL Transactional Replication from Char(30) to Char(10)

$
0
0

Environment:

•Publisher: Microsoft SQL Server 2008 R2 (SP2) - (X64)

•Distributor: Microsoft SQL Server 2014 (SP2) (KB3171021) - (X64)

•Subscriber: Microsoft SQL Server 2008 R2 (SP3-OD) (KB3144114) - (X64)

I have Multiple Publishers and a single subscriber setup. For table X, Col A is char(10) in all the databases in the replication setup. Recently one of the Publisher database "Database D" had to upgrade and the Size of Col A is now char(30) - due to some business purpose but it mainly contains comments.

So replication from "Database D" to the reporting database (subscriber) is failing due to "String Truncated Error" I can not increase the size of that col A at the subscriber because we do not have the client's permission to do so.

Is it possible that replication by itself replicates only the first 10 characters of the char(30) column and truncates the rest of the string?


What I have found is : SET ANSI WARNINGS OFF can do this but only while we do manual inserts but doesn't work with replication. Other approach which I have thought is , if replication by itself cant handle is,

We create another col "col A1" on the Database D in Table A and this col stores only first 10 char of col A. We replicate col A1 to the current subscriber database.


Viewing all articles
Browse latest Browse all 17268

Trending Articles