I have 917419 records in a table in a SQL Server 2014 database. I want to move theses records into a SQL Server 2005 database.
I have generated script into a file using "generate and publish wizard" for one table, and I ran the script file into command prompt by using
sqlcmd -U sa -P abc123* -S XXX\SQL2014 -i E:\script.sql -o E:\Scriperror.txt
It executed successfully. Only 915419 records are inserted into SQL Server 2005 database. The remaining 2000 records are missing.
Also we have compared the both records in excel and we inserted missing records manually. Our client want to move data to SQL Server 2005 every two months. So comparison and manual insert is not possible.
Can anyone help me why the 2000 records are missing? Which is the best way to resolve this problem?