Developing with TD and SignalR

Mar 17, 2016 at 12:44 PM
Hi!

First of all ... GOOD JOB!

Then, I'm developing a poc using MVC, SignalR and TD: all work great!

I'm a bit confused by the large number of sql objects that are created, perhaps dependent on debugging through Visual Studio.
If I understand correctly, every time I press F5 and debug the application, a new set of objects is created?

Is it right?

Thank you very much!
Mar 17, 2016 at 1:24 PM
Yes, every time you run SqlTableDependency a new set of objects is created
And every type you call Stop() or dispose SqlTableDependency these object are destroyed. If you don't do that after 5 minutes, these object are removed automatically.
Mar 17, 2016 at 1:32 PM
Thank you very much, Christian!

Currently, on my dev db server, I have a lot of entries in 'Service Broker' node, under my database.
A lot of message type, contract and queue. Some entry created 3 day ago ...

How can I clean this objects?
Mar 17, 2016 at 2:23 PM
If you have a stored procedure with same naming convention, those object should be deleted automatically.

However, starting from MESSAGE, then CONTRACT, then QUEUE, SERVICE BROKER, you can delete manually. From SqlServer management studio select it and then DELETE.
Mar 17, 2016 at 3:17 PM
Understood!

I found the stored procedure with the 'DROP' feature,

But I think there is an error on them: to start the drop process, they check for this

SELECT COUNT(*) FROM [StationStatus_0bb398c1-29f7-4472-986e-dffd9610374e] WHERE message_type_name = 'http://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer'

but the column message_type_name contain the message type as 'StationStatus_0bb398c1-29f7-4472-986e-dffd9610374e' and not 'http://schemas. ...'

So, if I run the stored, the objects will not be never deleted.

Thank you!
Mar 17, 2016 at 3:30 PM
Edited Mar 17, 2016 at 3:30 PM
there has been a misunderstanding...

that stored procedure is called from a sort of watch dog. It is used to clean up the DB when the application finish without calling Stop() or Dispose() on SqlTableDependency. You do not have to call manually the Stored procedure.

So to remove << Some entry created 3 day ago ... >> you have to do manually as described above.
Mar 17, 2016 at 3:42 PM
Clear! I'll delete manually as you explained.

But, I think the stored has been called but no deletion take place due to check error.

Thank you for your help!
Mar 17, 2016 at 3:51 PM
If you are able to reproduce the error, can you detailed it and open an ISSUE ?
Thanks
Mar 17, 2016 at 4:16 PM
OK!

Thank you!