Showing posts with label occasionally. Show all posts
Showing posts with label occasionally. Show all posts

Monday, March 26, 2012

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNairScott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:
> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNair
Scott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:

> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNairScott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:

> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Friday, March 23, 2012

Merge Agent

Hello,
I have a merge replication scenario where occasionally the
subscription server will go offline for a period of time.
It seems that when this is the case the merge agent stops
and when the subscription server becomes available I have
to manually restart the merge agent for syncronization to
continue. Does this seem right or should the merge agent
continue to run even while the subscription server is
unavailable so that when the subscription server becomes
available syncronization will continue automatically?
Any help would be appreciated!
Thanks in advance.
this behavior is by design. To fix it you should schedule the merge agent to
run every 10 minutes. This way it will continually retry until it succeeds.
You might also want to recreate the subscription as a pull subscription.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Jerry G." <anonymous@.discussions.microsoft.com> wrote in message
news:1c4e701c45257$6cd0c470$a101280a@.phx.gbl...
> Hello,
> I have a merge replication scenario where occasionally the
> subscription server will go offline for a period of time.
> It seems that when this is the case the merge agent stops
> and when the subscription server becomes available I have
> to manually restart the merge agent for syncronization to
> continue. Does this seem right or should the merge agent
> continue to run even while the subscription server is
> unavailable so that when the subscription server becomes
> available syncronization will continue automatically?
> Any help would be appreciated!
> Thanks in advance.

Wednesday, March 21, 2012

MemToLeave area! How to monitor?

Gurus,
Occasionally I get the error of "WARNING: Failed to reserve contiguous
memory of Size= 65536."
What is the unit for this size, is it bytes or KB? Additionally,
I have set up 511 MB for MemToLeave area by adding -g384 for Sql2k SP3a on
AWE enabled system. I have total of 16 GB of RAM, of which 14 GB is set up
maximum for Sql server.
If I look at Perfmon counter of Process->Private bytes for sql server
process it gives me 224 MB.
If I look at sqlserver.exe process on task manager it gives me 215MB.
If I look at DBCC memorystatus, OS in use, it gives me 12 MB.
I would like to know, How can I calculate exactly how much memory is being
assigned and how much in use from MemToLeave area by looking at above
mentioned counters or any other perfmon or dbcc counters?
I really appreciate any input on this matter.Please, take a look at "Inside SQL Server 2000's Memory Management Facilities" by Ken Henderson:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_01262004.asp
"... None of the tools you typically use to inspect application memory use (Task Manager, Perfmon/Sysmon, etc.) show the amount of AWE memory used by individual processes. There's no indication of the amount of AWE memory used by each process, nor is this memory included in the working set size reported for a given process ..."
Thanks,
-Ivan
--Original Message--
From: james
Posted At: Tuesday, February 28, 2006 6:52 AM
Posted To: microsoft.public.sqlserver.server
Conversation: MemToLeave area! How to monitor?
Subject: MemToLeave area! How to monitor?
Gurus,
Occasionally I get the error of "WARNING: Failed to reserve contiguous memory of Size= 65536."
What is the unit for this size, is it bytes or KB? Additionally,
I have set up 511 MB for MemToLeave area by adding -g384 for Sql2k SP3a on AWE enabled system. I have total of 16 GB of RAM, of which 14 GB is set up maximum for Sql server.
If I look at Perfmon counter of Process->Private bytes for sql server process it gives me 224 MB.
If I look at sqlserver.exe process on task manager it gives me 215MB.
If I look at DBCC memorystatus, OS in use, it gives me 12 MB.
I would like to know, How can I calculate exactly how much memory is being assigned and how much in use from MemToLeave area by looking at above mentioned counters or any other perfmon or dbcc counters?
I really appreciate any input on this matter.|||Thanks Ivan. I had already checked that article and also few other google
search but didn't get the answer.
<ivanpe@.online.microsoft.com> wrote in message
news:OenNh9IPGHA.3840@.TK2MSFTNGP14.phx.gbl...
> Please, take a look at "Inside SQL Server 2000's Memory Management
> Facilities" by Ken Henderson:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_01262004.asp
> "... None of the tools you typically use to inspect application memory use
> (Task Manager, Perfmon/Sysmon, etc.) show the amount of AWE memory used by
> individual processes. There's no indication of the amount of AWE memory
> used by each process, nor is this memory included in the working set size
> reported for a given process ..."
> Thanks,
> -Ivan
> --Original Message--
> From: james
> Posted At: Tuesday, February 28, 2006 6:52 AM
> Posted To: microsoft.public.sqlserver.server
> Conversation: MemToLeave area! How to monitor?
> Subject: MemToLeave area! How to monitor?
>
> Gurus,
> Occasionally I get the error of "WARNING: Failed to reserve contiguous
> memory of Size= 65536."
> What is the unit for this size, is it bytes or KB? Additionally,
> I have set up 511 MB for MemToLeave area by adding -g384 for Sql2k SP3a on
> AWE enabled system. I have total of 16 GB of RAM, of which 14 GB is set up
> maximum for Sql server.
> If I look at Perfmon counter of Process->Private bytes for sql server
> process it gives me 224 MB.
> If I look at sqlserver.exe process on task manager it gives me 215MB.
> If I look at DBCC memorystatus, OS in use, it gives me 12 MB.
> I would like to know, How can I calculate exactly how much memory is being
> assigned and how much in use from MemToLeave area by looking at above
> mentioned counters or any other perfmon or dbcc counters?
> I really appreciate any input on this matter.|||James,
The unit of measure in the message you list is bytes, not KB. Basically,
the memory mgr is failing to reserve 64KB of memory.
The numbers you report from the various monitoring tools don't sound
surprising -- they all measure different things. For example,
Process:Private Bytes is a measure of _committed_ virtual memory, not
reserved. -G controls the region set aside for MTL, not committed or
reserved -- free. That virtual memory is reserved and committed as needed
by the various memory consumers running inside the SQL Server process.
Also, on SS2K, AWE can't be used for anything except caching data and index
pages. Regular MTL allocations never come from AWE.
Keep in mind that the MTL region is really not a region at all but just
refers to the memory left over once the BPool takes what it needs. It's the
unused virtual memory in the process's virtual address space. -G can grow
or shrink this area, but it basically only amounts to unused memory within
the process.
Allocations by external consumers (COM objects, xprocs (usually), OLEDB
providers, etc.) come from MTL. Also, allocations by the server itself that
are >8KB are serviced from MTL rather than the BPool. This just means that,
at some level, they call VirtualAlloc to allocate VM directly from Windows
rather than using pages already allocated to the BPool.
Accompanying the error message you list should be the equivalent of DBCC
MEMORYSTATUS output. This is more relevant than running the command
yourself because it's taken at the exact moment the error occurred. If I
were you, I'd have a look at the various buckets listed in that report to
see if any of them seem high. Keep in mind that many of them are page
counts, not byte counts, so you need to multiply them by 8KB to get the
exact byte count in use.
Also keep in mind that this error can be caused by extreme fragmentation as
well as over-allocation of memory. IOW, you could have well more than 64KB
available within the process, but no single contiguous block of that size or
larger.
If, after you've worked through the above, you still can't figure out why
the reservation is failing, you might want to contact PSS to help you
troubleshoot it further. They deal with these all the time and should be
able to get you fixed up in no time.
HTH,
-kh
"james" <kush@.brandes.com> wrote in message
news:%23hTPNHLPGHA.720@.TK2MSFTNGP14.phx.gbl...
> Thanks Ivan. I had already checked that article and also few other google
> search but didn't get the answer.
> <ivanpe@.online.microsoft.com> wrote in message
> news:OenNh9IPGHA.3840@.TK2MSFTNGP14.phx.gbl...
>> Please, take a look at "Inside SQL Server 2000's Memory Management
>> Facilities" by Ken Henderson:
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_01262004.asp
>> "... None of the tools you typically use to inspect application memory
>> use (Task Manager, Perfmon/Sysmon, etc.) show the amount of AWE memory
>> used by individual processes. There's no indication of the amount of AWE
>> memory used by each process, nor is this memory included in the working
>> set size reported for a given process ..."
>> Thanks,
>> -Ivan
>> --Original Message--
>> From: james
>> Posted At: Tuesday, February 28, 2006 6:52 AM
>> Posted To: microsoft.public.sqlserver.server
>> Conversation: MemToLeave area! How to monitor?
>> Subject: MemToLeave area! How to monitor?
>>
>> Gurus,
>> Occasionally I get the error of "WARNING: Failed to reserve contiguous
>> memory of Size= 65536."
>> What is the unit for this size, is it bytes or KB? Additionally,
>> I have set up 511 MB for MemToLeave area by adding -g384 for Sql2k SP3a
>> on AWE enabled system. I have total of 16 GB of RAM, of which 14 GB is
>> set up maximum for Sql server.
>> If I look at Perfmon counter of Process->Private bytes for sql server
>> process it gives me 224 MB.
>> If I look at sqlserver.exe process on task manager it gives me 215MB.
>> If I look at DBCC memorystatus, OS in use, it gives me 12 MB.
>> I would like to know, How can I calculate exactly how much memory is
>> being assigned and how much in use from MemToLeave area by looking at
>> above mentioned counters or any other perfmon or dbcc counters?
>> I really appreciate any input on this matter.
>