dbTalk Databases Forums  

Dynamic naming of destintion files

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


Discuss Dynamic naming of destintion files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
feil
 
Posts: n/a

Default Dynamic naming of destintion files - 12-07-2005 , 08:30 PM






I have a DTS package that defines a Dynamic Properties Task, which in turn
has 2 destination properties each of which define a data source generated by
a SQL Query in an attempt to generate dynamic file names for 2 flat files
based on the date/time.

When I have the package open and execute the Dynamic Properties Task
individually, followed by executing the entire package the output files are
named as desired. When the package is executed by itself, and not preceeded
by executing the dynamic Properties Task, one of the data files in not named
correctly. It appears that both destination properties in the Dynamic
Properties Task are not being executed.

The Dynamic Properties Task "points" to a MS OLE DB provider based on a
workflow success. the OLD DB provider in turn "feeds" two transform data
tasks each of which results in a text file(destination) named by the Dynamic
Properties Task. this is where one of the files in not named properly.

How do I get both quries contained in the DP task to execute when the entire
package is executed?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Dynamic naming of destintion files - 12-08-2005 , 02:59 AM






feil wrote:
Quote:
I have a DTS package that defines a Dynamic Properties Task, which in turn
has 2 destination properties each of which define a data source generated by
a SQL Query in an attempt to generate dynamic file names for 2 flat files
based on the date/time.

When I have the package open and execute the Dynamic Properties Task
individually, followed by executing the entire package the output files are
named as desired. When the package is executed by itself, and not preceeded
by executing the dynamic Properties Task, one of the data files in not named
correctly. It appears that both destination properties in the Dynamic
Properties Task are not being executed.

The Dynamic Properties Task "points" to a MS OLE DB provider based on a
workflow success. the OLD DB provider in turn "feeds" two transform data
tasks each of which results in a text file(destination) named by the Dynamic
Properties Task. this is where one of the files in not named properly.

How do I get both quries contained in the DP task to execute when the entire
package is executed?
Is the file connection being used elsewhere? You can have the situation
when task A opens the connection, task B sets the filename, but this is
does not take effect since the connection is open. Try setting close
connection on completion for any tasks before the Dynamic Properties
task, to ensure the connection is closed and ready to read the new
information when re-opened.

--
Darren
http://www.sqldts.com
http://www.sqlis.com


Reply With Quote
  #3  
Old   
feil
 
Posts: n/a

Default Re: Dynamic naming of destintion files - 12-08-2005 , 07:40 PM



Entire package "written" with the DTS Designer, no active x, how do you close
the connection after the first query is executed in the DP object?

"Darren Green" wrote:

Quote:
feil wrote:
I have a DTS package that defines a Dynamic Properties Task, which in turn
has 2 destination properties each of which define a data source generated by
a SQL Query in an attempt to generate dynamic file names for 2 flat files
based on the date/time.

When I have the package open and execute the Dynamic Properties Task
individually, followed by executing the entire package the output files are
named as desired. When the package is executed by itself, and not preceeded
by executing the dynamic Properties Task, one of the data files in not named
correctly. It appears that both destination properties in the Dynamic
Properties Task are not being executed.

The Dynamic Properties Task "points" to a MS OLE DB provider based on a
workflow success. the OLD DB provider in turn "feeds" two transform data
tasks each of which results in a text file(destination) named by the Dynamic
Properties Task. this is where one of the files in not named properly.

How do I get both quries contained in the DP task to execute when the entire
package is executed?

Is the file connection being used elsewhere? You can have the situation
when task A opens the connection, task B sets the filename, but this is
does not take effect since the connection is open. Try setting close
connection on completion for any tasks before the Dynamic Properties
task, to ensure the connection is closed and ready to read the new
information when re-opened.

--
Darren
http://www.sqldts.com
http://www.sqlis.com


Reply With Quote
  #4  
Old   
urchin
 
Posts: n/a

Default Re: Dynamic naming of destintion files - 12-09-2005 , 07:27 AM



"...how do you close the connection..."

How do you (via script) close *any* type of connection (flatfile or
access or whatever)?

Currently we've several packages that write to seperate files then we
have to execute command task that "type"s the files redirecting the
output to the final destination.

There's a checkbox on the workflow properties that I think says "Close
when complete" or smt similiar but I'ld like to find the vbscript
syntax for the equivalent.


Reply With Quote
  #5  
Old   
mattb
 
Posts: n/a

Default RE: Dynamic naming of destintion files - 12-09-2005 , 02:29 PM



Use active x to generate Global variable.(this will change your gv value
updated on each run) upon success run DPT. upon sucess run next steps.
This will insure timely and accurate runs.

"feil" wrote:

Quote:
I have a DTS package that defines a Dynamic Properties Task, which in turn
has 2 destination properties each of which define a data source generated by
a SQL Query in an attempt to generate dynamic file names for 2 flat files
based on the date/time.

When I have the package open and execute the Dynamic Properties Task
individually, followed by executing the entire package the output files are
named as desired. When the package is executed by itself, and not preceeded
by executing the dynamic Properties Task, one of the data files in not named
correctly. It appears that both destination properties in the Dynamic
Properties Task are not being executed.

The Dynamic Properties Task "points" to a MS OLE DB provider based on a
workflow success. the OLD DB provider in turn "feeds" two transform data
tasks each of which results in a text file(destination) named by the Dynamic
Properties Task. this is where one of the files in not named properly.

How do I get both quries contained in the DP task to execute when the entire
package is executed?

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.