Sql-server – which one is the fastest way of moving database form local to live server in sql server

exportimportsql server

I am using SQL Server 2008, I have a big database of almost 500 MB. Now I wanted to upload or deploy this DB to the Live server. Currently I am generating scripts and then uploading them to live and by command line I am deploying the database.

This took almost 2 hours so that's very cumbersome to do and one more problem is also that I am not able to use import export database option cause it loses constraints like primary key and all and also gets an error while inserting record from the same process.

Can you tell me how can I do all this and with proper data transfer.

Best Answer

You can use backup/restore. Take a backup of your dev db and restore it on the live server. Should be a bit faster than 2 hours.