dbTalk Databases Forums  

Dynamic File Connection Manager in SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Dynamic File Connection Manager in SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
papashaw@gmail.com
 
Posts: n/a

Default Dynamic File Connection Manager in SSIS - 10-17-2006 , 05:28 PM






I would like to create a managed connection to a file that has a new
name each time the SSIS package processes. Is it possible to
dynamically control the name or create the managed connection based on
input parameters?


Reply With Quote
  #2  
Old   
Jay
 
Posts: n/a

Default Re: Dynamic File Connection Manager in SSIS - 10-18-2006 , 11:30 AM






Hey papashaw,

This is possible. It's actually very simple. I

1.f you look at the properties menu of you connection object you should
see a propery called Expressions. Click on that property.

2. You should see a menu with 2 colums, property and expression. Click
on the Property Row and selec connection string.

3. Then you can create an expression using variables that will be
evaluated at run time.

Here is an expression I use for outputing a file:

@[User::OutputFilePathName] + "_" +
(DT_STR,100,1252) DATEPART("MM",GETDATE()) +
(DT_STR,100,1252) DATEPART("DD",GETDATE()) +
(DT_STR,100,1252) DATEPART("YY",GETDATE()) + "_" +
(DT_STR,100,1252) DATEPART("Hh",GETDATE()) +
(DT_STR,100,1252) DATEPART("n",GETDATE()) + ".csv"

@[User::OutputFilePathName] is a variable I defined and the rest are
functions are use to append a date to the end of the file name.

Hope this helps.

Jay



papashaw (AT) gmail (DOT) com wrote:
Quote:
I would like to create a managed connection to a file that has a new
name each time the SSIS package processes. Is it possible to
dynamically control the name or create the managed connection based on
input parameters?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.