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


DTS package and a single global parameter


DTS package and a single global parameter

Author
Message
mountcrumpit
mountcrumpit
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 89
I've got a SQL2000 DTS that will restore data from a backup (think TodayDatabase and RestoreDatabase).

In that package are 15+ specific Transform Data Tasks with the form:
select * from OneoftheTables where clientid='070066'.

Its incredibly time-consuming and error-prone to manually update each TDT to the desired Clientid.

So, enter the novel idea of parameters:




Then I updated each TDT to:
select * from OneoftheTables where clientid=?




If I click preview for the TDT I get the inimitable error: No value given for one or more required parameters.
A little research encouraged me that this is just a Microslop bug. -- "run the task and it'll be fine..."

Well, not so fast -- yes, the package appears to run fine:




But the results not as desired: Checking the destination DB shows nothing was "restore"/copied:




I tried checking/unchecking Explicit Global Variables (top most capture). That made no difference.

Can anyone shed some light on where the breakdown is on this parameter usage?

PS. Yes, I do realize a script scenario would be much more friendly than maintaining that snakepit of TDTs.
Though, even once I simplify that mess I'll probably still have the same situation. I really am curious and frustrated as to why my efforts at parameterization are failing...

thanks for any help folks!
mountcrumpit
mountcrumpit
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 89
And the DumbAxx award of the week goes to.....Me! the global parameter was typed as a string. Correct. But the delimiters on that string, apparently, are not required.
Thanks everyone, you've been very helpful.
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