SQL Server – Transferring Large Databases to Azure (>300MB)

azure-sql-databasesql server

I want to transfer a local SQL Database to Microsoft Azure.
There are files stored in the db, so the db is about 300MB in size.

From SQL Server Management Studio I tried the following:

Tasks->Generate Scripts

I was able to create the .sql script but couldn't load it.

I also tried the

Tasks->Deploy Database to SQL Azure…

but after about 30 mins, it crashed.

Any ideas?

Best Answer

You should use the Azure migration wizard instead of using SSMS create script.

How to: Use the SQL Azure Migration Wizard

Behind the scenes it uses bcp to transfer your data to Azure.

For the future, SSMS is not meant to handle large .sql files. Even a 1 or 2 MB file will crash SSMS. Instead you should use command line tools like sqlcmd or bcp - depending on your needs.