2020-09-14 17:48:18
Topic starter
I want to change the UI type from Neo to CC (or vice versa), but I want to do it administratively through the DB, not through the user interface. How can i do it?
The user's UI Type selection lives in the BLOB column USERS.PREF_PROP_LIST.
If this column is null, you can initialize it to Neo with the following:
update users set PREF_PROP_LIST =
UTL_RAW.CAST_TO_RAW('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><UserPrefPropertyList xmlns="http://www.onenetwork.com/Platform"><UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty></UserPrefPropertyList>')
where user_name = 'usernamegoeshere';
You can likewise switch from Neo to CC like this:
update users
set pref_prop_list = blob_replace(PREF_PROP_LIST, '<UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty>', '<UserPrefProperty PropertyType="UI_TYPE">CC</UserPrefProperty>')
where user_name = 'usernamegoeshere';
and vice-versa, from CC to Neo like this:
update users
set pref_prop_list = blob_replace(PREF_PROP_LIST, '<UserPrefProperty PropertyType="UI_TYPE">CC</UserPrefProperty>', '<UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty>')
where user_name = 'usernamegoeshere';
These queries only work if the user has a UI_TYPE entry to begin with. If that prop is missing from the PRES_PROP_LIST, you may have to construct a new query to insert it into the existing BLOB.