SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Get file size


Get file size

Author
Message
hai21century
hai21century
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 530
Jeff,

I love your script.

Thanks

Hai



Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88000 Visits: 41128
Thanks, Hai.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
onlygoodones
onlygoodones
Old Hand
Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)

Group: General Forum Members
Points: 368 Visits: 215
Thanks a lot Jeff. Really helpful and you saved 2 days of my time ..
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88000 Visits: 41128
onlygoodones (6/23/2013)
Thanks a lot Jeff. Really helpful and you saved 2 days of my time ..


Thank you for the feedback. It's good to know that some of the older posts still help folks.

The proc works but, because of the multiple procedure calls in the While Loops, it's slow on directories that contain a lot of files. If you do have a whole lot of files, let me know what it is in the directory that you're looking for and we might be able to come up with a faster method.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
SAinCA
SAinCA
SSC-Enthusiastic
SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)

Group: General Forum Members
Points: 198 Visits: 695
This saved the day for a SQL2012 need.

Many thanks!
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88000 Visits: 41128
SAinCA (3/31/2015)
This saved the day for a SQL2012 need.

Many thanks!


Wow. Even after all this time. Thank you for the feedback. Care to share any details on what you're doing? I'm always curious.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
SAinCA
SAinCA
SSC-Enthusiastic
SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)

Group: General Forum Members
Points: 198 Visits: 695
We sadly lost our original customer and the loss seems irrevocable. Thus, why leave their millions of records in our 10Bn row raw-data table?

So I'm building a somewhat intelligent archival tool, based around bcp as we already use it successfully at our remote SQL Express locations.

The tenet, "First, do no harm" applies here: don't delete anything until you're sure you have a non-zero KB length file in place!

So, having looked at the old xp_cmdshell method and being too lazy to work out if the sp_OA% procedures might help, off to Google-land I trod.

It took an hour or so of looking at other solutions, refining searches, etc., but I came across your SP late yesterday, snagged the code, topped-it with my DBA DB USE, etc., and was delighted to see it compile successfully first time, then run faultlessly to list out SQL Agent Job log files, as a proof of use.

Taking your CREATE TABLE #FileDetails and making it my DECLARE @FileDetails TABLE was an easy clone, and here I am, WHERE EXISTS Path = @mypathandfile AND Size > 0, later, with a solution that fits my exact need.

You have my (continued) admiration for the lengths you must have gone to in order to put this thing together. Beyond that, making it available free gratis and for nowt is highly praiseworthy.

Again, MANY thanks, Jeff.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search