.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 Server hangs

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

We have two SQL servers that are used to build warehouses.  Both servers will hang with no notice.  We are able to ping the server, but cannot remote connect in anyway.  We have to force a shutdown to restore the server to a working state.  The sql programming for the build is rather poor and a lot of times SQL's CPU is through the roof, but we can still remote in.

I am trying to get the responsible department to work with the vendor to streamline the programming.  In the mean time is there something I can do with the memory, etc(?) to keep SQL from overtaking the OS?  At least that is what our network engineer says is happening.

PS:  Our SQL and hardware are completely up to date with service packs.

View Complete Post

More Related Resource Links

Bug in ODBC SQL Server driver (SQLFetch hangs)

I have come across a bug in the ODBC driver for SQL Server when working against SQL Server 2008 64-bit with TDE where tables contain text-datatypes. We concluded that it is a bug after testing a simple SQL query using Microsoft ODBC test tool (odbcte.exe) and the workaround for us was to start using the "SQL Native Client 10" instead. However I would like to share this information if someone else come across this problem. Below I will describe the problem in more detail. The table has three columns with text datatypes and we use a simple select query against this table to return about 10 rows of data but SQLFetch hangs before all data is returned. It is unfortunately very difficult to reproduce the errror since even a very small change will change the behaviour. If we for example add or remove a column to the select statement then the problem will dissappear, if we call SQLBindCol before instead of after SQLExecute (or the other way around) the problem will dissapear, if we change the WHERE-clause to fetch a different set of rows the problems will dissapear. We have seen the problem though with a number of different SQL queries so it is reproducable.

OpenQuery() to Linked Server hangs, leaving SPID with open tran, then templog.ldf grows without limi

Hi, We have a customer that is using SQL Server 2000, and experiencing the following intermittent problem -- occasionally templog.ldf will grow and grow until it fills the entire disk. This is a rare problem, it has happened less than 10 times in the past two years, for a job that runs once a minute. But it has happened on 3 different SQL Servers, (two production servers, and one test server). Our suspicion is that the root cause is an OPENQUERY() to pull data from a linked server (Oracle database on Unix). We have seen that these OPENQUERY() statements occasionally hang and cannot be killed. The OPENQUERY() is used to populate a local table, and when we originally populated permanent tables with OPENQUERY(), then there would be a lock on this permanent table and nothing could be done until SQL Server was stopped and restarted. To workaround the immediate problem, last year we modified all OPENQUERY() statements so that the local table was a #temp table. In that case, cancelling the job left the hung process, but the hung process had a lock on a #temp table and so that didn't keep the next execution of the job from creating a new #temp table and populating it. However... it appears that the hung process, because it leaves an SPID with an open transaction, keeps the tempdb log file from being truncated. And eventually you run out of disk space, no matter how much disk space is

VS 2008 Design Mode Hangs on Windows 2008 Server

 I have looked at all the posts I can find on this problem and tried everything I can think of, but still the problem persists. I am getting really sick of it. It was working fine for the last year until an update to MS Office 2007 caused a lot of problems (automatic update). After checking posts here, I removed it completely. No change. I then tried all the things I could find on other posts, also no change. Today, I removed VS and the Web Authoring Component and re-installed. Still no go. Does anyone have a fix for this problem. It seems that it has been around a long time, but is still giving problems. I even saw one suggestion to reformat the drive! You've got to be joking! Help please, I'm getting desparate.  

SQL Server 2008: When creating database with filestream group pc hangs


I am facing this STRANGE problem with sql server 2008. When I try to create a new database with filestream group my system hangs. When I restart pc by direct power off and then on, I cannot see the new database but at the given location I could see that database files and filestream group has been created. 

Solutions Tried.
Uninstall, download new version then reinstall but to no use.
Set maximum permissions to current user (according to my knowledge).
Using Mix mode authentication.

PC configuraion:
XP Home Edition SP2,
Intel Dual Core 2.0 GHZ Processor
4GB Ram,
SQL Server express SP1 installed on NTFS Partition
Plenty of Disk Space
Comodo Firewall pro, Avast Antivirus ( Already tried to stop firewall and antivirus still no use)

Any help would be appreciated.

SQL Server 2008 merge replication snapshot hangs on filtered articles


I have a publication on SQL Server 2008 Standard Edition using merge replication.  When I attempt to generate the initial snapshot, the snapshot agent appears to hang on the step "Setting up the publication for filtered articles."  I get a long (over 4 hour) series of messages: "The process is running and is waiting for a response from the server."  I know something is happening server-side, as SQL Server and the snapshot agent use a lot of memory and max out one core's processing capacity.

This has me confused as the publication is not doing any filtering.

Even more confusing:  I backed up the database and restored it onto my development-test system.  I created the snapshot there, and it took under 10 minutes every time.

Any suggestions for investigating and resolving this?

Problem with Reporting Services -- Report Hangs sometimes, need to restart server



We are having an application in which we generate several kinds of reports. We have one report- person addresses, through which we generate the report for all the people whom we have to deliver the cards. This is one of our most frequently used reports.

Some time back, we started getting problems of reports hanging on blank white page and nothing comes up. We restarted the server and everything wents fine. After some more days, the problem occurs again and again we restarted the server.

From that time the problem is coming up again and again and everytime we needs to restart server to make it work. But we cant do that every time ..Can anyone please suggest what may be causing it?

Database server: sql 2000

reporting services : Microsoft SQL Server Reporting Services Version 8.00.1062.00

operating system on which report is running: Microsoft Windows NT 5.2.3790.0

Application is build in .Net 2003

Sometimes the problem comes in 2 weeks, and sometimes it comes twice in a week.

SQL Server 2005 hangs twice/day with continuous stack dumps


MS SQL Server Enterprise Edition (64-bit) v9.00.1399.06
MS Windows NT 5.2 (3790)
14334 MB RAM
Not clustered
serves MS SharePoint 2007 instance

My SharePoint goes down twice a day due to SQL Server connection errors. A reboot of the DB server and SP server resolves the incident.

In the SQL Server error logs are continuous stack dumps that started a few days ago. Excepts from the dump:

Using 'dbghelp.dll' version '4.0.5'
A user request from session with SPID 56 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
Error: 17310, Severity: 20, State: 1.
blah, blah, blah...
Input Buffer 104 bytes -
Access Viaolation occured reading address 000000000000000000
Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
Exception Address = 00000000015F7A1E Module(sqlserver+00000000015F7A1E)

This error does not seem to bring down the server, as the stack dumps are logged one after the other at ~5 second intervals.

The LOG directory has 6 files that are continuously updated:

  • SQLDmpr10000.mdmp
  • SQLDmpr10000.log
  • exception.log
  • SQLDump10000.txt <-- over 7 GB!

The server has > 4GB RAM avail

Debugging SQL CLR hangs with SQL Server 2005 and VS 2005




I am having a problem with SQL Server (Express) hanging during simple debugging of CLR code. I created a test project with a user defined function, and call this from the test script. The output log shows that the sqlservr.exe was auto-attached successfully, and then the everything hangs. I have to terminate debugging in order to regain control, and this takes perhaps a minute or two.


Any ideas?


call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

CLR Integration With Microsoft SQL Server

Transact-SQL provides as much flexibility as possible but, because it is not a real programming language, it has some shortcomings about many issues (memory management, exception handling, debugging, file processing (or streaming), object-orientation (classes), or thread management). Transact-SQL also lacks features of normal libraries (arrays, collections, serialization, expressions, or string manipulations, etc).

IP Address Blocking or Restriction in SQL Server

"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.

.RRAS IP Filter

Determine whether Forms Server is installed on a server

Check whether the Microsoft.Office.InfoPath.Server.dll and FormServer.aspx files are installed on the server.
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