You are here: Re: Fix Failure result due to no records found « MsSQL Server « IT news, forums, messages
Re: Fix Failure result due to no records found

Posted by Erland Sommarskog on 05/08/07 21:56

Connie (csawyer@rwbaird.com) writes:
> Sorry here is more detail. Last week we had determined that on step 2
> I was experiencing a failure due to loss of connection to our Pegasus
> server. This time I got an error on step 1 which is the code above
> and here is the error message:
> Executed as user: US\svcsqlserver. ...Move /Y F:\NPPDFs\*.* \\Mil-
> Pegasus-01\Optical\NaviplanOptical001\The filename, directory name, or
> volume label syntax is incorrect.DTSRun: Loading... DTSRun:
> Executing... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun
>...
> Basically the stored proc is runs
>
> DECLARE LOOKUP CURSOR FOR select pr.[id]
>> > from plan_report pr, plan_version pv
>> > where pv.plan_id = pr.plan_id and pv.status = '30' and pr.create_time
>> >>= pv.update_time and pr.create_time > (Getdate()-1)
>
> and there are no blobs (PDF's) returned by the select above so the
> procedure fails as there are no PDF's to move to (SET @file_name = 'F:
> \NPPDFs\'+cast(@pk as varchar(10))+'.pdf') @file_name.

I can't see that your stored procedure attempts to perform a MOVE
command, so the code for the procedure does not matter. Apparently
you have something that invokes MOVE in the DTS job. I guess you need
to add a check somewhere in your DTS job so that it does not try to
move any files that aren't there.

Since I don't know what your DTS job looks like, I can't really suggest
how that should be done. Actually, since I have no experience of DTS,
I would probably not be able to anyway.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация