on 08-01-2012 8:22 AM
Hi
we need to create mass user creation in hana.
we have user A as template. and need to create more number of users(say 40users) at once.
hope this can be done in SQL command right?
do we have option to copy the roles and user info from User A to User B,C,D etc
for eg, for one user and one role below is ok.
but for many user and many roles to be added. how to achieve this.
CREATE USER my_user PASSWORD My_Password;
GRANT MODELING TO my_user;
Regards
Chandra
Hi All,
Besides scripting you could invoke an ABAP for the same(actually you don't state which HANA constellation you are using - so I don't know if you have this option). I have used the following ABAP template for creating initial users - however not as a mass execution - you will have to amend the logic (include a loop) inorder for that to take place and preferably some input parameters will be required ;-).
REPORT ZHANA_CREATEUSER.
data : err TYPE REF TO cx_sql_exception,
lv_sql type string.
lv_sql = |CREATE USER XYZ PASSWORD SuperDuper123|.
TRY.
NEW cl_sql_statement( )->execute_query( lv_sql ).
CATCH cx_sql_exception INTO err.
MESSAGE err TYPE 'I' DISPLAY LIKE 'E'.
ENDTRY.
COMMIT WORK.
Obviously you can amend the logic even further to grant access and more.
/MiB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandra,
You can not add multiple roles to multiple users in a single go. However you can
1. create few control tables having UserIDs, groups, roles, authorisations etc
2. Create a stored procedure that read all these control table and create/update/delete the Users/auth etc automatically.
You just need to have a Security admin who maintains these tables and execute the stored procedure. Creating a user maintenance table in ECC and SLTing is not a bad idea though.
/bikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys, I know this is a SUPER old post, but just wanted to inform for anyone who searches for a solution might find one.
I just tossed a quick blog together over here
Happy HANA,
Justin
Hello Chandra,
just like in most other DBMS, there is no mass user management available for HANA out of the box.
But you can easily implement the same solution as you would do with other databases:
write a stored procedure that would create the users and grant the desired roles in a loop.
regards,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.