I want to limit the resources available to any t-sql run against a particular database. This database is used for ad-hoc queries and resides on a production server.
The reason I wish to limit by database and not user or application is that my users may access other databases without limitation and the application in question (Management Studio) should also access other databases without limitation. The only function I can see available to the classification function is ORIGINAL_DB_NAME (). The problem with ORIGINAL_DB_NAME () is that the database can be changed for the current connection which means I may end up limiting respources on the wrong database.
Does anyone have a solution?
Thanks in advance,