July 9, 2009 at 7:46 am
I create SQL queries that a number of people use, and sure enough it seems that every so often a comma gets added, or code goes missing. Is there a way to 'lock' a query from this sort of manipulation? Unfortunately some of the queries require the user to input information - so I am not sure this is possible.
As an alternative, I may just create password protected word documents of the queries as back up.
July 9, 2009 at 8:09 am
Why don't you build a stored procedure that only allows inputs of things you want changed and can check for extraneous characters in the inputs. The you just publish
EXE dbo.Sprocname
@SomeParam1 = 'Jones Engineering Corp.',
@SomeParam2 = 'xyz',
@SomeParam3 = 'Some text',
@SomeParam1 = 1234
And it returns your results..
CEWII
July 30, 2009 at 3:24 am
why dont you put your SQL code into a view, and let your users use that
August 24, 2009 at 12:02 am
msc (7/30/2009)
why dont you put your SQL code into a view, and let your users use that
Also a good answer..
CEWII
August 26, 2009 at 10:24 am
Yes, and then revoke access for all the users on all objects except the procs and views, so that the users don't continue to run the old queries.
John
August 26, 2009 at 10:59 am
John Mitchell (8/26/2009)
Yes, and then revoke access for all the users on all objects except the procs and views, so that the users don't continue to run the old queries.John
Definitely..
CEWII
August 26, 2009 at 11:40 am
If you prefer to keep ad hoc querying available, you could use some form of source control for the queries.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply