Greetings.
We replicate a 2.5 TB database to 6 replication servers. Over the weekend we purged about 1 TB of data. For long winded reasons, we set all of our tables to not replicate Inserts, Updates, and Deletes by doing the following on all tables once the apps were brought offline:
exec sp_changearticle 'myPub', 'FaStudentPell', 'ins_cmd', 'none'
exec sp_changearticle 'myPub', 'FaStudentPell', 'upd_cmd', 'none'
exec sp_changearticle 'myPub', 'FaStudentPell', 'del_cmd', 'none'
Then at the end of the weekend, before the apps were brought back up, I re-enabled:
exec sp_changearticle 'myPub', 'FaStudentPell', 'ins_cmd', 'CALL [sp_MSins_dboFaStudentPell]'
exec sp_changearticle 'myPub', 'FaStudentPell', 'upd_cmd', 'SCALL [sp_MSupd_dboFaStudentPell]'
exec sp_changearticle 'myPub', 'FaStudentPell', 'del_cmd', 'CALL [sp_MSdel_dboFaStudentPell]'
So today I wanted to rebuild two of the six replication servers. Due to the size of this guy we initialize w the backup/ restore method as opposed to a snapshot. To be clear, the DB's on two of the six servers were recreated today w backups from the OLTP environments. Anyways, I go through our well documented steps for recreating this stuff. Now here's where it gets weird -- about an hour after being rebuilt I get the following message on two of the severs:
Cannot insert the value NULL into column 'IsFallenHeroesEligible', table 'c2000.dbo.FaStudentPell'; column does not allow nulls. INSERT fails. (Source: MSSQLServer, Error number: 515) Get help: http://help/515
Obviously this is bizarre since the DB was created with a backup from OLTP, where this column does not allow NULL's. Note that this message is only happening on the two instances I rebuilt today, not the other 4 instances. Also note those other 4 instance do NOT contain this column. Replication was set up before this column was added, and we don't replicate schema changes.
From doing some digging I see that the replication sproc (sp_MSins_dboFaStudentPell) doesn't attempt to insert in to this column on these two servers, it's acting like the other 4 instances that do NOT contain this column. I suspect it has something to do with the sync object views that run behind the scenes, but I've already been down the rabbit hole on this thing and need to stop.
If these DB's were created from OLTP backups, why isn't the sproc for them correct? This is pretty deep in the weeds I know, but at this point I'd like to better understand.
Thanks!
Thanks in advance! ChrisRDBA