Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Wednesday, March 21, 2012

Need Assistance with Dynamic Properties and FTP Task

Hello,

I am building a packge where an FTP task needs to pull down a single
file
every day from a specific location. The location will only have the
one file.
The file name will be different every day. A sample of one of the file
names
looks like this:

CDNSC.CDNSC.SC00015.04012007

The file names will be different every day, as the last eight digits
represent the date of the data in the file. The source files will be
located
in a subdirectory called 'outgoing'.

My first approach to this has been to use a Dyamic Properties Task to
set
the SourceFileName of the FTP Task. I tried using a sting Global
Variable
expressed as *.*.*.* thinking a wildcard would work, but it didn't.

What approaches can I take so that the Source Filename in the FTP task
will
dymanically update each day to get the one file?

Thank you for your help!

cdun2On Apr 4, 5:35 am, "cdun2" <ChrisDunnM...@.gmail.comwrote:

Quote:

Originally Posted by

Hello,
>
I am building a packge where an FTP task needs to pull down a single
file
every day from a specific location. The location will only have the
one file.
The file name will be different every day. A sample of one of the file
names
looks like this:
>
CDNSC.CDNSC.SC00015.04012007
>
The file names will be different every day, as the last eight digits
represent the date of the data in the file. The source files will be
located
in a subdirectory called 'outgoing'.
>
My first approach to this has been to use a Dyamic Properties Task to
set
the SourceFileName of the FTP Task. I tried using a sting Global
Variable
expressed as *.*.*.* thinking a wildcard would work, but it didn't.
>
What approaches can I take so that the Source Filename in the FTP task
will
dymanically update each day to get the one file?
>
Thank you for your help!
>
cdun2


I wound up creating a script solution that was pretty straight
forward. I basically set up string variables using DATE to get the
data portion of the file name, concatenated that to the first part of
the filename, and set the whole string equal to the SourceFileName of
the FTP Task. It seems to work fine.

cdun2sql

Wednesday, March 7, 2012

Need a query to get path for last DB backup

Help needed. I need a query (or location of that data so I can write
one) to get the file path information for the last backup taken.
Many thanks.
> Help needed. I need a query (or location of that data so I can write
> one) to get the file path information for the last backup taken.
SELECT TOP 1 mf.physical_device_name
FROM msdb.dbo.backupset AS b
LEFT JOIN msdb.dbo.backupmediafamily AS mf ON b.media_set_id=mf.media_set_id
WHERE b.database_name='HeliosDB'
ORDER BY b.backup_start_date DESC
Tom
http://kbupdate.info/ | http://suppline.com/
|||>> Help needed. I need a query (or location of that data so I can write
> SELECT TOP 1 mf.physical_device_name
> FROM msdb.dbo.backupset AS b
> LEFT JOIN msdb.dbo.backupmediafamily AS mf ON
> b.media_set_id=mf.media_set_id
> WHERE b.database_name='HeliosDB'
> ORDER BY b.backup_start_date DESC
Oops, typo. Right version:
..
..
WHERE b.database_name=N'YourDatabaseName'
..
..
Tom
http://kbupdate.info/ | http://suppline.com/

Need a query to get path for last DB backup

Help needed. I need a query (or location of that data so I can write
one) to get the file path information for the last backup taken.
Many thanks.> Help needed. I need a query (or location of that data so I can write
> one) to get the file path information for the last backup taken.
SELECT TOP 1 mf.physical_device_name
FROM msdb.dbo.backupset AS b
LEFT JOIN msdb.dbo.backupmediafamily AS mf ON b.media_set_id=mf.media_set_id
WHERE b.database_name='HeliosDB'
ORDER BY b.backup_start_date DESC
--
Tom
http://kbupdate.info/ | http://suppline.com/|||>> Help needed. I need a query (or location of that data so I can write
>> one) to get the file path information for the last backup taken.
> SELECT TOP 1 mf.physical_device_name
> FROM msdb.dbo.backupset AS b
> LEFT JOIN msdb.dbo.backupmediafamily AS mf ON
> b.media_set_id=mf.media_set_id
> WHERE b.database_name='HeliosDB'
> ORDER BY b.backup_start_date DESC
Oops, typo. Right version:
.
.
WHERE b.database_name=N'YourDatabaseName'
.
.
--
Tom
http://kbupdate.info/ | http://suppline.com/

Need a query to get path for last DB backup

Help needed. I need a query (or location of that data so I can write
one) to get the file path information for the last backup taken.
Many thanks.> Help needed. I need a query (or location of that data so I can write
> one) to get the file path information for the last backup taken.
SELECT TOP 1 mf.physical_device_name
FROM msdb.dbo.backupset AS b
LEFT JOIN msdb.dbo.backupmediafamily AS mf ON b.media_set_id=mf.media_set_id
WHERE b.database_name='HeliosDB'
ORDER BY b.backup_start_date DESC
Tom
http://kbupdate.info/ | http://suppline.com/|||>> Help needed. I need a query (or location of that data so I can write
> SELECT TOP 1 mf.physical_device_name
> FROM msdb.dbo.backupset AS b
> LEFT JOIN msdb.dbo.backupmediafamily AS mf ON
> b.media_set_id=mf.media_set_id
> WHERE b.database_name='HeliosDB'
> ORDER BY b.backup_start_date DESC
Oops, typo. Right version:
.
.
WHERE b.database_name=N'YourDatabaseName'
.
.
Tom
http://kbupdate.info/ | http://suppline.com/