When starting the stored procedure, we get error 297
"The user does not have permission to perform this action"
This occurs during a heavy load (regularly when the trim job is performed at the same time). The error is cleared when the service that accesses SQL Server is restarted (and most likely the cropping work has completed), so these are clearly not real permission problems. The error is reported in the line of the stored procedure, which refers to the function, which, in turn, refers to the representations of dynamic control.
What situations can cause an error, for example, when it is not a problem with permissions?
Is it possible to enable trace flag 4616 to fix this, according to this article ? I would like to try, but you need more information. In addition, I am puzzled by the fact that this is a problem with an intermittent situation that occurs only during periods of high activity.
I tried to reproduce the same error in other situations (it also had no rights), and I found that when I started on SQL Server 2005, I got a permission problem:
select * from sys.dm_db_index_physical_stats(66,null,null, null, null)
(66 is an invalid DBID.)
However, we do not use dm_db_index_physical_stats with the wrong DBID. We use dm_tran_session_transactions and dm_tran_active_transactions, but they do not accept parameters, so I cannot get an error to happen to them. But I thought the problem was related.
Thanks for any ideas.