WHAT I WANT:
I’m looking for a way to monitor the directory (maybe with dbo.fc_fileexists?) and when all six of the new files have finished copying over the job will execute. I am looking for a way to do this within SQL.
WHAT I HAVE:
I have a job with 18 steps (verify .bak, restore .bak to DB, shrink log) that uses six SQL .bak files from another server to update existing databases on my server. Each month six new .bak files come into a directory and overwrite the existing files, keeping the same name, only the file date changes. The copy process starts on the last day of the month and runs for about 20-25 hours, depending on network traffic. (There’s nothing I can do about this part, it’s just a preexisting codition.)
- I can’t delete or rename the files after I’m done because another group uses them as well.
- My experience is OS, not SQL, I'm learning, so please explain as if to a noob. :)
MY SERVER'S SPECS:
Microsoft SQL Server Management Studio 11.0.7001.0
Microsoft Analysis Services Client Tools 11.0.7001.0
Microsoft Data Access Components (MDAC) 6.3.9600.17415
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.11.9600.18895
Microsoft .NET Framework 4.0.30319.34209
Operating System 6.3.9600