Showing posts with label trace. Show all posts
Showing posts with label trace. Show all posts

Sunday, February 19, 2012

Database Mail

I am just setting up database mail on a new server. It is up and
working correctly, however when I run a trace looking for things that
have a very long running duration I see this statement over and over.
I can't find any documentation on what it is, besides part of database
mail. Is this normal or did I miss configure something?
Durations of 30-40 seconds, 0 CPU time, 40-50 reads
exec sp_readrequest @.receive_timeout=600000
IT is configured to send emails to our corporate Exchange server.The procedure is issuing a WAITFOR(RECEIVE ...) waiting for a mail message
to be enqueued for sending. As such, the duration shows all the time the
procedure is stays in the WAITFOR(...) as execution time. This is not real
execution (CPU and I/O consumption), so you should just ignore it.
HTH,
~ Remus
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegroups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>|||Not sure what this has to do with the original question. This sp reads a
service broker queue to obtain mail to send. It suspends until a mail
message appears on the queue. The duration is the length of time the queue
has no messages to send so it could easily have a duration of an hour or
more. When it's waiting for a message to appear it doesn't use resources
other than an idle execution thread.
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
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegroups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>

Database Mail

I am just setting up database mail on a new server. It is up and
working correctly, however when I run a trace looking for things that
have a very long running duration I see this statement over and over.
I can't find any documentation on what it is, besides part of database
mail. Is this normal or did I miss configure something?
Durations of 30-40 seconds, 0 CPU time, 40-50 reads
exec sp_readrequest @.receive_timeout=600000
IT is configured to send emails to our corporate Exchange server.The procedure is issuing a WAITFOR(RECEIVE ...) waiting for a mail message
to be enqueued for sending. As such, the duration shows all the time the
procedure is stays in the WAITFOR(...) as execution time. This is not real
execution (CPU and I/O consumption), so you should just ignore it.
HTH,
~ Remus
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegroups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>|||Not sure what this has to do with the original question. This sp reads a
service broker queue to obtain mail to send. It suspends until a mail
message appears on the queue. The duration is the length of time the queue
has no messages to send so it could easily have a duration of an hour or
more. When it's waiting for a message to appear it doesn't use resources
other than an idle execution thread.
--
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
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegroups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>

Database Mail

I am just setting up database mail on a new server. It is up and
working correctly, however when I run a trace looking for things that
have a very long running duration I see this statement over and over.
I can't find any documentation on what it is, besides part of database
mail. Is this normal or did I miss configure something?
Durations of 30-40 seconds, 0 CPU time, 40-50 reads
exec sp_readrequest @.receive_timeout=600000
IT is configured to send emails to our corporate Exchange server.
The procedure is issuing a WAITFOR(RECEIVE ...) waiting for a mail message
to be enqueued for sending. As such, the duration shows all the time the
procedure is stays in the WAITFOR(...) as execution time. This is not real
execution (CPU and I/O consumption), so you should just ignore it.
HTH,
~ Remus
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegro ups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>
|||Not sure what this has to do with the original question. This sp reads a
service broker queue to obtain mail to send. It suspends until a mail
message appears on the queue. The duration is the length of time the queue
has no messages to send so it could easily have a duration of an hour or
more. When it's waiting for a message to appear it doesn't use resources
other than an idle execution thread.
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
<cploessel@.gmail.com> wrote in message
news:1165877369.144745.176210@.16g2000cwy.googlegro ups.com...
>I am just setting up database mail on a new server. It is up and
> working correctly, however when I run a trace looking for things that
> have a very long running duration I see this statement over and over.
> I can't find any documentation on what it is, besides part of database
> mail. Is this normal or did I miss configure something?
> Durations of 30-40 seconds, 0 CPU time, 40-50 reads
> exec sp_readrequest @.receive_timeout=600000
>
> IT is configured to send emails to our corporate Exchange server.
>

Tuesday, February 14, 2012

Database load testing

I am trying to use "TraceReplay" to replay a trace captured by the SQL Server Profiler. I can replay the tracefile using a normal windows application, but I need to get it working with a unit test so that I can simulate user load on the DB server.

This is the first erro i get :-

The assembly named 'pfclnt90' was loaded from 'file:///C:/Program Files/Microsoft SQL Server/90/Tools/Binn/pfclnt90.dll' using the LoadFrom context. The use of this context can result in unexpected behavior for serialization, casting and dependency resolution. In almost all cases, it is recommended that the LoadFrom context be avoided. This can be done by installing assemblies in the Global Assembly Cache or in the ApplicationBase directory and using Assembly.Load when explicitly loading assemblies.

Followed by

The assembly with display name 'pfclnt90' failed to load in the 'Anonymous' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'pfclnt90, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
File name: 'pfclnt90, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

=== Pre-bind state information ===
LOG: User = BTWEB\sxs24
LOG: DisplayName = pfclnt90, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
(Fully-specified)
LOG: Appbase =
file:///C:/Program Files/Microsoft Visual Studio 8/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\vstesthost.exe.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

I deploy the 'pfclnt90.dll' into the "out" directory but this does not seem to have fixed the problem. Also, If I add 'pfclnt90 to the GAC, the test fails source.InitializeAsReader("C:\\input.trc");

I have included my source below.

Code Snippet

publicvoid go()

{

TraceReplay replay = newTraceReplay();

TraceFile source = newTraceFile();

source.InitializeAsReader("C:\\input.trc");

replay.Source = source;

SqlConnectionInfo connection = newSqlConnectionInfo();

connection.ServerName = "server";

connection.UseIntegratedSecurity = true;

replay.Connection = connection;

replay.Start();

}

Moved this post to the SQL Server SMO / DMO forum (I hope this is the right forum for this question).