Showing posts with label ssis. Show all posts
Showing posts with label ssis. Show all posts

Monday, March 26, 2012

Retry n times if the source file is not available in the specified location

I have a flat source file(.csv) which I am importing to SQL server. Now, if the source file is not available at the specified location, then the SSIS package should retry to execute n times( say 3 times) after certain time interval. The number of retries and the time interval should be configurable.

I have used Flat File connection manager for the source and OLEDB connection manager for the destination.

I am quite new to SSIS. Any help would be highly appreciated.

You can setup retries in SQL Server Agent which can run your SSIS job.. SSIS doesn't have that kind of logic built in.

With that said, this could be scripted in a Script Task though, using the File.Exists member.

Wednesday, March 21, 2012

Retrieving native progress events for a 2000 package from SSIS. Is it possible?

Dear all,

AFAIK I don't think so. Let me know if possible and how.

I'm talking about a SSIS package which owns a Execute DTS 2000 Package Task and from there it calls a DTS 2000. Programatically, from our VB .Net front-end app we're seeing only SSIS events (when validate and execute methods are called) and any kind of information is provided from RCW proxy (I suppose that internally it gonna be created in order to send messages between managed and unmanaged code).

When a task inside our DTS 2000 fails we're awaring by means a "generic message" such this:

Error: System.Runtime.InteropServices.COMException (0x80040427): Execution was canceled by user.at DTS.PackageClass.Execute()at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread()

Thanks a lot for your time and comments,

hi guys any idea?

Tuesday, March 20, 2012

Retrieving list of files from XML in SSIS

I have an XML file which is having path for source files.
<files>
<file>c:\windows\1.xml</file>
<file>c:\windows\2.xml</file>
<file>c:\windows\3.xml</file>
</files>
1. I need to retrive these list in SSIS.
2. Find out if any of the file is modified within last 24 hours
time ... only if it exists.
3. send a mail to a given e-mail address.
I want to run it as a daily job and the list of file can change every
day in XML file.
~ShijuI'd probably "cheat" and create a script task to do the job.
"shiju" <shiju.samuel@.gmail.com> wrote in message
news:1171689178.353072.302370@.l53g2000cwa.googlegroups.com...
>I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>|||Hi
"shiju" wrote:

> I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>
I am not a SSIS expert but I think you should be able to use a foreach loop
for the XML file and specify the XPATH query to retieve the nodelist into a
variable which you can then use in a script task to check it exists.
John

Retrieving list of files from XML in SSIS

I have an XML file which is having path for source files.
<files>
<file>c:\windows\1.xml</file>
<file>c:\windows\2.xml</file>
<file>c:\windows\3.xml</file>
</files>
1. I need to retrive these list in SSIS.
2. Find out if any of the file is modified within last 24 hours
time ... only if it exists.
3. send a mail to a given e-mail address.
I want to run it as a daily job and the list of file can change every
day in XML file.
~ShijuI'd probably "cheat" and create a script task to do the job.
"shiju" <shiju.samuel@.gmail.com> wrote in message
news:1171689178.353072.302370@.l53g2000cwa.googlegroups.com...
>I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>|||Hi
"shiju" wrote:
> I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>
I am not a SSIS expert but I think you should be able to use a foreach loop
for the XML file and specify the XPATH query to retieve the nodelist into a
variable which you can then use in a script task to check it exists.
John

Retrieving list of files from XML in SSIS

I have an XML file which is having path for source files.
<files>
<file>c:\windows\1.xml</file>
<file>c:\windows\2.xml</file>
<file>c:\windows\3.xml</file>
</files>
1. I need to retrive these list in SSIS.
2. Find out if any of the file is modified within last 24 hours
time ... only if it exists.
3. send a mail to a given e-mail address.
I want to run it as a daily job and the list of file can change every
day in XML file.
~Shiju
Hi
"shiju" wrote:

> I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>
I am not a SSIS expert but I think you should be able to use a foreach loop
for the XML file and specify the XPATH query to retieve the nodelist into a
variable which you can then use in a script task to check it exists.
John