Help get this topic noticed by sharing it on Twitter, Facebook, or email.

When table schema change, new column created with NOT NULL will case issue

This problem might exist in other PROCs. I am just sharing my case.

When using SF_ReplicateIAD, we very often encounter table schema change. Yet the new column cannot be null. Eventually will lead to the PROC fail.

I can fix those by myself but it will eventually be over written by your update. I would be better that you guys fix it.

Here is an example:
--- Starting SF_ReplicateIAD for ContentVersion V3.6.3
09:06:14: Parameters: salesforce_live ContentVersion Version: V3.6.3
09:06:14: DBAmpNet2 is being used with queryAll.
09:06:14: Drop ContentVersion_Previous if it exists.
09:06:14: Drop ContentVersion_DeleteIAD if it exists.
09:06:14: Create ContentVersion_Previous with new structure.
09:06:14: Run the DBAmpNet2.exe program.
09:06:15: DBAmpNet2 (c) Copyright 2015-2017 LLC
09:06:15: Parameters: replicate ContentVersion_Previous COR-MTL-DB3 Salesforce Backups IAD salesforce_live
09:06:18: 613 rows copied.
09:06:18: DBAmpNet2 Operation successful.
09:06:19: Create ContentVersion_DeleteIAD with new structure.
09:06:19: Identified 86 hard deleted rows.
09:06:19: Table schema has changed.
09:06:19: Error occurred while building a table of hard deleted rows.
09:06:19: Error: Cannot insert the value NULL into column 'SharingPrivacy', table 'Salesforce Backups IAD.dbo.ContentVersion_Previous'; column does not allow nulls. INSERT fails.
--- Ending SF_ReplicateIAD. Operation FAILED.
Msg 50000, Level 16, State 1, Procedure SF_ReplicateIAD, Line 552 [Batch Start Line 5]
--- Ending SF_ReplicateIAD. Operation FAILED.
1 person has
this problem