Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The SSIS File Sweeper


The SSIS File Sweeper

Author
Message
jdgonzalez@jdandrachel.com
jdgonzalez@jdandrachel.com
SSC-Enthusiastic
SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)

Group: General Forum Members
Points: 183 Visits: 757
Comments posted to this topic are about the item The SSIS File Sweeper
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1306 Visits: 985
Dear Mr Gonzalez,
Your article lack somewhat in explanation. You keep refering to "your example" and "if we used your example" but then you use variables that was not created in your article. The table you created has the following names:
filePath, pattern, daysToKeep, includeSubFolders
You created variables:
daysToKeep, fileMetaData, filePath, includeSubFolders, pattern
but all of a sudden you talk about a variable called FileName???? Maybe I am silly, stupid or just incompetent but now I do not know whether you meant filePath or should I create a variable "fileName". I am rather new in ssis but not in visual studio so I sort of find my way around and tried to do this but till I came to the scripting portion and Visual Studio give me an error. "File" is not defined. I am stumped. I do not know enough and would like to use ssis more often. HeheHeheHeheHeheHeheHehe

:-PManie Verster
Developer
Johannesburg
South Africa

I can do all things through Christ who strengthens me. - Holy Bible
I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1306 Visits: 985
Mr.Gonzalez,

I apologize for the "File" part. I never saw the part where you said at the top we must add System .IO.

:-PManie Verster
Developer
Johannesburg
South Africa

I can do all things through Christ who strengthens me. - Holy Bible
I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)
Gaurav.Vinodkumar
Gaurav.Vinodkumar
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 165
Hello Mr. Gonzalez,

I am confused on how the properties Directory, FileSpec, Resource are assigned to variables...
based on my understanding the foreach loop container(Locate Files) has ADO enumerator and in this case the container will not show these propoerties...

Are there properties (Directory, FileSpec, Resource ) are assigned in the "Check for Delete" container?
If yes then what will be the enumerator and connection string in this container...

thanks for help on this.

Gaurav Mittal
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21073 Visits: 18259
Thanks for sharing.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

jreece
jreece
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 Visits: 132
Gaurav,
He left out some important details about the inner loop. That one should be configured as a Foreach File Enumerator, not and ADO enumerator. The rest of the instructions will make more sense once you select the right enumerator. It's on the Collection tab of the Foreach Loop Editor.
HTH,
Jean
jdgonzalez@jdandrachel.com
jdgonzalez@jdandrachel.com
SSC-Enthusiastic
SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)

Group: General Forum Members
Points: 183 Visits: 757
jreece (5/17/2010)
Gaurav,
He left out some important details about the inner loop. That one should be configured as a Foreach File Enumerator, not and ADO enumerator. The rest of the instructions will make more sense once you select the right enumerator. It's on the Collection tab of the Foreach Loop Editor.
HTH,
Jean


I appears that I left that out. There are two foreach loops. One is to get the data that contains which folders you want to evaluate and the inner foreach loop does the actual deleting.
Gaurav.Vinodkumar
Gaurav.Vinodkumar
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 165
Thanks All...this makes sense now.

Gaurav Mittal
ed 42468
ed 42468
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 5
All of the others code should be put in a Try block. The Catch block at a minimum should contain the statement:

Dts.TaskResult = Dts.Results.Failure
davidspeare
davidspeare
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 15
Has anyone seen any tool or code that will actually script out the ssis package?
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