May 18, 2012 at 2:33 pm
MysteryJimbo (5/18/2012)
*cringe*
Sorry. I've seen xp_cmdshell and similar methods like that before. Oooo and a cursor. 🙂
awe come on; whether SSIS or anything else, multiple files requires a loop of some sort; in this case it's perfectly acceptable to loop thru items that are not in a datatable.
BULK INSERT is the the fastest method to do the work.
the knee-jerk reactions to cursors and xp_cmdshell have their place, but there are exceptions.
the added bonus here is there is a ZERO learning curve compared to SSIS....most posters can copy-paste-adapt, where it might take a while to get their first SSIS example up and running, let alone going thru the learning curve of errors from SSIS.
Lowell
May 18, 2012 at 2:41 pm
I do agree faster copy/paste solutions work in a pinch, however spending time working your first SSIS solution will pay off down the road. First, you have new ammo for future issues and second, the reward of learning something new that holds resume value is priceless. 🙂
May 18, 2012 at 2:46 pm
Lowell (5/18/2012)
MysteryJimbo (5/18/2012)
*cringe*
Sorry. I've seen xp_cmdshell and similar methods like that before. Oooo and a cursor. 🙂
the knee-jerk reactions to cursors and xp_cmdshell have their place, but there are exceptions.
I fully agree for the most part. Ive just experienced bad usage of both and xp_cmdshell isnt always an option in a secure environment
May 18, 2012 at 3:19 pm
MysteryJimbo (5/18/2012)
Lowell (5/18/2012)
MysteryJimbo (5/18/2012)
*cringe*
Sorry. I've seen xp_cmdshell and similar methods like that before. Oooo and a cursor. 🙂
the knee-jerk reactions to cursors and xp_cmdshell have their place, but there are exceptions.
I fully agree for the most part. Ive just experienced bad usage of both and xp_cmdshell isnt always an option in a secure environment
Heh... with more irony than most people can propably stand, if you [font="Arial Black"]can't[/font] run xp_CmdShell safely, then your environment[font="Arial Black"] isn't [/font]actually secure.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 18, 2012 at 3:22 pm
Lowell (5/18/2012)
I'll go all devils advocate on the SSIS guys and present a solution i put together for other posts that is all TSQL.Thsi requires xp_cmdshell to get the list of files.
Hot Damn! Lowell for President! 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
May 18, 2012 at 3:57 pm
Jeff Moden (5/18/2012)
Lowell (5/18/2012)
I'll go all devils advocate on the SSIS guys and present a solution i put together for other posts that is all TSQL.Thsi requires xp_cmdshell to get the list of files.
Hot Damn! Lowell for President! 🙂
BAH! Go back to Cobol you Luddites! SSIS is KING, SSIS is GOD, SSIS is... a PITA usually, but worth it.
Honestly, I'd personally usually do this via SSIS. The ForEach loop is simplistic to setup against a local package variable and a quick expression feeds it into flat file connection you use in a data flow. It's quite simple and is one of the first steps to doing more advanced mechanics in SSIS.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
May 18, 2012 at 6:30 pm
Evil Kraig F (5/18/2012)
Jeff Moden (5/18/2012)
Lowell (5/18/2012)
I'll go all devils advocate on the SSIS guys and present a solution i put together for other posts that is all TSQL.Thsi requires xp_cmdshell to get the list of files.
Hot Damn! Lowell for President! 🙂
BAH! Go back to Cobol you Luddites! SSIS is KING, SSIS is GOD, SSIS is... a PITA usually, but worth it.
Honestly, I'd personally usually do this via SSIS. The ForEach loop is simplistic to setup against a local package variable and a quick expression feeds it into flat file connection you use in a data flow. It's quite simple and is one of the first steps to doing more advanced mechanics in SSIS.
Honestly, I see no reason to go anywhere near SSIS. 😉 In fact, you don't need to go anywhere near xp_CmdShell for this, either. SSIS was written for people that don't know how to do this stuff in T-SQL. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
May 19, 2012 at 4:56 pm
Evil Kraig F (5/18/2012)
BAH! Go back to Cobol you Luddites!
P.S. Heh... that's gotta be your 6 talking because your mouth knows better. How do you like your porkchops? 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
June 12, 2012 at 5:37 pm
Jeff Moden (5/19/2012)
Evil Kraig F (5/18/2012)
BAH! Go back to Cobol you Luddites!P.S. Heh... that's gotta be your 6 talking because your mouth knows better. How do you like your porkchops? 😛
Well Done, by preference. And of course it's the 6. Cobol + Luddite = Contradiction, they were early adopters. 😉 I'd missed the response to this somehow and was dredging through older posts looking for something, sorry about the delay.
One of the reasons I prefer to do this via SSIS is it's more organized to me. Yes, 90% (99% if you include CLR) of what you can do with SSIS you can do via T-SQL. It's what you're more familiar with, mostly. Neither is more powerful than the other, but I do find you need to go through more hoops to do some of the tasks in T-SQL (on the fly dependent transformations), the same way you have to hoop jump in SSIS for others (Updating multiple rows in existance on a table in a single transaction).
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
June 13, 2012 at 1:29 pm
Agreed. It has a lot to do with personal preference. Since I'm a Luddite :-), I'm going to use Powershell for most of this... via xp_CmdShell. :-P:-P:-P
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 10 posts - 16 through 24 (of 24 total)
You must be logged in to reply to this topic. Login to reply