SQL Job question
- From: "Chris Hall" <someone@xxxxxxxxxxxxx>
- Date: Thu, 22 Mar 2007 17:12:00 -0400
Greetings,
I'm a complete nub with SQL and have a question. I haven't been able to find
any resoures on this....We have an application that uses SQL 2000 on the
backend. I'm trying to setup an automated way to backup a database, then zip
that database up. The final step would be to set a scheduled task (windows
task mgr) to ftp the zipped file to an ftp server. The server is running
Windows Server 2003, the SQL version is 2000. Here's the transact-sql code
I'm using to:
DECLARE @bkFile varchar (75)
DECLARE @str nvarchar (300)
SET @bkFile='E:\Data\MSSQL\BACKUP\PPSSQLBU.bak'
BACKUP DATABASE [WinFMSQL] TO DISK = @bkFile WITH INIT, NAME = N'WinFM Full
Backup', STATS = 10, DESCRIPTION = N'WinFM DB Full Backup'
SET @str = '"C:\Program Files\7-Zip\7zFM.exe"
E:\Data\MSSQL\BACKUP\zip\PPSSQL.zip E:\Data\MSSQL\BACKUP\PPSSQLBU.bak'
EXEC xp_cmdshell @str
The backup kicks off and complete's fine, however, the file doesn't get
zipped. The log file and event viewer offers little information.
Thanks for your suggestions,
Chris
.
- Follow-Ups:
- Re: SQL Job question
- From: Andrew J. Kelly
- Re: SQL Job question
- Prev by Date: Re: SQL Server 2005 SP2 fails in upgrading Database service
- Next by Date: Re: SQL Server 2005 SP2 fails in upgrading Database service
- Previous by thread: SQL server does not exist or access is denied
- Next by thread: Re: SQL Job question
- Index(es):
Relevant Pages
|
Loading