Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Friday, March 9, 2012

Move or delete file after uploading via SQL2k DTS Package

I have scheduled a DTS package (once a day) to open and import data from a fixed field file which is sent to our server via FTP from a data service bureau. The problem is that yesterday's file ends up remaining in the same location, while the new file being delivered by the service bureau via FTP does not over-write yesterday's file -- the file is added with a new reference...

Example:
Yesterday's file name "CLM_CLI.789" -- Today's file name "CLM_CLI.6890". Is there any way for SQL2k to delete the file after it is uploaded, or can anyone offer advice about how to use some other method to move the older file to another folder each day??

Thanks!
GlenHow does the DTS package know the name of today's file name?

I think you should be able to use xp_cmdshell to move the file to another directory.

Terri

Monday, February 20, 2012

Move data from NDF file to MDF file

I have a database which has two data files, MDF and NDF.
The question is how can I move data in NDF into MDF file,
so I could delete the NDF file from the database.
Thanks
ALex
Hi,
I HAVE ALREADY REPLIED TO UR OLD POST.
EMPTY FILE:
Migrates all data from the specified file to other files . This option
allows the file to be dropped using the ALTER DATABASE statement.
THANKS
HARI
MCDBA
"Alex" <anonymous@.discussions.microsoft.com> wrote in message
news:19f9901c41d5a$bdfea1a0$a501280a@.phx.gbl...
> I have a database which has two data files, MDF and NDF.
> The question is how can I move data in NDF into MDF file,
> so I could delete the NDF file from the database.
> Thanks
> ALex

Move data from NDF file to MDF file

I have a database which has two data files, MDF and NDF.
The question is how can I move data in NDF into MDF file,
so I could delete the NDF file from the database.
Thanks
ALexHi,
I HAVE ALREADY REPLIED TO UR OLD POST.
EMPTY FILE:
Migrates all data from the specified file to other files . This option
allows the file to be dropped using the ALTER DATABASE statement.
THANKS
HARI
MCDBA
"Alex" <anonymous@.discussions.microsoft.com> wrote in message
news:19f9901c41d5a$bdfea1a0$a501280a@.phx
.gbl...
> I have a database which has two data files, MDF and NDF.
> The question is how can I move data in NDF into MDF file,
> so I could delete the NDF file from the database.
> Thanks
> ALex

Move data from NDF file to MDF file

I have a database which has two data files, MDF and NDF.
The question is how can I move data in NDF into MDF file,
so I could delete the NDF file from the database.
Thanks
ALexHi,
I HAVE ALREADY REPLIED TO UR OLD POST.
EMPTY FILE:
Migrates all data from the specified file to other files . This option
allows the file to be dropped using the ALTER DATABASE statement.
THANKS
HARI
MCDBA
"Alex" <anonymous@.discussions.microsoft.com> wrote in message
news:19f9901c41d5a$bdfea1a0$a501280a@.phx.gbl...
> I have a database which has two data files, MDF and NDF.
> The question is how can I move data in NDF into MDF file,
> so I could delete the NDF file from the database.
> Thanks
> ALex