Sometimes you need a simple script to backup the full DB to a file.
Some of the uses of the script I found were:
- To create a nightly job; simply have a hard file backup on a drive
- To generate a file on demand for restore to other environments (dev/stage/uat)
- And to be part of some build process
This script automatically appends a timestamp, so each time you have a fresh copy of the DB. Works great for us! See the associated restore script as well.
See: http://blog.tech-cats.com/2007/10/sql-server-script-to-backup-database-to.html