|
WhatsUp Professional - How to automate a database backup |
||
| Product: | Version: | Platform: |
| WhatsUp Professional | 2005+ | Windows 2003 Server Windows XP SP1 or later Windows 2000 |
|
|
||
|
Question/Problem: I want to automatically backup my database on a schedule. Is there a way to do this? Answer/Solution: To automatically make a
complete backup of the database, you can setup a scheduled task in Windows that calls
a batch file. OSQL -E -n -D WhatsUp -Q "BACKUP DATABASE WhatsUp TO DISK = 'drive:\path\WhatsUp.dat' WITH INIT" The batch file should be located in the MSDE program installation directory. The default location is C:\Program Files\Microsoft SQL Server\80\Tools\Binn. In our example, we wish to place our backup in C:\Program Files\Microsoft SQL Server\MSSQL$WHATSUP\Data, so the batch file would contain: OSQL -E -n -D WhatsUp -Q "BACKUP DATABASE WhatsUp TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL$WHATSUP\Data\WhatsUp.dat' WITH INIT" Note: This process will overwrite any data in an existing WhatsUp.dat |
||
| Document #: | Revision Date: | |
| WP-20050909-DM01 | 09/14/05 | |