Showing posts with label target. Show all posts
Showing posts with label target. Show all posts

Monday, March 19, 2012

how to target the file name with date variable

My client will upload a file to a FTP folder regularly, but the time patten is unknown, only thing i know is he'll use today's date as the file name. for example, he uploaded a file 'wk070705_id.txt' today, but i don't know when the next file will be uploaded. so how can i write a package like, eveytime when he upload a new file (for example if he upload a file 'wk070708_id.txt'), i can import the data into my table? i am a very newbie of SSIS, it would be perfect if i can get a full script for this. thanks in advance with appreciation!

ps: the date in file name is yymmdd

One way i can think of is to make use of gateway service to poll that directory and as soon as file arrives, parse the file name and load the corresponding package.|||

If you have normal file system access to the folder then you can use this task -http://www.sqlis.com/23.aspx

If you only have FTP access then polling is the way to go. You can request the file, but nee dto make the parameter dynamic based on todays date, for which you can use a property expression. Have a look in Books Online for the references to property expressions in SSIS they are what make it flexible and dynamic.

Some example date expressions - http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionDateFunctions.html

Friday, March 9, 2012

How to suft through MSDB folders?

Hi everyone,

Primary platform is Framework 2.0.

My target now is to know programatically how many folder exists under MSDB folder as well as its names.

How to accomplish this?

Thanks in advance and regards,

this link might help : http://msdn2.microsoft.com/en-us/sql/ms403343.aspx#exists

Frank

|||Thanks a lot for that. I haven't any issue at all.

Sunday, February 19, 2012

how to stop conversing status?

Once my target service start to process, how can I stop the rest from running?

right now I'm looping sys.conversation_endpoints and run "END CONVERSATION @.dhValue"

Is there a simpler way to stop processing a service without interfering with other services?

I don't understand what you mean by "stopping the rest from running". If you want a way to stop an activated stored procedure from running, you could either kill the spid it is running on, or disable the queue which will cause it to abort.

Rushi

|||

yes, that' s it.

thanks