Showing posts with label supposed. Show all posts
Showing posts with label supposed. Show all posts

Thursday, March 22, 2012

Cluster Failovers and activation

So is there something I'm supposed to configure to allow activation to fire after a cluster failover. We have had three where I have noticed that activation does not automatically fire back up. i have to alter the queue to get it going. None of the values on sys.service_queues imply that is disabled, but messages just keep stacking up into the queue and are not being dealt with. Once I alter the queue to turn activation on; everything takes off and starts working normaly.

Obviously, this is less than desireable for an environment that requires High availability.

Regards

After failover when the queue is not being activated:

1. Do you see any Broker:Activation events in the profiler when messages are enqueued?

2. What is the state of the queue monitor? (sys.dm_broker_queue_monitors)

3. Are there any failures reported in the ERRORLOG?

Thanks,
Rushi

Wednesday, March 7, 2012

CLR (C#) to SQL Server 2005 System.Decimal mapping

Can someone tell me how are you supposed to map the CLR data type System.Decimal to a SQL server 2005 data type decimal? Maybe decimal(28,0) or what?

I don't think that decimal(28,0) is a good match. While decimal(28,0) seems to be similar, I think that you will be disappointed when you accomplish something like this:


SELECT HorrorsWhatHappened = cast( 123456.898794857 AS decimal(28,0))


HorrorsWhatHappened
123457


You 'should' know the precision/scale, and then map to the same precision/scale.

References:

http://msdn2.microsoft.com/en-us/library/4e5xt97a(VS.80).aspx

Also, from: http://geekswithblogs.net/lorint/Default.aspx

Read down to: Finding the scale in decimal values in .NET

...

So now if you have a pile of decimal numbers and you want to create a new table in SQL to hold all of them, you can find the one with the highest scale, and define that column appropriately when you go to use CREATE TABLE or ALTER TABLE. ...