IDENTITY_INSERT is a session related setting, not a global one. You have to issue it within the same session as you what to load data.
IDENTITY_INSERT ISSUE
Hello Team,
I am trying to load the data from azure blob storage to Dedicated sql Pool. For few of the tables the data is getting loaded dynamically and for few of the tables i am getting error :
ErrorCode=UserErrorSqlDWCopyCommandError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=SQL DW Copy Command operation failed with error 'An explicit value for the identity column in table 'TABLE_NAME' can only be specified when a column list is used and IDENTITY_INSERT is ON.',Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=An explicit value for the identity column in table 'TABLE_NAME' can only be specified when a column list is used and IDENTITY_INSERT is ON.,Source=.Net SqlClient Data Provider,SqlErrorNumber=8101,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=8101,State=1,Message=An explicit value for the identity column in table 'TABLE_NAME' can only be specified when a column list is used and IDENTITY_INSERT is ON.,},],'
My finding :
I have TRIED
SET IDENTITY_INSERT TABLE_NAME ON;
AS WELL AS
SET IDENTITY_INSERT TABLE_NAME OFF;
But still i am getting the same error .Please advise.
Regards
RK