The developers in my company have requested access to run RUNSTATS against
tables they are loading.  
I do not want to give them CONTROL privilege on the tables.  

I tried to draft a shell script in Unix (I am running DB2 v7.2 EEE on AIX
4.3):

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
#!/usr/bin/ksh
. /home/testiadm/sqllib/db2profile

db2 "connect to mydatabase"

for i
do
    echo "Updating Statistics for table : $i"
    db2 "RUNSTATS ON TABLE $i WITH DISTRIBUTION AND DETAILED INDEXES ALL
SHRLEVEL CHANGE"
done

db2 "connect reset"
db2 "terminate"
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


My problems:
I cannot just set the permissions to execute only to hide the id & password.
I tried to set the permissions on the script "setuid" (-rwsr-xr-x) without
the User & Password on the connect line, but it still used the user's ID to
login.

Any help would be appreciated.


John C. George
Data Architect
IBM Certified Solutions Expert - DB2 UDB Database Administration





CONFIDENTIALITY NOTICE: This E-Mail is intended only for the 
use of the individual or entity to which it is addressed and 
may contain information that is privileged, confidential and 
exempt from disclosure under applicable law. 
If you have received this communication in error, please 
do not distribute and delete the original message.  
Please notify the sender by E-Mail at the address shown. 
Thank you for your compliance.
-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc

Reply via email to