Sql – How to back up a database to a .bak file


I have a website I've created in Visual Studio 2008 and I need to take it live. How can I backup the database file to a .bak so I can hand it over to the hosting company to place on the server?

Best Solution

From a SQL prompt:

BACKUP DATABASE MyDatabase TO DISK='E:\MyDatabase.bak'