Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Tuesday, March 20, 2012

cluster error

We have a one node cluster that is receiving the below error messages in the cluster.log and the Event Viewer. In the SQL Server 2005 SP2 job that fails we receive a slighlty different message. The OS is Windows 2003 SP1. This is not a 64-bit box. We have checked the permissions of the cluster service account in SQL Server to be sure they are correct. Can anyone please help with this issue.

00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 2746; message = [Microsoft][SQL Native Client]TCP Provider: An existing connection was forcibly closed by the remote host.

00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 2746; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] OnlineThread: QP is not online.
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure

I'am having the same issue.|||

Moved to High Availablity forum...

(Please do not 'cluster' bomb so many forums with the same posting. Pick one, and give it time.)

|||What type of server (HP, Dell)?|||Anyone have any Ideas on this. I am having the same problem.

cluster error

We have a one node cluster that is receiving the below error messages in the cluster.log and the Event Viewer. In the SQL Server 2005 SP2 job that fails we receive a slighlty different message. The OS is Windows 2003 SP1. This is not a 64-bit box. We have checked the permissions of the cluster service account in SQL Server to be sure they are correct. Can anyone please help with this issue.

00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 2746; message = [Microsoft][SQL Native Client]TCP Provider: An existing connection was forcibly closed by the remote host.

00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 2746; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] OnlineThread: QP is not online.
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
00000a0c.0000089c::2007/06/12-12:51:27.459 ERR SQL Server <SQL Server>: [sqsrvres] printODBCError: sqlstate = 08S01; native error = 0; message = [Microsoft][SQL Native Client]Communication link failure

I'am having the same issue.|||

Moved to High Availablity forum...

(Please do not 'cluster' bomb so many forums with the same posting. Pick one, and give it time.)

|||What type of server (HP, Dell)?|||Anyone have any Ideas on this. I am having the same problem.

Wednesday, March 7, 2012

CLR and fire event

Is it posible to fire an event in sql 2005 DB when e.g. one record changes i
n
the table and...main part ... respond to that event in some external c#
service?Take a look at 'create trigger' in help.
-oj
"Basic" <Basic@.discussions.microsoft.com> wrote in message
news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@.microsoft.com...
> Is it posible to fire an event in sql 2005 DB when e.g. one record changes
> in
> the table and...main part ... respond to that event in some external c#
> service?|||examnotes <Basic@.discussions.microsoft.com> wrote in
news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@.microsoft.com:

> Is it posible to fire an event in sql 2005 DB when e.g. one record
> changes in the table and...main part ... respond to that event in some
> external c# service?
>
You do not have an automatic way of raising events to external resources
from inside SQL Server. There are however a couple of things you can do
to make this happen:
1. Have a trigger who talks tom a CLR proc, in the clr proc you
initiates an external app.
2. Use SQL Server Servie Broker. The SSB team has created a sample how
to activate an external resource based on a message appearing in a
queue.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||thx niels, this was constructive... one more thing, where can I find this
example (have you link) pls
"Niels Berglund" wrote:

> examnotes <Basic@.discussions.microsoft.com> wrote in
> news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@.microsoft.com:
>
> You do not have an automatic way of raising events to external resources
> from inside SQL Server. There are however a couple of things you can do
> to make this happen:
> 1. Have a trigger who talks tom a CLR proc, in the clr proc you
> initiates an external app.
> 2. Use SQL Server Servie Broker. The SSB team has created a sample how
> to activate an external resource based on a message appearing in a
> queue.
> Niels
> --
> ****************************************
**********
> * Niels Berglund
> * http://staff.develop.com/nielsb
> * nielsb@.no-spam.develop.com
> * "A First Look at SQL Server 2005 for Developers"
> * http://www.awprofessional.com/title/0321180593
> ****************************************
**********
>|||examnotes <Basic@.discussions.microsoft.com> wrote in
news:19EE2685-6BDE-4149-8EB8-D8AAAD2EF59E@.microsoft.com:

> thx niels, this was constructive... one more thing, where can I find
> this example (have you link) pls
>
Go to here: http://www.gotdotnet.com/codegaller...allery.aspx?id=
9f7ae2af-31aa-44dd-9ee8-6b6b6d3d6319 (watch out for linebreaks).
You should find it there.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********

Close the connection?

Hi, I've created a simple hit counter in my Session_Start event...

Dim myDataSource As New SqlDataSource
myDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnectionString1").ToString
myDataSource.UpdateCommand = "UPDATE Stats SET Hits = Hits + 1"
myDataSource.Update()

It works fine but do I need to close the connection after I've finished with it or is this ok?

Thanks for your help.


It's ok, since myDataSouce will go out of scope at the end of your procedure and it (should) clean itself up.

However, if you would be better served by skipping the sqldatasource and going directly to sqlconnection and sqlcommand. It's lighter weight, and would perform slightly better.

|||

Great, thanks a lot Motley. I just needed steering in the right direction!

Come to think of it,I have five seperate SqlDataSource's on another page and keep getting timeouts. Maybe I should try converting everything to the hard coded method.

Hmm

|||SqlDatasources are really meant for binding to data controls. If you are doing everything in code, it's probably better to just use sqlconnection/sqlcommand. Although, I'm curious if sqldatasources that are instantiated that way are able to cache any content, which may make them useful, but I've never tried it.|||

Motley:

It's ok, since myDataSouce will go out of scope at the end of your procedure and it (should) clean itself up.

Actually, you should go ahead and dispose it. If you don't, when the GC runs, it gets handed over to the finalizer thread. It won't be eligible for GC until after the finalizer finalizes it, and then it's been promoted to the level 2 GC cache. This is a (weak) memory leak.

|||In .NET 2.0 best practice is to wrap connection with Using statement which will call dispose automatically.|||

Caddre:

In .NET 2.0 best practice is to wrap connection with Using statement which will call dispose automatically.

I don't think that vb.net has a using statement. Otherwise I would've suggested it.

|||

The Using statement was added to VB.NET 2.0. Try the link below for details.

http://pluralsight.com/blogs/fritz/archive/2005/04/28/7834.aspx

|||

Actually, the sqldatasource control should be able to cache the results (If you enable it, which it is disabled by default).

Secondly, I checked the source code for the sqldatasource and it closes itself after executing the update. The "using" statement will help free some memory quicker than letting it get cleaned up when the procedure goes out of scope. All in all, you won't see much of a difference in speed by either converting to sqlcommand/connection or by changing to the using statement. My comment was more just an FYI -- incase you ever had to worry about the minor performance differences between the two (and because I hate seeing when people programmatically use the sqldatasource as their only data retrieval method). It's much like watching someone instantiate a textbox control everytime they wanted to store a string.

|||I don't know about VB but in C# the only thing better than a Using statement on classes that implement IDisposable is Dispose Bool and the difference is not minor.