Re: SQL Job question
- From: "Chris Hall" <someone@xxxxxxxxxxxxx>
- Date: Fri, 23 Mar 2007 13:41:56 -0400
Okay, I tried to run this again, logging into the db as domain\administrator
and got the following error when trying to run the script:
Server: Msg 2812, Level 16, State 62, Line 4
Could not find stored procedure 'xp_cmdshell'.
Looking at the docs, it appears they are geared towards running the script
through a sql job in Enterprise Mgr.
Any other suggestions?
"Chris Hall" <someone@xxxxxxxxxxxxx> wrote in message
news:Oe6ca3VbHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
Andrew,as
Thanks for your response. I tried this a couple of ways...logged into QA
SA and with Windows authentication. No luck either way. QA just seems tosupplied
hang ("Executing qfuery batch..."). I will review the articles you
below and post back if this still doesn't work.or
"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
asother?
http://www.support.microsoft.com/?id=269074 How to Run a DTS Package
ato
Scheduled Jobrun
http://www.support.microsoft.com/?id=890775 How to enable no sa's to
xp_cmdshell
--
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
thefind
any resoures on this....We have an application that uses SQL 2000 on
thenbackend. I'm trying to setup an automated way to backup a database,
running(windowszip
that database up. The final step would be to set a scheduled task
task mgr) to ftp the zipped file to an ftp server. The server is
getcodeWindows 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
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
- References:
- SQL Job question
- From: Chris Hall
- Re: SQL Job question
- From: Andrew J. Kelly
- Re: SQL Job question
- From: Chris Hall
- SQL Job question
- Prev by Date: Re: SQL Server 2005 SP2 fails in upgrading Database service
- Next by Date: Re: If a column is not used does it waste space?
- Previous by thread: Re: SQL Job question
- Next by thread: Re: SQL Job question
- Index(es):
Relevant Pages
|