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

Complex Query in QueryExpression in Microsoft CRM 2011

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Microsoft Power Apps Portal integration with Dynamics 365 CE On-Premise - Step By Step Guide