There are many times as a database administrator (DBA) that I have to take a quick backup of a database. While this isn’t a complex task, if you are unfamiliar with it, here is the syntax to quickly backup a database in SQL Server 2005.
Backup database [database name] to disk=’path where you want the file.bak’
Let’s see this in action.
Note: You can also use a UNC path if you wanted to copy it over the network. The syntax would change to the following:
Backup database [database name] to disk=’\\servername\path.bak’
If you want to see your progress, you can add the stats option as shown in Figure B.
You can take the backup command to a completely different level but this is a quick tip on just getting a backup to perform some quick maintenance.