Why are the triggers, stored procedures, etc temporary?

Mar 22 at 10:07 PM
I am just wondering, from a technical perspective, why these objects are temporary and deleted every couple minutes. My DBA is concerned about creating a connection with all the rights necessary instead of just creating these objects once and running the application as a more vanilla user.
Mar 30 at 7:11 AM
Because they are related to SqlTableDependency's life time.

What I mean is: when you dispose SqlTableDependency it is assumed that you do not want anymore receive notifications of record changes.
So, why I have to mantains those object in DB ?

.NET SqlDependency (from Microsoft) works in the same way.

If you do not want to destry triggers, stored procedures ect... then use:


But keep in mind that record changes will be collected in the QUEUE even when SqlTableDependency is disposed.