SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
automatically add WITH (NOLOCK) to selects

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
automatically add WITH (NOLOCK) to selects
Author Message
GeneW



Joined: 10 Apr 2012
Posts: 8
Country: United States

Post automatically add WITH (NOLOCK) to selects Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 5172

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.