Having a big file exported using SQL Developer I got the “SP2-0027: Input is too long (> 2499 characters)” error recently.
Since the file was too big to edit by hand, I used the following to add newlines after every comma in the file:
user@server:~/work$ cat file.sql | perl -pe 's/,/,\n/g' > new_file.sql