February 5, 2009 at 2:23 pm
Hi,
We have sql job which load files(.txt) from one folder to sql database..(the job calls one proc to load the data into tables). Before loading the data into the table I want to check file size and if the file size is 0 KB the job should fail.
Is there is any T-Sql Keyword to find out the file size or even DOS command is fine ..
There is no option to change the proc(Changes to the proc are not allowed )and I have to find out the 0 kb before passing the file to Procedure)
*Because of 0KB's we are missing revenue *
Any help is really appreciated
Thanks.
February 5, 2009 at 2:35 pm
You could define a CLR that would check filesize for you. Or an ActiveX script that could be run as part of an SSIS package. CLR would be the most efficient.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 5, 2009 at 2:39 pm
Oddly enough the headline article for SQL Server Central today discusses two pretty easy ways to get that.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply