![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Using SQL Server 2000 DTS package runs a simple query from a SQL Server table in the 'Transform data task' object and then writes results to a text file defined in tab 'Destination' under 'Table name:'. Each time the DTS package is run the text file 'filename.txt' is appended with new data so the text file grows larger and larger each time it is run. The DTS package is run nightly. 1. I need the file to be overwritten each time the file is run 2. If possible an archive of the file could be saved in a folder for 1 day. I am not a VB programmer so any VB solutions need to be simple and well explained. Is it possible to implement a solution in DTS without VB? Thanks, |
#3
| |||
| |||
|
|
How have you created the package? What options did you choose. By default a text file would overwrite. You could easily before the DataPump happens copy the last file away somewhere. DTS will generate a new one. Allan "khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message news:khan_salim (AT) discussions (DOT) microsoft.com: Using SQL Server 2000 DTS package runs a simple query from a SQL Server table in the 'Transform data task' object and then writes results to a text file defined in tab 'Destination' under 'Table name:'. Each time the DTS package is run the text file 'filename.txt' is appended with new data so the text file grows larger and larger each time it is run. The DTS package is run nightly. 1. I need the file to be overwritten each time the file is run 2. If possible an archive of the file could be saved in a folder for 1 day. I am not a VB programmer so any VB solutions need to be simple and well explained. Is it possible to implement a solution in DTS without VB? Thanks, |
#4
| |||
| |||
|
|
I created the package several months ago so I am not aware of any options I chose to append to the text file rather then overwrite it. I would not have chosen such an option if I were aware of it. As for copying the file away to another location I am not aware of how to do this in a DTS package. Any ideas? Is there a way of changing the DTS package so that text files are overwritten? I have looked and I have been unable to find such an option within the DTS package properties. "Allan Mitchell" wrote: How have you created the package? What options did you choose. By default a text file would overwrite. You could easily before the DataPump happens copy the last file away somewhere. DTS will generate a new one. Allan "khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message news:khan_salim (AT) discussions (DOT) microsoft.com: Using SQL Server 2000 DTS package runs a simple query from a SQL Server table in the 'Transform data task' object and then writes results to a text file defined in tab 'Destination' under 'Table name:'. Each time the DTS package is run the text file 'filename.txt' is appended with new data so the text file grows larger and larger each time it is run. The DTS package is run nightly. 1. I need the file to be overwritten each time the file is run 2. If possible an archive of the file could be saved in a folder for 1 day. I am not a VB programmer so any VB solutions need to be simple and well explained. Is it possible to implement a solution in DTS without VB? Thanks, |
#5
| |||
| |||
|
|
The only thing I can think of is that this is being set DTSPump.DataPumpTransformWriteFile.AppendIfFileExi sts "khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote in message news:khansalim (AT) discussions (DOT) microsoft.com: I created the package several months ago so I am not aware of any options I chose to append to the text file rather then overwrite it. I would not have chosen such an option if I were aware of it. As for copying the file away to another location I am not aware of how to do this in a DTS package. Any ideas? Is there a way of changing the DTS package so that text files are overwritten? I have looked and I have been unable to find such an option within the DTS package properties. "Allan Mitchell" wrote: How have you created the package? What options did you choose. By default a text file would overwrite. You could easily before the DataPump happens copy the last file away somewhere. DTS will generate a new one. Allan "khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message news:khan_salim (AT) discussions (DOT) microsoft.com: Using SQL Server 2000 DTS package runs a simple query from a SQL Server table in the 'Transform data task' object and then writes results to a text file defined in tab 'Destination' under 'Table name:'. Each time the DTS package is run the text file 'filename.txt' is appended with new data so the text file grows larger and larger each time it is run. The DTS package is run nightly. 1. I need the file to be overwritten each time the file is run 2. If possible an archive of the file could be saved in a folder for 1 day. I am not a VB programmer so any VB solutions need to be simple and well explained. Is it possible to implement a solution in DTS without VB? Thanks, |
#6
| |||
| |||
|
|
Where do I check in the DTS package to see if this is being set? I've checked 'disconnect edit' and I could not find any reference to this. "Allan Mitchell" wrote: The only thing I can think of is that this is being set DTSPump.DataPumpTransformWriteFile.AppendIfFileExi sts "khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote in message news:khansalim (AT) discussions (DOT) microsoft.com: I created the package several months ago so I am not aware of any options I chose to append to the text file rather then overwrite it. I would not have chosen such an option if I were aware of it. As for copying the file away to another location I am not aware of how to do this in a DTS package. Any ideas? Is there a way of changing the DTS package so that text files are overwritten? I have looked and I have been unable to find such an option within the DTS package properties. "Allan Mitchell" wrote: How have you created the package? What options did you choose. By default a text file would overwrite. You could easily before the DataPump happens copy the last file away somewhere. DTS will generate a new one. Allan "khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message news:khan_salim (AT) discussions (DOT) microsoft.com: Using SQL Server 2000 DTS package runs a simple query from a SQL Server table in the 'Transform data task' object and then writes results to a text file defined in tab 'Destination' under 'Table name:'. Each time the DTS package is run the text file 'filename.txt' is appended with new data so the text file grows larger and larger each time it is run. The DTS package is run nightly. 1. I need the file to be overwritten each time the file is run 2. If possible an archive of the file could be saved in a folder for 1 day. I am not a VB programmer so any VB solutions need to be simple and well explained. Is it possible to implement a solution in DTS without VB? Thanks, |
![]() |
| Thread Tools | |
| Display Modes | |
| |