ARV's Tech blog

Objective of this blog is to share the experiences and knowledge gained in various areas from software, technology, dotnet to Teamleading to any difficult problems solved.

Saturday, April 22, 2006

Solving SQLDumpExceptionError

Applies to : SQL Server 2000.

SqlDumpExceptionHandler: Process 77 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..

Generally this is one of those errors that leaves you clueless about what is happening.Typically one may encounter this type of error when your transaction performs a large number of SQL Operations are performed at once/continuously. Instant solution for this error is to check if you have SP 4 installed for SQL Server. You can verify this by running the following command in Query Analyzer. @@Version . Also below link will give more details about the SQL Server version.

http://support.microsoft.com/default.aspx?scid=kb;en-us;q321185

Now just download SP 4 from from the below link and install it. This should solve the problem. It worked in my case.
http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en

All the best.

Tuesday, April 18, 2006

Effective Software Scheduling

Here is a great article by joel which gives step by step methods for scheduling and tracking timelines for your team. The emphasis is on creating schedules that are easy to follow and complete. Anyone who has been in software development will know very well, how hard it is to deliver stuff on time. Go ahead and read this article may give you some tips on how to create a schedule that's easy to maintain.

Monday, April 17, 2006

Time management for IT guys

Here is an interesting article by rajesh, which gives you a different angle of how to manage your time and how to get things done. Interesting part is

The Important Question
I have always believed in the importance of asking the right questions more than looking for the right answers. Every time, we have a task at hand, the most important question is “How can I get this done?” and we scramble to find the answers.


I think the question is wrong. The right question should be “What is the right configuration of all my resources to execute this task in the most optimal fashion?”

In the first question, there is an inherent temptation to find an answer that involves you as the doer of the task. In the second question, you are opening up for help from resources other than yourself. There is a world of difference in the two questions and, of course, in the answers.


Read the full article here

Saturday, April 15, 2006

Solution for General Network Error

Applies To: .NET 1.1

I think this is a common problem experienced by dotnet developers during different scenarios. There was a time when I faced this problem and stuggled to find a solution.Typically the application was to complete thousands of transactions and insert/update records into tables.At that time the app/service would just stop after a few hundred records throwing error the infamous "General Network Error". The problem with this is that you can't easily understand message or find the root cause of this problem.

A General Network Error can be due to a variety of causes (it just means the client lost its connection with a server), here are some:

1) Database corruption and/or a handled Exception (seen in a SQL Server checkdb report and/or a SQL Server errorlog respectively) causing a spid to be killed
2) A shutdown of the remote server while that stored procedure is executing (seen by inspecting the start time and end time between a pair of errorlogs).
3) A name resolution problem (WINS, LMHOSTS and/or DNS)
4) A SQL Server configuration problem (make sure http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q319942 are at defaults) in conjunction with an MDAC problem
5) A router problem, such as a "black hole router" (that fails to forward packets greater than a certain size, and of course
6) A Network problem related to the amount of data being sent - for example, for the purposes of a repro, try executing the contents of the stored procedure in Query Analyzer and (to test a different Database API), try isql.exe (which uses DB-Library)

In my case it happened because when you are doing large number of transactions consecutively and at that time due to some reasons a connection may become corrupt as mentioned above. So when this happens COM+ does not destroy it. It just simply puts the connection back in pool. When next operation gets this connection, it gives error. Some people suggest you to either make pooling=false in connection string always. This is not correct since then you don’t get the benefits of a connection pool. Also some suggest that increasing max pool size (typically order of thousands) in connection string solves this problem, may be this works but this will not be a correct approach to solve the problem.

To solve this, I changed a little bit of code in SQL Helper (cs version).(for ExecuteDataset, etc.,) like below and it worked like a charm and since then I have not seen this error. Effectively what this piece of code tried to do is when a connection becomes corrupt, it ignores the connection pool and gets a fresh connection that is not from the pool.

try{
cn.Open();
reset = true;
}
catch
{
cn = new SqlConnection(connectionString + ";Pooling=false");
cn.Open();
reset = true;
}
finally
{
if (reset == true)
{
DS = ExecuteDataset(cn, commandType, commandText, commandParameters);
}
cn.Close();
cn.Dispose();
}
return DS;

Seems to be this problem is solved in .NET 2.0.(http://blogs.msdn.com/angelsb/archive/2004/10/05/238153.aspx

The Intent

My intention hereby is to provide quality posts and articles to geeks, nerds and tech guys that i will be learning/learnt in the past. It is my sincere/humble opinion that this is a great medium to share and gain the knowledge that we as a community have.