You have several options:
- Doing this in the database itself (for example, in MS Sql Server you can set the default isolation level)
- Doing this on a data source (as you requested) was available in CF 6 via xml, but I would really advise it, even if it is still supported
- Using table hints in your SQL.
Since isolation deals with a transaction, it makes sense to either set READ as the default in the database, or specify it through <cftransaction isolation="read_uncommitted"...>
If you want it to apply to all operators, such as reading snapshots, then apply the default isolation in the database itself. Here is a good overview and steps to configure this.
If you want to read uncommitted from a specific table (this doesn't look like it), use tables like
SELECT * FROM LargeDataSet WITH (NOLOCK)
bearing in mind that this is a hint and that the engine is not forced into it.
In general, if you need to read unauthorized data, this means that you are blocking the read lock, that you may need to consider some architectural changes (were there, did this) or change the default mode to a snapshot (the pros and cons of this approach also )
Good luck
source share