 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
GeneW
Joined: 10 Apr 2012 Posts: 19 Country: United States |
|
automatically add WITH (NOLOCK) to selects |
|
I use SQL Assistant frequently to query production databases and I need to make sure that I don't lock any record or table. Is there a way to configure SQL Assistant to always add the WITH (NOLOCK) hint after every database? For example:
SELECT d.DepartmentID, d.Name, d.GroupName, edh.EmployeeID, edh.ShiftID, edh.StartDate,
edh.EndDate
FROM AdventureWorks.HumanResources.Department d WITH (NOLOCK)
INNER JOIN HumanResources.EmployeeDepartmentHistory edh WITH (NOLOCK) ON edh.DepartmentID = d.DepartmentID
|
|
Wed Apr 25, 2012 4:48 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
There is no currently such option available. It might be implemented in a later version, we have an enhancement #SA18967 for that, and which is not prioritized yet.
What I can suggest for now, adding WITH (NOLOCK) to the list of preferred keywords list so that you can see it in popups and paste faster, and it will also remind you for a need to use nolock hints.
Also using a read only connection, so that you cannot start, don't know if that is a viable option for you.
|
|
Wed Apr 25, 2012 5:05 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|