Asked By LeoDemarc
22-Aug-07 09:34 AM

I have 2 parts to this question based on this problem; I need to create a
scheduled backup for my SQL 2005 Express databases, but the Management Studio
Express does not come with an agent to process scheduled backups.
Part 1: has there been any kind of release from Microsoft to provide this
tool? Is there something I'm missing that I can download?
Part 2: assuming Part 1 is no, I have done research and have been trying to
figure out how to create a batch file that will perform the backups, that I
can attach to a basic windows schedule. This is what I have discovered:
I can, for a command prompt, initialize a sqlcmd, then I can, manually from
the sqlcmd prompt, perform a backup. This is the generic code that I have
created:
from the command prompt
C:\>sqlcmd
1>EXEC sp_addumpdevice 'disk', 'database_backup',
2>'D:\Backupfolder\database_backup.bak'
3>BACKUP DATABASE database TO database_backup
4>GO
5>exit
C:\>
When I put this in a batch file and execute the batch file it stops after
the sqlcmd, where the command prompt sits at the first line 1>.
I am at a loss as to what I need to do, am I on the right track?
Thanks in advance for any assistance, my experience in the past has always
been exceptional.
Leo Demarce