Showing posts with label sends. Show all posts
Showing posts with label sends. Show all posts

Monday, March 26, 2012

How to determine OnPostExecute instance

I have a package that sends an email using the OnPostExecute Event Handler. My understanding is that the event is fired once for the package and once for any containers in the package.

I only want to send the email once. Currently I use a variable to count the number of times OnPostExecute is called and only send the email if it is the first time. This is probably not a good long term solution. How can I determine when OnPostExecute is being fired by the package instead of by a container?

Thanks in advance.

Check the SourceName variable. Put a dummy script task in the event handler and put a precedence contraint from the script task to the Send Mail task with the expression "SourceName == PackageName".
|||Which just goes to show that I'd like to see container specific events -- meaning child events don't propagate up.|||

Thanks, Jay. Your recommendation solved the problem.

Code Snippet

If (Dts.Variables("PackageName").Value.ToString = Dts.Variables("SourceName").Value.ToString) Then

'Do something

End If

Phil, I agree. That would be nice.

|||Okay, I just want to make sure I was clear that I wasn't recommending that any code go into the Script Task. As I described it, the Script Task is simply there to allow you to set a precedence between the Script Task and the Send Mail Task. You can then put an expression on the contraint (@.PackageName == @.SourceName) and require that the expression evaluate to true for the dependent task to execute. Then your mail would only be sent if the SourceName of the event was the same as the PackageName. Right-click on the green line and click Edit to see these options.

Friday, March 23, 2012

how to determine how many users web sql will support?

Hello,
We are writting a small pc monitor app that sends pc statistics (hd free,
mem free etc) to a hosted sql server every hour. The pc's also do a select
query to see if there are any messages for it every 30 seconds. We may have
up to 1000 computers doing this. How do I make sure our hosted SQL server
can handle this performance wise?
My other concern is that all 1000 will hit the sql at nearly the same time
cause extreme delays. Any suggestions?
Thanks!
Matt
> up to 1000 computers doing this. How do I make sure our hosted SQL server
> can handle this performance wise?
There is no magic formula, it will depend on a number of things, such as
amount of data being transferred, bandwidth, hardware, table
structure/indexes, concurrency of inserts, concurrency of inserts/updates
vs. selects, etc. I suggest you look into some load testing software, e.g.
there is a list here for web-based apps http://www.aspfaq.com/2139
For the database specifically, you can use profiler, Database Hammer from
the SQL Server 2000 Resource Kit, SQL Load Simulator 2.0 (SQLLS2) that comes
with the Back Office Resource Kit 4.5, or some of these:
http://www.mercury.com/us/products/performance-center/
http://www.benchmarkfactory.com/comm...tent.asp?PID=1
http://www-306.ibm.com/software/awdt...nce/index.html
http://www.sqlpower.com/products.html

how to determine how many users web sql will support?

Hello,
We are writting a small pc monitor app that sends pc statistics (hd free,
mem free etc) to a hosted sql server every hour. The pc's also do a select
query to see if there are any messages for it every 30 seconds. We may have
up to 1000 computers doing this. How do I make sure our hosted SQL server
can handle this performance wise?
My other concern is that all 1000 will hit the sql at nearly the same time
cause extreme delays. Any suggestions?
Thanks!
Matt> up to 1000 computers doing this. How do I make sure our hosted SQL server
> can handle this performance wise?
There is no magic formula, it will depend on a number of things, such as
amount of data being transferred, bandwidth, hardware, table
structure/indexes, concurrency of inserts, concurrency of inserts/updates
vs. selects, etc. I suggest you look into some load testing software, e.g.
there is a list here for web-based apps http://www.aspfaq.com/2139
For the database specifically, you can use profiler, Database Hammer from
the SQL Server 2000 Resource Kit, SQL Load Simulator 2.0 (SQLLS2) that comes
with the Back Office Resource Kit 4.5, or some of these:
http://www.mercury.com/us/products/performance-center/
http://www.benchmarkfactory.com/com...ntent.asp?PID=1
http://www-306.ibm.com/software/awd...ance/index.html
http://www.sqlpower.com/products.htmlsql

how to determine how many users web sql will support?

Hello,
We are writting a small pc monitor app that sends pc statistics (hd free,
mem free etc) to a hosted sql server every hour. The pc's also do a select
query to see if there are any messages for it every 30 seconds. We may have
up to 1000 computers doing this. How do I make sure our hosted SQL server
can handle this performance wise?
My other concern is that all 1000 will hit the sql at nearly the same time
cause extreme delays. Any suggestions?
Thanks!
Matt> up to 1000 computers doing this. How do I make sure our hosted SQL server
> can handle this performance wise?
There is no magic formula, it will depend on a number of things, such as
amount of data being transferred, bandwidth, hardware, table
structure/indexes, concurrency of inserts, concurrency of inserts/updates
vs. selects, etc. I suggest you look into some load testing software, e.g.
there is a list here for web-based apps http://www.aspfaq.com/2139
For the database specifically, you can use profiler, Database Hammer from
the SQL Server 2000 Resource Kit, SQL Load Simulator 2.0 (SQLLS2) that comes
with the Back Office Resource Kit 4.5, or some of these:
http://www.mercury.com/us/products/performance-center/
http://www.benchmarkfactory.com/common/content.asp?PID=1
http://www-306.ibm.com/software/awdtools/tester/performance/index.html
http://www.sqlpower.com/products.html