Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Monday, March 26, 2012

How can I catch all errors of the stored at the same time?

I have a stored prcedure . In the stored I wrote 3 SQL statements, one is OK but 2 other statements have error as:

1. Invalid column name 'F2'

2. Invalid object name '##_152008049'.

I put the stored inside try block and catch error in catch block as the following. But I always catch only the first error : invalid column name F2 . How about the second statement?

How can I catch all the errors when I put the stored in try block. Now I don't want to add try..catch inside the store for each statement.

Begin try

exec mystored

End try

begin catch

ERROR_NUMBER() AS ErrorNumber,

ERROR_SEVERITY() AS ErrorSeverity,

ERROR_STATE() as ErrorState,

ERROR_PROCEDURE() as ErrorProcedure,

ERROR_LINE() as ErrorLine,

ERROR_MESSAGE() as ErrorMessage,

end catch

You are only getting the first one, because when you encounter the first error, it will fall through to the catch block. Any statements after the error don't even get executed.|||Not all errors are of the same kind, there is a difference between statement abort and batch abort errors. But as the previous poster already said, there is no way to return to the next statement after the catch block was handled.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Monday, February 27, 2012

Hotfix for Bug # 473675 (SQL Server could not spawn process_loginread thread)

Hi,

I get "SQL Server could not spawn process_loginread thread." errors. This is related to a bug in SQL 2000 and there is a hotfix for SP3a.

I am running SQL2000 with SP4. I checked the fix list of SP4 & this bug is not fixed in this SP4.

Can I apply the hotfix to resolve this problem on my server?

tia.

Hi,

SP4 is a superset of SP3,SP2,SP1

So this hotfix must be included in SP4.

You can't easily relate error messages and hotfixes, it could be another reason you are getting this message. Read carefully what the hotfix fixes, relate it to the situation you are dealing with and judge if the hotfix is relevant enough to your problem, so as to risk applying it.

Some more info (complete error message, hotfix info, when and where you get the error message) would help

|||

I am also facing the same problem..though we are using SP3.

Will upgrading to SP4 help?

Do we need to do something else to get rid of the problem?

|||

The most common cause of this message is a lack of free virtual address space. The most common cause of virtual address starvation on SQL 2000 are misbehaving com components from the use of sp_oacreate, misbehaving extended stored procedures, or poorly written OLEDB providers that are loaded by the use of linked servers.

Start by reviewing your use of these items and remove them from the system as possible.

|||

Jerome,

This is an event that happens on our production server about once a week. It only lasts for 2-5 minutes. We are running SQL 2000 SP4. Is there any way to adjust the memory allocation?

Thanks in advance.

Ron

Hotfix for Bug # 473675 (SQL Server could not spawn process_loginread thread)

Hi,

I get "SQL Server could not spawn process_loginread thread." errors. This is related to a bug in SQL 2000 and there is a hotfix for SP3a.

I am running SQL2000 with SP4. I checked the fix list of SP4 & this bug is not fixed in this SP4.

Can I apply the hotfix to resolve this problem on my server?

tia.

Hi,

SP4 is a superset of SP3,SP2,SP1

So this hotfix must be included in SP4.

You can't easily relate error messages and hotfixes, it could be another reason you are getting this message. Read carefully what the hotfix fixes, relate it to the situation you are dealing with and judge if the hotfix is relevant enough to your problem, so as to risk applying it.

Some more info (complete error message, hotfix info, when and where you get the error message) would help

|||

I am also facing the same problem..though we are using SP3.

Will upgrading to SP4 help?

Do we need to do something else to get rid of the problem?

|||

The most common cause of this message is a lack of free virtual address space. The most common cause of virtual address starvation on SQL 2000 are misbehaving com components from the use of sp_oacreate, misbehaving extended stored procedures, or poorly written OLEDB providers that are loaded by the use of linked servers.

Start by reviewing your use of these items and remove them from the system as possible.

|||

Jerome,

This is an event that happens on our production server about once a week. It only lasts for 2-5 minutes. We are running SQL 2000 SP4. Is there any way to adjust the memory allocation?

Thanks in advance.

Ron

Hotfix for Bug # 473675 (SQL Server could not spawn process_loginread thread)

Hi,

I get "SQL Server could not spawn process_loginread thread." errors. This is related to a bug in SQL 2000 and there is a hotfix for SP3a.

I am running SQL2000 with SP4. I checked the fix list of SP4 & this bug is not fixed in this SP4.

Can I apply the hotfix to resolve this problem on my server?

tia.

Hi,

SP4 is a superset of SP3,SP2,SP1

So this hotfix must be included in SP4.

You can't easily relate error messages and hotfixes, it could be another reason you are getting this message. Read carefully what the hotfix fixes, relate it to the situation you are dealing with and judge if the hotfix is relevant enough to your problem, so as to risk applying it.

Some more info (complete error message, hotfix info, when and where you get the error message) would help

|||

I am also facing the same problem..though we are using SP3.

Will upgrading to SP4 help?

Do we need to do something else to get rid of the problem?

|||

The most common cause of this message is a lack of free virtual address space. The most common cause of virtual address starvation on SQL 2000 are misbehaving com components from the use of sp_oacreate, misbehaving extended stored procedures, or poorly written OLEDB providers that are loaded by the use of linked servers.

Start by reviewing your use of these items and remove them from the system as possible.

|||

Jerome,

This is an event that happens on our production server about once a week. It only lasts for 2-5 minutes. We are running SQL 2000 SP4. Is there any way to adjust the memory allocation?

Thanks in advance.

Ron