Difference between revisions of "Knowledge:Convert database users to ldap"
From OpenKM Documentation
(Created page with '===ORACLE=== For each user should create new user and delete older: <source lang="sql"> SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUE…') |
|||
Line 1: | Line 1: | ||
===ORACLE=== | ===ORACLE=== | ||
For each user should create new user and delete older: | For each user should create new user and delete older: | ||
+ | Create new user: | ||
<source lang="sql"> | <source lang="sql"> | ||
− | SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || ' | + | SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || 'newname' || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || USR_ACTIVE || ''');' FROM OKM_USER WHERE USR_ID='oldername'; |
+ | SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || 'newname'|| ''', ''ROLE' || UR_ROLE || ''');' FROM OKM_USER_ROLE where UR_USER='oldername'; | ||
</source> | </source> |
Revision as of 12:11, 4 October 2012
ORACLE
For each user should create new user and delete older: Create new user:
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || 'newname' || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || USR_ACTIVE || ''');' FROM OKM_USER WHERE USR_ID='oldername';
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || 'newname'|| ''', ''ROLE' || UR_ROLE || ''');' FROM OKM_USER_ROLE where UR_USER='oldername';