Forum Discussion

Reacher01's avatar
Reacher01
Copper Contributor
Aug 06, 2024

ERROR 4819

SQL Server: 2019

 

ERROR (4819) -" Cannot bulk load. The bulk data stream was incorrectly specified as sorted or the data violates a uniqueness constraint imposed by the target table. Sort order incorrect for the follow"

 

We tested the exact same stored procedures on SQL2019 System A and everything worked as expected.  But it gives errors when we test on the SQL SERVER 2019 System B.

 

  SQL Server A and SQL Server B are the same version, 2019 but something is causing these jobs to fail.

I’m not sure what to do next.  Any thoughts/suggestions would be greatly appreciated.

 

Thanks.

4 Replies

  • 2024437's avatar
    2024437
    Copper Contributor

    Reacher01: Have you found any solution?

    We are getting the similar error. I have checked the sort order in the stored procedure and it does seem to be right. So far, i do not see any issues with the code.

    • Reacher01's avatar
      Reacher01
      Copper Contributor

      rodgerkong 

       

      Thank you for your kind reply and help.  There were no constraints on the DB.  

      • rodgerkong's avatar
        rodgerkong
        Iron Contributor

        Reacher01 

        execute sql below in both server, check results

         

        SELECT name, collation_name  
        FROM sys.databases  
        WHERE name = N'Your DB Name'; --replace the string to your db name 

         

Resources