set Not For Replication True via Stored Procedure

Some administrator may not prefer to use SQL Server Management Studio for the strictions such as timeout or following Foreign Key exists;

To set or UnSet "Not for Replication" property of any column you want to use in Replication;

DECLARE @ObjectID INT = OBJECT_ID('dbo.tFileProvider') //get Object Id


exec sys.sp_identitycolumnforreplication @object_id = 246291937, @value = 1 //0 : No ; 1 : yes

Comments

Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in CrmServiceHelper.cv