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
Avatar of Harish Varghese
Harish Varghese
Flag of India image

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
Avatar of dotsandcoms
dotsandcoms

ASKER

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
Avatar of Henrik Staun Poulsen
Henrik Staun Poulsen
Flag of Denmark image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of dotsandcoms
dotsandcoms

ASKER

hi,
as per suggestion, I have restarted IIS, till now no error occurred.
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
Avatar of dotsandcoms
dotsandcoms

ASKER

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.
Avatar of dotsandcoms
dotsandcoms

ASKER

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.
that is not the same type of error ("a servere error occured..."), but a connection error.
Did you check your network?

Best regards,
Henrik
Avatar of dotsandcoms
dotsandcoms

ASKER

network is ok.

look at "ADDITIONAL INFORMATION" in the message. It says "A Severe error occurred".
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
Avatar of dotsandcoms
dotsandcoms

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
glad it helped.

Best regards,
Henrik
Avatar of dotsandcoms
dotsandcoms

ASKER

Hello,
now error gone.
Avatar of akash roy
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
pls help
I would suggest you post your own question, as opposed to piggy-backing  on this 3 year old thread.
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo