Created a 5651 line insert script with the Export to SQL Wizard. (Needed to insert the contents of local table to a remote server).
Changed the connection on the script to the remote server, and executed it. Ran the first batch of 500 rows successfully, ran the second batch of 500 rows successfully, then the app just crashed completely – no stack dump, app just closed.
On re-opening the app, the script was in the document recovery pane. Clicked it. It opened without any kind of formatting (all black text, no keywords highlighted). Re-connected to the remote server, ran the script again. This time it just finished successfully so not sure what happened.