Solution ID: prim19804 |
How to change the license from one user profile to another within the database. |
Status: Reviewed |
Version(s): 3.x, 4.0, 4.1 |
Problem: | How to change the license from one user profile to another within the database. |
Problem: | Unable to change license from one user profile to another when there is only one named user license within Project Management. |
Fix: | Run the following statements in Oracle’s SQLPlus or SQL’s Query Analyzer: For Oracle users, log into the Primavera database as admuser. For SQL user, connect to the Primavera database as privuser. Select user_id, user_name from users where prof_id = 12; user_id user_name ———– ——— 25 admin 73 admin1 76 Tim –This should return all Admin Superusers in the database. The user who is to receive the license should be an admin superuser. Select the appropriate user_id (we will us 慳dmin1?in this example, who has a user_id of 73 (this number will be used later).We need to know the next available next key value for the usereng table. Select * from nextkey where key_name = ‘usereng_user_eng_id’; KEY_NAME KEY_SEQ_NUM —————————— ———– usereng_user_eng_id 207 –After running the above statement, look for the KEY_SEQ_NUM value. In this case, it is 207. This means you will need to insert into the USERENG table a USER_ENG_ID higher than the number returned, in this case, 208 (this number will be used later).. This will ensure that no duplicate data is added into the usereng table.INSERT INTO USERENG (USER_ENG_ID, USER_ID, NAMED_USER_FLAG, DB_ENGINE_TYPE) VALUES (208, 73, ‘Y’, ‘PM’); –where 208 is from the nextkey table, 73 is from the users table –where ‘Y’ is for a named user license. If you have concurrent licenses, you will need to replace this with a ‘N’ Then increment the nextkey table, so future inserts do not try to use the number assigned in above insert query update nextkey set key_seq_num = 208 where key_name = ‘usereng_user_eng_id’; –where ‘PM’ is to gain access to Project Management Then delete the row from the usereng table that references the user who originally had the license. DELETE USERENG WHERE USER_ID = (SELECT USER_ID FROM USERS WHERE USER_NAME = ‘admin’) AND DB_ENGINE_TYPE = ‘PM’ |