Re: SQL Job question
- From: "Chris Hall" <someone@xxxxxxxxxxxxx>
- Date: Fri, 23 Mar 2007 11:13:44 -0400
Andrew,
Thanks for your response. I tried this a couple of ways...logged into QA as
SA and with Windows authentication. No luck either way. QA just seems to
hang ("Executing qfuery batch..."). I will review the articles you supplied
below and post back if this still doesn't work.
"Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx> wrote in message
news:%23A3$D4UbHHA.1300@xxxxxxxxxxxxxxxxxxxxxxx
Chris,account
Can you execute this from QA and have it work?
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
If so then my guess would be the account that SQL Agent or the proxy
is using does not have proper permissions to execute that command orrights
to the folders. Is the job owned and executed by someone in the sa role ora
other?
http://www.support.microsoft.com/?id=269074 How to Run a DTS Package as
Scheduled Jobrun
http://www.support.microsoft.com/?id=890775 How to enable no sa's to
xp_cmdshell(windows
--
Andrew J. Kelly SQL MVP
"Chris Hall" <someone@xxxxxxxxxxxxx> wrote in message
news:uP7j8aMbHHA.704@xxxxxxxxxxxxxxxxxxxxxxx
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
codetask 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
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: Chris Hall
- Re: SQL Job question
- References:
- SQL Job question
- From: Chris Hall
- Re: SQL Job question
- From: Andrew J. Kelly
- SQL Job question
- Prev by Date: Re: SQL Job question
- Next by Date: Re: SQL Server 2005 SP2 fails in upgrading Database service
- Previous by thread: Re: SQL Job question
- Next by thread: Re: SQL Job question
- Index(es):
Relevant Pages
|
Loading