September 19, 2011 at 3:40 pm
I would like to use variables for connection strings, how can I generate the connection string for Oledb data source or destination?
Thanks
September 19, 2011 at 3:44 pm
Not sure what your question is. If you are looking for connection string format try http://www.connectionstrings.com/[/url]. If you are looking for something else try asking again to explain what you are trying to do.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
September 19, 2011 at 3:50 pm
when I create a connection in connection manager, I would like to use expression that uses the user variable as connection , but is there a way to generate the conneciton string somewhere in the GUI?
The reason I do this is because of this.
Thanks
September 19, 2011 at 3:56 pm
sqlfriends (9/19/2011)
when I create a connection in connection manager, I would like to use expression that uses the user variable as connection , but is there a way to generate the conneciton string somewhere in the GUI?Thanks
You would usually do this via a script component to set the variable equal to something. However, how do you plan to supply this user variable? Are you running xp_cmdshell with /SET on dtexec?
Supplying a user-decided value to an SSIS package is usually considered bad practice. Why are you doing this? I assume it's for some kind of flat file? Can you describe the process you're actually looking to undertake from the requirements perspective for us? Perhaps we can offer an alternative.
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
September 19, 2011 at 3:59 pm
Thanks, the reason I do this is because:
September 19, 2011 at 5:10 pm
You really should be creating an XML file per Connection. Yes - just one property per connection file. That way, if you have four connections that you regularly use in most packages, you use four configurations. But for the few packages that only use three, then you only reference three configuration files.
If you want to persist in using a variable to store the connection string instead of using configurations as I think most people do, then all you have to do is select your Connection Manager, go to the properties window (F4), select the Expressions property, click the ellipsis button (...), select the ConnectionString property, then use the variable name as the contents of the expression.
Todd McDermid - SQL Server MVP, MCTS (SQL 08 BI), MCSD.Net
My Blog - Dimension Merge SCD Component for SSIS - SSIS Community Tasks and Components
September 19, 2011 at 5:30 pm
Thanks, that's helpful
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply