.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Log Reader Agent Access Violation

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :Sql Server

I recently set up transactional replication from one server database to another server database.  I keep getting a Log Reader Agent error:  An access violation occurred. 

The SQL Server agent starts under one Windows account but the Server is registered under the system account.  The log reader agent is using the system account.

I'm not sure what else to check or what database permissions or roles should be set.  Can somebody help?  Thanks.

View Complete Post

More Related Resource Links

Access violation in wpfgfx_v0400.dll - How to find the problem?

I have an access violation exception generated inside wpfgfx_v0400.dll. I have the minidump loaded in visual studio 2010 with all my program's symbols loaded in debug mode. Unfortunately, the stack is of little use. I have searched on the net for help but I could not find anything. I would like to know what I can do from here. Here is the stack for the thread that caused the access violation. Unhandled exception at 0x778b64f4 in WERE8E3.tmp.hdmp: 0xC0000005: Access violation reading location 0x24448900. >   ntdll.dll!778b64f4()      [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]        wpfgfx_v0400.dll!6abb6d2e()          wpfgfx_v0400.dll!6ab9e2d5()          wpfgfx_v0400.dll!6ab22c98()          wpfgfx_v0400.dll!6ab22c98()          wpfgfx_v0400.dll!6ab22c98()          wpfgfx_v0400.dll!6ab23dca()          wpfgfx_v0400.dll!6ab22dbb()          wpfgfx_v0400.dll!6ab291e2()    

Access Violation in .NET 4 Runtime in gc_heap::garbage_collect with no unmanaged modules


Hi all,

We are experiencing an access violation in the .NET 4.0 runtime, in a piece of code that uses NHibernate heavily. None of our own code interops with native code directly, nor does the 3rd party code we are using (to the best of our knowledge). We cannot identify the memory pattern that is appears to be corrupting the GC heap, and we don't know whether the problem is in the GC itself or in some other piece of code that is corrupting it.

I've included below the stack trace of the offending thread, and the list of loaded modules.

We need some help debugging this issue. What should we do next?

Adam Smith
Director, Technology
Hubbard One
Thomson Reuters


0:000> !EEStack
Thread   0
Current frame: clr!WKS::gc_heap::find_first_object+0x64
ChildEBP RetAddr  Caller, Callee
0012bf30 791fa5b8 clr!WKS::gc_heap::mark_through_cards_for_segments+0x116, calling clr!WKS::gc_heap::find_card
0012bf38 791fa618 clr!WKS::gc_heap::mark_through_cards_for_segments+0x563, calling clr!WKS::gc_heap::find_first_object
0012bfc4 791faaa1 clr!WKS::gc_heap::relocate_phase+0x5b, calling clr!WKS::gc_heap::mark_through_cards_for_segments
0012c000 791f7a52 clr!WKS::gc_heap::plan_phase+0x851, calling clr!W

Log Reader Agent fails to restart when server restarts


when our server reboots and by way of that, SQL Server restarts, the Log Reader Agent fails to restart despite appearing to be set to do so (restart when SQL Server Agent starts).  SQL Server Agent does restart, but the LRA needs manual intervention.



"Access Denied" Error for WMI Reader Task Query


I am using SSIS to query all servers for their disk space from a remote machine using the WMI Reader Task by providing the Administrator user credentials to access all servers. The package execution fails and I get the following error in the Execution Results pane:

[WMI Data Reader Task] Error: An error occurred with the following error message: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))".

However, I do get the results for the Development and Staging servers but the Production servers come back with an Access Denied message. The user credentials for the Dev and Staging servers belong to the "Administrator" group whereas for the Production, the user belongs to the "Administrator" and the "User" group as well.

I am pretty much sure that it has something to do with access to running WMI queries on the servers but I could not find a forum that discussed this issue elsewhere. I even checked for the DCOM Security settings after a few searches led me to a post about "Connecting to WMI on a Remote Computer" on an msdn forum but they seem to be enabled for all environments.

My production database sits on a cluster, so does that make any difference? I have not used the WMI ta

Server crashing - Access Violation error



Would someone be able to help? We have a major problem with our SQL Server (2008 RC) installation. SQL Server keeps crashing. The key parts of the dump file seem to be these:

Log was backed up. Database: sage_broadata0506, creation date(time): 2010/06/30(13:26:32), first LSN: 18395:3126:1, last LSN: 18395:3126:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'E:\Program Files\Microsoft SQL Server\Backup\sage_broadata0506\sage_broadata0506_backup_2010_10_14_085501_6709455.trn'}). This is an informational message only. No user action is required.
2010-10-14 08:55:03.37 spid61      Using 'dbghelp.dll' version '4.0.5'
2010-10-14 08:55:03.72 spid61      ***Stack Dump being sent to E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG\SQLDump0112.txt
2010-10-14 08:55:03.74 spid61      SqlDumpExceptionHandler: Process 61 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2010-10-14 08:55:03.74 spid61      * *******************************************************************************
2010-10-14 08:55:03.74 spid61      *
2010-10-14 08:55:03.74 spid61      * BEGIN STACK DUMP:

log reader agent stopped in transactional replication


hello frnds

I got this error in transactional replication in sql server

Error:The process could not execute 'sp_repldone/sp_replcounters' on 'FS001XSSQL110'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

Get help: http://help/MSSQL_REPL20011

The log scan number (54862:18189:10) passed to log scan in database 'Affinity' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. (Source: MSSQLServer, Error number: 9003)

Get help: http://help/9003

The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017)

Get help: http://help/MSSQL_REPL22017

The process could not execute 'sp_repldone/sp_replcounters' on 'FS001XSSQL110'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)

Get help: http://help/MSSQL_REPL22037

this is what i am getting when i viewed the log reader agent in replication monitor.



SQL 2008. Merge replication. Snapshot agent. Access Denied

Windows Server 2008 Standard x64 SP1, SQL Server 2008 Enterprise Edition x64 SP1
Snapshot agent has read-write permissions to ReplData folder but cannot access local snapshot folder. How to resolve this error?

Error messages:
Source: mscorlib
Target Site: Void WinIOError(Int32, System.String)
Message: Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\ServerName_DatabaseName_PublicationName\DateTime\' is denied.
Stack:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)
   at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity)
   at Microsoft.SqlServer.Replication.Utilities.CreateDirectoryWithExtendedErrorInformation(String directory)
   at Microsoft.SqlServer.Replication.Snapshot.SnapshotProvider.CreateSnapshotFolders()
   at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.CreateSnapshotFolders()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: mscorlib, Error number: 0)
Get help: http

access violation in gc_heap::mark_object_simple


My windows service is crashing in production, seemingly randomly.  It's a 32-bit .NET Framework 3.5 app, running as a service on a Windows Server 2003 machine.  My client has sent me a few crash dumps generated using ADPlus.  Windbg shows the following stack trace for the exception:

ChildEBP RetAddr  Args to Child             
0709fef0 79f7b47e 089b972c 090ae514 006c7f94 mscorwks!WKS::gc_heap::mark_object_simple1+0x148
0709ff1c 79f472d5 03d13a70 00000000 79f769cf mscorwks!WKS::gc_heap::mark_object_simple+0x2b4
0709ff50 79f46d81 00000002 00000000 00000000 mscorwks!WKS::gc_heap::c_drain_mark_list+0x95
0709ff7c 79f47773 7a3b9010 7a3b9028 0709ffb0 mscorwks!WKS::gc_heap::c_mark_phase+0xaa
0709ff98 79f82425 00000000 00000000 00000000 mscorwks!WKS::gc_heap::gc1+0x59
0709ffb0 79f82477 00000000 77e6482f 00000000 mscorwks!WKS::gc_heap::gc_thread_function+0x9f
0709ffb8 77e6482f 00000000 00000000 00000000 mscorwks!WKS::gc_heap::gc_thread_stub+0x73
0709ffec 00000000 79f82448 00000000 00000000 kernel32!BaseThreadStart+0x34

Everything I can find about errors similar to this indicate that the managed heap is corrupted, but !verifyheap produces no output other than "-verify will only produce output if ther

Replication Log Reader Agent Error - No Information


SQL Server 2005 SP3, I have created an Oracle Publication for transactional replication.  All seems to be working, even getting transaction updates from Oracle. In replication monitor Log Reader Agent status is "Error".  Last action is "applying retries....".  When I view details, window is empty - though once before (when I saw details), details told me to check job history.  Job history shows - "The replication agent encountered an error and is set to restart within the job step retry interval. See the previous job step history message or Replication Monitor for more information."

I understand that the Log Reader is moving data change info to distribution and it seems important to understand the errors.  The Log Reader agent is using the SQL Agent Service Account.

Log Reader Agent profile properties are default.

Here are details of error:

Details in job step message:

Date  10/29/2010 11:23:54 AM
Log  Job History (PULPDEV-PULPDEV-19)

Step ID  2
Step Name  Run agent.
Duration  01:06:07
Sql Severity  0
Sql Message ID  0
Operator Emailed  
Operator Net sent  

Subscribing to events from .NET COM component leads to access violation


I wrote a tiny COM component in C#.  The COM component fires an event, and I'm subscribing to the event in an MFC dialog app.  The event fires, and percolates up to the MFC app, and all seems fine.  But, when you exit the MFC app, an exception in mscorwks.dll generates this line in the Visual Studio Output window:

First-chance exception at 0x7006f877 in UseDotnetFormDllMfc.exe: 0xC0000005: Access violation reading location 0xfeeefef6.

Just subscribing to the event seems to cause this.  If I skip AfxConnectionAdvise, then the exception does not occur.  I assume I'm doing something wrong on the C# side.  The C# code appears below.  Does anyone happen to know what might be going wrong?


using System;

using System.Collections.Generic;

using System.Text;

using System.Runtime.InteropServices;


namespace DotnetFormDll


    // Declare INMSInternalUIEvents as a COM event source

    public delegate void CancelDelegate();


    // Define event interface


        ComVisible(true), // This interface should be in the typelib (defines events)


BackgroundWorker calling COM api method get "Access Violation" error


My WPF appl need to call methods in a COM object (VC++) to do some work. It works perfectly when I call those methods   from the UI thread. As those calls take a very long time to finish, so I decided to move the interaction with COM to a BackgroundWorker. But I got an exception in one COM methods (Other methods still working fine). The error reads:

Unhandled exception at 0x62a7be37 (msvcr100d.dll) in TestApp.exe: 0xC0000005: Access violation writing location 0x0ab0f000.

The signature of the COM method is:


            DWORD size = some func get the size;

            BYTE* pSrcData = the src data address;

            memcpy((void*) pData, pSrcData, size);   //Error occured on this line


    return S_OK;


How the C# calls the method:


Give non-sysadmin user access to SQL Agent Jobs


Hi, I have a situation where a group of users (domain ad group) need access to create and edit SQL Agent Jobs. The group can not be sys admin. I tried with the server role SQLAgentOperatorRole. but that doesn't give access to edit all SQL Agent Jobs, only the one that the users owns.

Thanks in advance

Access Violation in SqlServerCe 3.5 SP2 with entity framework


We are developing a .net 4 application that uses sqlServerCe with entity framework.
We get random access violation exceptions when we read from the database. The exceptions always occurs in SqlServerCe.NativeMethods but exact location/function varies.

Platform: There are more exceptions running this on XP but they also occurs on Windows 7.

Any ideas?



Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel

Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installed Version: Ultimate

Microsoft Visual C# 2010   01019-532-2002102-70982

Microsoft Visual Studio 2010 Ultimate - ENU Service Pack 1 (KB983509)   KB983509
This service pack is for Microsoft Visual Studio 2010 Ultimate - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.

 System.Data.dll C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
 System.Data.Entity.dll C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089 

Errors when using Proxy/Credentials to execute SQL Agent jobs that access SSIS packages


Running SQL Server 2008, on Windows Server 2008.

I'm having a problem trying to execute a job.  The job has executed successfully when I configure the SQL Agent account (domain account with sysadmin permissions in the instance) as the owner/executor of the job.  However, I want to tighten down security so I'm trying to use a proxy/credential.

Here are the steps I've followed:

1) create a non-privileged SQL account called "SQLJobOwner" that owns the job.

2) create a stored credential (domain account) that has an account on the local machine where the instance resides, and has "log on as batch" permissions.

3) created a login to the instance for the domain account that is stored as a credential, and granted sysadmin permissions to the account.

3) create a new proxy called "SSISProxy", and granted access to the SSIS subsystem.

4) Added job owner "SQLJobOwner" as a principal in the SSISProxy configuration window.

5) changed the job step that executes the SSIS package to "Run as" the "SSISProxy".


When I execute the job, the job fails with the following error:

Unable to start execution of step 1 (reason: Could not get proxy data for proxy_id = 1).  The step failed.

In addition, I get

Error occured while starting SQL Agent : 'Access is denied.'

Hi, I am trying to stop / start SQLAGENT service by using following syntax, EXEC xp_servicecontrol N'stop',N'SQLServerAGENT' But I am getting following erro StartService() returned error 5, 'Access is denied.' Please help me to resolve this error
Chetan SQL DBA

Workflow Runtime Crashed with Access Violation Exception




We have an AddInProcess32.exe hosting Workflow Runtime (.Net 3.51 SP1) and the program is targeted to run on a Windows 2008 server (SP2). During the stress testing, some 30-60 workflows were be executed by the program repeatedly for a few days. Everything looked fine except at one time  AddInProcess32.exe crashed with information at Windows Log

Faulting application AddInProcess32.exe, version 3.5.30729.1, time stamp 0x488ef947, faulting module mscorwks.dll, version 2.0.50727.4206, time stamp 0x4bf4c6a7, exception code 0xc0000005, fault offset 0x00024414, process id 0x%9, application start time 0x%10.

.NET Runtime version 2.0.50727.4206 - Fatal Execution Engine Error (73227B6E) (80131506)


We don't have any COM interop or PInvoke. Also, the failed workflow type has been executed successfully more than one thousand times except the one crashed above.


With WinDBG and the crashed dump file, we managed to get the calling sta

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend