.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

SQL Sever Agent Error - Event ID 318

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :Sql Server


Could some one let me know why the following error is happening and resolution for this. This problem exists in SQL Server 2005 which has specific hotfix. But we are currently using SQL Server 2008. Following are the error details,

LogName : Application


Event ID : 318

Level : Error

Task Category : Alert Engine

Message : Unable to read local eventlog (reason: The event log file has changed between read operations).

Note: Immediately after this error there is a Warning message saying "Successfully re-opened the local eventlog - NOTE: Some events may have been missed."

We didn't face this problem before but suddenly we are seeing this issue quite often on some of our SQL Instances.



View Complete Post

More Related Resource Links

how to prevent an error event from propagating out to the agent job calling the package


I'm using an event handler to handle errors when certain control flow tasks fail.  If I can recover from the error, I set System::Propagate = false.  This appears to have the desired effect in that excution continues to the next task and the error was ignored.  The only problem is that when I launch my package through an SQL Server Agent Job, it reports that the job failed eventhough it really succeeded.  Is there anyway to prevent the error from progagating to the agent job? 

I've alternatively tried using failure precedence constraints and got the same results.

If the errors are handled, I want the job to finish execution with a success status.

Event ID 1011 - DefaultAppPool World Wid Web Pub. Serv. fatal communication error

We have a Windows 2003 server running IIS6 1.1 Framework. We have also installed a DNS and Active Directory in the same machine.

We're randomly getting the error you can see below. Sometimes it causes the recycling of process w3wp.exe (which on my understanding represents the application pool worker processd) and other times results on this process hanging and not responding to any request. To do iisrest temporarly solves the problem.

We were pointed to a possible permissions problem between the user we were runnig the DefaultAppPool with and registry entries used by the iis. We noticed the default predifined user we used, Network Service, wasn't found in the Active Directory, so we changed it by the default configurable user, IWAM_MACHINE_NAME, which is under the IIS_WPG Active Directory Grupo, which, in theory has the correct permissions to run the application pool.

Well, none of this worked and we are still getting this error.

This is driving us crazy and think the problem might have to do with having the Domain Controller/Active Directory and the IIS6 running on the same machine. We'll try now uninstalling this DC pointing to another one to see what happens.

Any help would be appreciated.

Thanks in advance,


Event Type: Warning

sql server agent - job schedule 22022 error


Hi ! I have scheduled a job in sql server 2008 to send birthday e-mails. I run the script and it looks wroking but in agent schedule it doesn't. I am getting the below error; what is the problem?

TITLE: Microsoft.SqlServer.Smo
Start failed for Job 'Sending_transferdb_birthdate_e-mails'. 
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Start+Job&Link

Error while executing a package through SQL Server Agent

Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

sql express on my localmachine windows xp - getting error Event ID: 18456

Event Type: Failure AuditEvent Source: MSSQL$SQLEXPRESSEvent Category: Logon Event ID: 18456Date:  12/03/2010Time:  3:58:03 PMUser:  domain\computername$Computer: computernameDescription:Login failed for user 'domain\computername$'. Reason: Failed to open the explicitly specified database. [CLIENT: XXX.XX.XX.XX] For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.Data:0000: 18 48 00 00 0e 00 00 00   .H......0008: 14 00 00 00 44 00 45 00   ....D.E.0010: 4c 00 2d 00 32 00 36 00   L.-.2.6.0018: 38 00 30 00 5c 00 53 00   8.0.\.S.0020: 51 00 4c 00 45 00 58 00   Q.L.E.X.0028: 50 00 52 00 45 00 53 00   P.R.E.S.0030: 53 00 00 00 07 00 00 00   S.......0038: 6d 00 61 00 73 00 74 00   m.a.s.t.0040: 65 00 72 00 00 00         e.r... 

Error starting SQL Server Agent - Could not load the DLL xpstar90.dll. Reason: 126

AD Service account password was changed.  Now the SQL Server Agent (MSSQLSERVER) will not start even after updating the password.  Have no access into the databases.  Log files say "Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.)."  Service Account has Full rights on system.  Any help in solving the problem would be great.

SQL Job SSIS Error Event

Hello, I would like to execute a secondary package when a primary one fails. Can we do that directly with ssis ?   Thanks

Event Handler not picking up error

I have a connection manager which uses a Variable as part of a ConnectionString. I have tried putting an Event handler on the package to capture any errors with the connection string. Unfortunately the event handler does not pick up any errors. I would like to add some screenshot but i am not sure how to do it on this forum.  Mr Shaw

Error: The replication agent has not logged a progress message in 10 minutes

Hello,      We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.   John   Error messages: The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.   18 -BcpBatchSize 10000018 -ChangesPerHistory 10018 -DestThreads 218 -DownloadGenerationsPerBatch 518 -DownloadReadChangesPerBatch 10018 -DownloadWriteChangesPerBatch 10018 -FastRowCount 118 -HistoryVerboseLevel 318 -KeepAliveMessageInterval 30018 -LoginTimeout 1518 -MaxBcpThreads 218 -MaxDownloadChanges 018 -MaxUploadChanges 018 -MetadataRetentionCleanup 118 -NumDeadlockRetries 518 -PollingInterval 6018 -QueryTimeout 40018 -SrcThreads 218 -StartQueueTimeout 018 -UploadGenerationsPerBatch 318 -UploadReadChangesPerBatch 10018 -UploadWriteChangesPerBatch 10018 -Validate 018 -ValidateInterval 60   Due to the memory leak issue with respect to replicating blobbed images we have changed UploadGenerationsPerBatch to = 3.

TX Replication Error: Agent set to verbose 2


Tx Replication is giving an error

Command attempted:

if @@trancount > 0 rollback tran
(Transaction sequence number: 0x00001E880000202E000800000000, Command ID: 1)

Error messages:

2010-09-16 20:10:17.543 Microsoft SQL Server Log Reader Agent 10.0.2531.0
2010-09-16 20:10:17.597 Copyright (c) 2008 Microsoft Corporation
2010-09-16 20:10:17.622 Microsoft SQL Server Replication Agent: logread
2010-09-16 20:10:17.647
2010-09-16 20:10:17.663 The timestamps prepended to the output lines are expressed in terms of UTC time.
2010-09-16 20:10:17.717 User-specified agent parameter values:
   -Publisher Server_A
   -PublisherDB db_A
   -Distributor Server_b
   -DistributorSecurityMode 1
   -Output C:\Users\xyz\Desktop\OUTPUTFILE.txt
   -Outputverboselevel 1
   -XJOBID 0x052684F1D410C746B5AFE798220E5440
   -XJOBNAME Server_A-db_A-5
   -XSUBSYSTEM LogReader
   -XSERVER Server_A
   -XCancelEventHandle 0000000000000960
   -XParentProcessHandle 00000000000009F0

Event Handler returning unexpected Error Code



I am trying to set up an Event Handler to log errors to a table.

So in my Control Flow pane I set an Execute SQL Task with a deliberate error as follows; -

Name; - Execute SQL Task with Deliberate Error

SQLStatement; - SELECT * FROM InvalidTable


Within the Event Handler tab I created a further Execute SQL Statement based on the Event handler OnError

Name : Log

Parameter Mapping
Variable Name System:ErrorCode
Direction Input
Parameter Name 0
Parameter Size 100

SQLStatement INSERT INTO dbo.CustomSSISLog  (ErrorCode) VALUES (?)

Error Output; -

SSIS package "ErrorLogTemplate.dtsx" starting.

Error: 0xC002F210 at Execute SQL Task with Deliberate Error, Execute SQL Task: Executing the query "SELECT * FROM InvalidTable" failed with the following error: "Invalid object name 'InvalidTable'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Task failed: Execute SQL Task with Deliberate Error

Warning: 0x80019002 at ErrorLogTemplate: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of er

sql sever agent fail

if sql server agent fail in sql server what we can do? plz give me the answer

Agent SQL step error when call by proxy


I use SQL Server 2008 R2.

I configure execution step to a proxy. When I load the job an error occur :

"Impossible de démarrer l'exécution de l'étape 1 (raison : Impossible d''obtenir les données proxy pour proxy_id = 2).  L''étape a échoué."

Thanks help me.

NET Runtime 2.0 Error Reporting, Event ID: 5000, EventType clr20r3, P1 msadapter.exe, P2, P3


We are getting the following error what would be the root cause.


Our application is divided into 2 projects.


1- C# assembly.

2 - Managed c++ library (assembly)..


What could be the reason for this.

Is it null pointer exception or some other related to Interoperability assembly mscorlib.dll


This is the event viewer log:


Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date:  5/15/2007
Time:  5:55:20 AM
User:  N/A
EventType clr20r3, P1 msadapter.exe, P2, P3 4648d13f, P4 mscorlib, P5, P6 4333ab80, P7 32fc, P8 10, P9 system.objectdisposedexception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

not able to write error to event log and log file



I am using entlib 5.0 and framewokr 3.5(vs.net 2008)

I opened entlib console and open the webconfig file and added the listeners and my webconfig file is as below

<?xml version="1.0"?>
  <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServi

ItemUpdating event handler causes SPRequest object was not disposed error if properties.ListItem is


I have a very simple ItemUpdating event handler that is causing an SPRequest object was not disposed error when it is fired. The event handler is linked to the document library. I have cleaned out all of my code and narrowed it down to this:

    public override void ItemUpdating(SPItemEventProperties properties)
      SPListItem item = properties.ListItem;

When I change the name of a file or folder in my document list the following line is logged in the SP log:

An SPRequest object was not disposed before the end of this thread.  To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it.  This object will now be disposed.  Allocation Id: {D7AA6805-4CA1-458B-9252-E83D32DBD0D3}  To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks = true.


As an extra note I have actually set the CollectSPRequestAllocationCallStacks to true, this is all the information that it gives me. If I comment out the pr

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