1,160 pts.
 Is it possible to give a user access to sql screen wherein he is allowed only to use select commands
Is it possible to give a user access to sql screen wherein he is allowed only to use select commands. We have a team of users who use a set of 10 - 15 select commands on daily basis.

Software/Hardware used:
i750,iseries
ASKED: July 17, 2012  7:06 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. JohnsonMumbai   1,160 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

are they “fixed” commands (i.e. the same everytime) – create them in QMQRY queries, and add them to a menu for them.
if they have to enter varying parameters (e.g. different customer numbers) you can do that as well.  You will just need to create a “wrapper” program to prompt for the parameters, and then call the query passing it those values.

 7,205 pts.

 

QM queries seem to be the way to go, though there’s no need to create QM queries for them. Just let them use the STRQM command and restrict them from using STRSQL. I don’t recall a way to restrict statements in STRSQL. (There shouln’t be a need to restrict statements. Users shouldn’t have the authority to cause damage with SQL statements, so there shouldn’t be a reason to limit statements.)
 
With QM, an administrator can choose the SQL statements that any user can run. Just set SELECT as the only allowed statement. You might also set the user’s default mode to SQL, and also allow the user to switch to prompted mode if desired.
 
The user can then enter a SELECT statement, get practically the same statement prompting assistance as with STRSQL, and save queries if desired.
 
The big loss is the statement history. But if the history only contains a few different SELECT statements, users might choose just to save each one in their own QM query objects.
 
Tom

 110,115 pts.