I have one SSRS report which has been scheduled to run first 10 days of every month and has been in place since 2015 but from last week onwards, the scheduled report subscription run had been taking around 2 hours to complete processing which normally take max 10 minutes.
this is also causing issues with the SQl Agent job failure as the table which are being queried by the report run are getting locked and the SQL Agent job is unable to access those tables and getting failed with Time Out error. when Subscription run is completed, all the jobs run within the time without any errors.
I had checked the data set queries for the report, and in some of the data set queries there are WITH(NOLOCK) options defined with the Table definition but not in all the data set queries.
I am not really looking for defining the WITH(NOLOCK) options in every data set as this gives dirty reads but any locking strategy that can be used in SSRS Report which can prevent the SQL agent jobs to fail when subscription runs.
i even tried enabling READ_COMMITTED_SNAPSHOT ON on the database where my tables are present and are being queried but this resulted in the Subscription processing errors though the SQL Agent jobs didn't fail during the subscription run.
i am looking for any lock mode that can be set at the query level or on the connection string or any other option. NOLOCK is not necessarily the answer for this, although good for throughput, it uses dirty reads which can produce inconsistent data.
Any suggestion around this?