Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Thursday, March 29, 2012

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.

|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.

|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

sql

Wednesday, March 21, 2012

From SQL SERVER TO MSDE

i have an access application based on sql server
now i was told that for small offices msde is enough and chiper
if it is so can somebody tell me
how to convert the database from sql to msde?
and it cost a lot of code working?
thanks ahead
sam
hi Sam,
Sam wrote:
> i have an access application based on sql server
> now i was told that for small offices msde is enough and chiper
> if it is so can somebody tell me
> how to convert the database from sql to msde?
> and it cost a lot of code working?
MSDE has some constraints built in it, but it is the very same engine as SQL
Server is... so you do not have to worry about "converting" SQL Server
databases into MSDE databases as they are the same...
MSDE has a limit on the file size it's databases data file(s) can reach,
that's to say 2gb per database data files...
other limits are about missing feature, like Full Text indexes, olap
features, partial replication, and so on... but as long as you "stay" into
the architectural limits and your applications do not cover missing features
you will be ok.. further info at
http://www.microsoft.com/sql/msde/pr...o/default.mspx
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Monday, March 12, 2012

Friendly DataSet Table Names

I have a stored procedure that returns a set of tables based on data in a table for a company. These tables are being used to create drop down lists for criteria selection for the client. We have a Javascript based control that will make use of these based on the control name. So... ideally, I would like the stored procedure to return tables named "EmployeeID", "ResourceName", so that I can accurately name the controls when they are being created. The data that is returned is not static, so, for example, client 1 may see the EmployeeID drop down, while client 2 may not.

I searched and didnt see anyone that was able to accomplish this in this way, but wanted to post something here before I moved forward in a different direction.

I am thinking that I will likely return an extra table with the field names and their corresponding tables (i.e. "EmployeeID"/"Table0", "ResourceName"/"Table1", etc...)

Thanks,

Josh

Have you tried giving alias to the returned tables (result sets) as well as columns? For example:

create proc sp_RtnAlias
as
select EmployeeID EID from Employees as EmployeeID
go

Then you can access the result set using EmployeeID.EID

Hope I haven't misundstood you.

|||

Here's what I do... and I haven't decided if it is cheesey or not...

declare

@.tbltable(Ordinalintidentity(1,1),tableName varchar(50))

/* Insert a row into the temp table for each table returned by the query*/

INSERTINTO @.tblVALUES('Prospects')

INSERTINTO @.tblVALUES('AccountExecs')

INSERTINTO @.tblVALUES('Regions')

INSERTINTO @.tblVALUES('Products')

INSERTINTO @.tblVALUES('ProspectDescriptors')

INSERTINTO @.tblVALUES('Steps')

INSERTINTO @.tblVALUES('ProspectTypes')

INSERTINTO @.tblVALUES('VendorTypes')

INSERTINTO @.tblVALUES('Clients')

-- Index table

SELECT Ordinal, TableName

FROM @.Tbl

ORDERBY Ordinal

The rest of the sproc is a series of selects in the same order as they appear in the index table. I have method in the program that loops through the table objects and assigns each one the appropriate name from the index table. Note that the index table does not contain a reference to itself and can be disposed of when the other table names have been assigned...

Friday, February 24, 2012

Framework Equivalent in MSSQL?

Introduction:
I want to put database based asp.net web site on a windows server.
For the asp.net files there is a free framework that will run the asp.net
files on the server.
The Question:
Is there any free PROGRAM that can run the .mdf and .ldf files on the
server?
And what is the name of that program?
Bishoy George
bishoy@.bishoy.com"Bishoy George" <bishoy@.bishoy.com> wrote in message
news:%23OPKnGAVGHA.5900@.tk2msftngp13.phx.gbl...
> Introduction:
> I want to put database based asp.net web site on a windows server.
> For the asp.net files there is a free framework that will run the asp.net
> files on the server.
> The Question:
> Is there any free PROGRAM that can run the .mdf and .ldf files on the
> server?
> And what is the name of that program?
SQL Server 2005 Express Edtion.
David|||it's name is MSDE (now SQL server express) if you're not planning on
more than a few concurrent connections. Otherwise you have to pay - or
SQL server would be free.|||Are you saying that there's a limit to the number of concurrent users in MSD
E
and SQL Server 2005 Express?
ML
http://milambda.blogspot.com/|||"ML" <ML@.discussions.microsoft.com> wrote in message
news:B8808488-053B-4525-9546-7C67A32A6F22@.microsoft.com...
> Are you saying that there's a limit to the number of concurrent users in
> MSDE
> and SQL Server 2005 Express?
>
There is no user limit in either product, but both products have baked-in
performance limitations.
In MSDE there is a workload throttle that slows down performance beyond 5
concurrent workloads. In SQL Server 2005 Express Edition you can only use 1
CPU and 1 GB of memory.
David|||There's no such limit in either of them. MSDE has a performance throttling f
unctionality which added
a wait for each I/O when you had more than 8 concurrently executing queries.
No such in Express. But
there are limits on db size, number of processors and memory, of course.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ML" <ML@.discussions.microsoft.com> wrote in message
news:B8808488-053B-4525-9546-7C67A32A6F22@.microsoft.com...
> Are you saying that there's a limit to the number of concurrent users in M
SDE
> and SQL Server 2005 Express?
>
> ML
> --
> http://milambda.blogspot.com/|||Yes. Of course there's a limit. Otherwise everyone could just run sql
servers for free. I believe that they've slackened it a bit from the 5
for MSDE, but it's still limited. Last thing I read on it said that as
connections go above 5 MSDE massively throttles the performance of the
SQL server, so it's not an error thrown kind of limit, but your SQL
server becomes rubbish.|||The workload governor is said to be removed in the SQL 2005 Ecpress version.
Not trying to argue, just want clear facts. :)
ML
http://milambda.blogspot.com/|||Ecpress = Express
(in this particular case ;)|||> Yes. Of course there's a limit. Otherwise everyone could just run sql
> servers for free. I believe that they've slackened it a bit from the 5
> for MSDE, but it's still limited.
There is no longer any limitation that has aything to do with the number of
users, number of connections, or number of concurrent queries. The limit is
that Express will only be able to use 1 GB of memory, a single CPU, and the
database size is limited to 4GB. So, if one or more of those criteria do
not meet the requirements of your app, look elsewhere. I imagine there are
pleny of apps out there that could have 1000 concurrent users on Express and
work fine. On the flip side, if I tried real hard, I could design an
application that would completely suck wind with more than 1 concurrent
user, even if deployed to Enterprise edition with 32 GB of RAM. So the
question is more about design and requirements than any artificial
limitation.

> connections go above 5 MSDE massively throttles the performance of the
> SQL server,
[It's actually 8, not 5/]

> so it's not an error thrown kind of limit, but your SQL
> server becomes rubbish.
Have you actually experienced performance throttling THAT BAD on MSDE? Or
is it just hearsay? Granted, I would not personally deploy MSDE or Express
to a production application (because I want to sleep at night), but I have
not been able to reproduce this "rubbish" in some pretty serious testing.
A

Framework Equivalent in MSSQL?

Introduction:
I want to put database based asp.net web site on a windows server.
For the asp.net files there is a free framework that will run the asp.net
files on the server.
The Question:
Is there any free PROGRAM that can run the .mdf and .ldf files on the
server?
And what is the name of that program?
Bishoy George
bishoy@.bishoy.com
SQL Server Express?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bishoy George" <bishoy@.bishoy.com> wrote in message
news:Od2l9CAVGHA.2444@.TK2MSFTNGP14.phx.gbl...
> Introduction:
> I want to put database based asp.net web site on a windows server.
> For the asp.net files there is a free framework that will run the asp.net
> files on the server.
> The Question:
> Is there any free PROGRAM that can run the .mdf and .ldf files on the
> server?
> And what is the name of that program?
> Bishoy George
> bishoy@.bishoy.com
>

Sunday, February 19, 2012

framework 1.0 and 1.1

If my enviroment is based on .net framework 1.0, can i install vs 2003 with
framework 1.1, can i development reports within this mixed installation?Hi
.NET 1.1 is compatible with 1.0. Your 1.0 applications will run on the 1.1
framework if it is installed. No requirement for you to do anything.
There is one exception, if you specifically state the system DLL versions in
your code.
BUT, 1.1 can not run on the 1.0 framework. Once you go 1.1, the lowest
common denominator on your clients and servers must be 1.1
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"THuang" <THuang@.discussions.microsoft.com> wrote in message
news:B5022BEB-0EDF-46F1-93D8-099171F7BCBD@.microsoft.com...
> If my enviroment is based on .net framework 1.0, can i install vs 2003
with
> framework 1.1, can i development reports within this mixed installation?