checking for file

Last Post 04 Oct 2007 11:06 AM by SugarDBA. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
dbandee
New Member
New Member

--
01 Oct 2007 11:12 AM
Hi
I am trying to implement the following
I nave a process that ftps files over. files are always teh same they have .xyz extension. ftpm job runs at 8 am. somtimes files arrive at 8:05 and job misses them all. My question is how do i handle such situaltion. How do i implement "check for file and if not there retry in 5 min" logic
I am running sql 2005.

Or third party tools maybe the solution?


Thanks
nosepicker
New Member
New Member

--
02 Oct 2007 06:56 AM
You can have a job run every 5 minutes that executes an "if exist ..." command (using xp_cmdshell as rm suggested, or just using the operating system command window). If the "if exist ..." is true, you can run an osql command to execute sp_startjob or raiserror to start another sql job that processes your files.
SugarDBA
New Member
New Member

--
04 Oct 2007 11:06 AM
You may want to look into xp_fileexists and WAITFOR.
You are not authorized to post a reply.

Acceptable Use Policy