If you do an export with PhpMyAdmin, you can switch sql compatibility mode to 'MSSQL'. That way you just run the exported script against your MS SQL database and you're done.
If you cannot or don't want to use PhpMyAdmin, there's also a compatibility option in mysqldump, but personally I'd rather have PhpMyAdmin do it for me.
It demands a little bit of work, because it has to be done table by table. But anyway, I could copy the tables, data and constraints into a SQL Server database.
In addition to MySQL it supports Oracle, Sybase and MS Access.
It appears to be quite smart and capable of handling even nontrivial transfers. It also got some command line interface (in addition to GUI) so theoretically it can be integrated into some batch load process.
The current (June 2016) stable version 6.0.1 crashes with the current (5.3.6) MySQL ODBC driver while transferring data. Everything 64 bit.
The 5.3 version with the 5.1.13 ODBC driver works fine.
In my case the dump file was quite large, so I decided to split it into a number of small pieces(1000 lines each) - split --lines=1000 "$FILENAME" part-
Finally I iterated over these small files, did some text replacements, and executed the pieces one by one against MS SQL server:
export SQLCMD=/opt/mssql-tools/bin/sqlcmd
x=0
for file in part-*
do
echo "Exporting file [$file] into MS SQL. $x thousand(s) processed"
# replaces \' with ''
sed -i "s/\\\'/''/g" "$file"
# removes all "
sed -i 's/"//g' "$file"
# allows to insert records with specified PK(id)
sed -i "1s/^/SET IDENTITY_INSERT $TABLE ON;\n/" "$file"
"$SQLCMD" -S "$AZURE_SERVER" -d "$AZURE_DB" -U "$AZURE_USER" -P "$AZURE_PASS" -i "$file"
echo ""
echo ""
x=$((x+1))
done
echo "Done"
Of course you'll need to replace my variables like $AZURE_SERVER, $TABLE , e.t.c. with yours.
--extended-insert=FALSE is needed to avoid mssql 1000 rows import limit.
I created my tables with my migration tool, so I'm not sure if the CREATE from the backup.sql file will work.
In SQL Server's SSMS I had to imported the data table by table with the IDENTITY_INSERT ON to write the ID fields:
SET IDENTITY_INSERT dbo.app_warehouse ON;
GO
INSERT INTO "app_warehouse" ("id", "Name", "Standort", "Laenge", "Breite", "Notiz") VALUES (1,'01','Bremen',250,120,'');
SET IDENTITY_INSERT dbo.app_warehouse OFF;
GO
If you have relationships you have to import the child first and than the table with the foreign key.