Avatar of dotsandcoms
dotsandcoms asked on

SQL Server 2012 Error : "A severe error occurred on the current command."

Hello Experts,
From a last few days in my asp.net - SQL server 2012 application I received error like "A severe error occurred on the current command.".

Before this i received errors "Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached".

I checked my code, but all the connections are closed as soon as their task is over. So, to avoid this error i've start pooling.

Now I am getting above error ("A severe error occurred on the current command.") and after a few minutes error resolved automatically. This is happening frequently.

I have checked with DBCC commands but showing no error. Is there any issue with SQL Server or with coding ?

Thanks in advance
Microsoft SQL ServerASP.NETSSIS

Avatar of undefined
Last Comment
Anthony Perkins

8/22/2022 - Mon
Harish Varghese

First, perform a CHECKDB to look for any consistency issues in database.
You may see similar issue here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7c4dd91f-4ca6-4cb9-ad8b-c8f32e9d25e7/a-severe-error-occurred-on-the-current-command-the-results-if-any-should-be-discarded
If you see any issue in CHECKDB, then see this link for remedies: http://www.sql-server-pro.com/dbcc-checkdb.html
ASKER
dotsandcoms

Hi,
i did not get any error.

below is the last two lines of result
CHECKDB found 0 allocation errors and 0 consistency errors in database 'd5qst4z'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Open in new window

SOLUTION
Henrik Staun Poulsen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
dotsandcoms

hi,
as per suggestion, I have restarted IIS, till now no error occurred.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Kamal Khaleefa

Hi
I face a similar problem and the problem was some of my functions were not closing the connection
Make sure to add finally try. Catch in each function and to add the connection.close inside the finally
Also check if u have a dead lock in ur code
ASKER
dotsandcoms

hi
i am using 3-tier architecture and i am closing all the connections. Also, there isn't any deadlocks. After restarting IIS i didn't receive any error but i want to wait a few more day before accepting solution.
ASKER
dotsandcoms

Hi,
I received error again. This time, I am not able login from Management Studio and getting below error :

TITLE: Connect to Server
------------------------------

Cannot connect to <serverIP>.

------------------------------
ADDITIONAL INFORMATION:

A severe error occurred on the current command.  The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Open in new window


I have also ran DBCC commnads (DBCC CHECKALLOC,DBCC CHECKCATALOG,DBCC CHECKDB,DBCC CHECKFILEGROUP) but not found any error in any of the DBCC commands.

Is there any server side issue.
Website hosting and SQL server hosting are on different servers.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Henrik Staun Poulsen

that is not the same type of error ("a servere error occured..."), but a connection error.
Did you check your network?

Best regards,
Henrik
ASKER
dotsandcoms

network is ok.

look at "ADDITIONAL INFORMATION" in the message. It says "A Severe error occurred".
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Henrik Staun Poulsen

glad it helped.

Best regards,
Henrik
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER
dotsandcoms

Hello,
now error gone.
akash roy

Dear Expert
             
when i put “select * from tblname” then i got error like “Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.”

pls help
Anthony Perkins

pls help
I would suggest you post your own question, as opposed to piggy-backing  on this 3 year old thread.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.