In Windows, I am trying to import a large SQL dump file (4.6 GB) into SQL Server 2008. Since it's a large file, I used
sqlcmd -S <SERVER-NAME\INSTANCE> -i C:\<path_to_SQL_file>.sql -o C:\<path_to_output_file_1.txt
However, the command produces the following error:
Error: Syntax error at line 11302 near command '-' in file C:\.sql
In Mac OS X, sed -n '11302p' C:\<path_to_SQL_file>.sql
produces
?????$R?}D?XL?)?_K??h?l????????p?^?'?F1璨?¸??ωN?Q???흞????????+/??I?*5jE?1????f?`?nL_?~E?????^ap??Ht?2???g
?2z7$(f???*??????C?????????A?K?хl?B?#??˞K?
q??z?
??I.?
^ ?ݢ?G??cu?Zc?t?'?&L?W??s???W\|x??^_??PǴb???F???m:RY?ES??-D??L?????n??'
3???+?ecKd?vysEkz???wh~;o7?y??\??i
I tried to inspect the file by splitting it using split command but the output is garbled.
Do you think the file is wrongly encoded? How do you feel I should proceed trying to find the error?
The dump file was earlier used by another developer who didn't have any problems with it. Unfortunately, he is on extended vacation for the time being.