March 15, 2010 at 3:14 am
Hi,
I have a scenario where a document directory is recorded in a table in the DB (e.g. C:\DocStorage\Entity\EntityID.pdf) but I need to also provide the file size in KB.
Is it possible to retrieve file system information through a sql query?
Thanks
G
March 15, 2010 at 5:42 am
March 15, 2010 at 6:02 am
Paul White (3/15/2010)
SSC Article: http://www.sqlservercentral.com/articles/SQLCLR/65656/
Thanks, i'll give this one a read!
March 15, 2010 at 6:05 am
There are other methods of course: xp_cmdshell, sp_OACreate, and so on. All pretty horrible.
CLR is the correct tool for this type of job. It is a good article, I hope you enjoy it.
Paul
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 15, 2010 at 6:40 am
Good article, especially since it shows both XP_CMDSHELL and the SQLCLR version.
I've never actually made use of SQLCLR but it looks like it may be the better solution for my problem.
Thanks again!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply