Adding EMPLOYEE\_EXTENDED to all users

by Christoph Stoettner
Read in about 1 min · 193 words

Fountain pen and a notebook

Photo by Aaron Burden | Unsplash

Today i read a question in the IBM Connections Forum about setting the EMPLOYEE_EXTENDED role to all users in a Connections deployment.

It would be easy to set it directly in the database, but that’s not supported by IBM.

I wrote a little script some weeks ago, because i had the same request, but never published it. The good thing here it only uses supported commands.

So i use this question to add it as a new script to my GitHub Repository .

Here you see the source, it is simple a join of the tables emp_role_map and employee:

connect to peopledb;
    inner join EMPINST.EMP_ROLE_MAP r
    on r.PROF_KEY=e.PROF_KEY
    where r.ROLE_ID!='employee.extended';
connect reset;

Just call it with db2 -tvf scriptname.sql.

The script exports a list of mail addresses of users without the specified role. This can then be used with the wsadmin command

ProfilesService.setBatchRole(EMPLOYEE_EXTENDED, "mail.txt")

Or as a oneliner:

wsadmin.bat -lang jython -c 'ProfilesService.setBatchRole(EMPLOYEE_EXTENDED, "mail.txt")'

Scheduling the two commands with Windows Scheduler or cron is enough to update all users to the specified role.

Documentation is provided in the script head.

Add a comment
There was an error sending your comment, please try again.
Thank you!
Your comment has been submitted and will be published once it has been approved.

Your email address will not be published. Required fields are marked with *

Suggested Reading
Aaron Burden: Fountain pen and a notebook
Today i spoke at Social Connections V User Group Meeting in Zurich. What should i say. It was a pleasure and i enjoyed it very much. Hope we can discuss more scripts the next weeks. Session Slides Here you can watch the session slides: Saving my time using scripts #soccnx #soccnxv Scripts Download You can download all scripts without warranty and on your own risk on: Please download the master branch, develop and bugfix can contain not ready scripts. Slidedownload soccnx More Slides on Update 2022: Slideshare is requesting a paid scibd account now (30 day evaluation possible).
Read in about 1 min
Aaron Burden: Fountain pen and a notebook
Missing command history on Linux is a little problem when using command line utilities like wsadmin, db2, sqlplus and so on. I found a solution for this today. You can use rlwrap to get command history for all applications on the console and it is possible to recall and edit the commands. Rlwrap uses readline. Installation on CentOS: yum install readline-static gcc make tar -xvzf rlwrap-0.41.tar.gz cd rlwrap-0.41 ./configure make make install Call rlwrap with wsadmin: rlwrap -r /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/ -lang jython -username wasadmin -password password rlwrap and db2 rlwrap -r db2 Use rlwrap everytime with alias vim ~/.
Read in about 1 min
Aaron Burden: Fountain pen and a notebook
As preparation for Social Connections VI in Prague next week i redesigned the Administration Scripts for IBM Websphere . Some highlights: all scripts are moved to a subfolder with DMGR/bin (folder name: ibmcnx) tested in multinode environments added some classes everybody can use for his own scripts adding policies to libraries (personal and communities) are using search now New scripts: documentation of all jvm settings of each application server create a file with all documentation in one step create cluster members for additional nodes
Read in about 1 min