Can I change a Persistence type of a User Attribute field after it has been saved?

Version 5

    Generally the answer to this is no, after you have saved the Attribute you cannot go back and change the Persistence type on this.

     

    However this can be done by running a script towards the DataBase.


    Please note that you need to configure the below script to suit the attribute that you wish to change. You need to change the zzzzzz in the script below to the NAME of the business object and the xxxxxx in the script below to the NAME of the attribute you want to change the persistance type on.

     

    Also note that this should ONLY ever be done on an attribute that is a ONE TO ONE link to the USER Object

    For Date Attribute see here:

    http://community.landesk.com/support/docs/DOC-5809
    For Group Attribute see here:
    http://community.landesk.com/support/docs/DOC-27185

     

    If you run this script towards an attribute that is NOT a one to one link to the USER Object then you WILL corrupt your attribute and maybe even your DataBase.

     

    Please make sure that you take a fully restorable backup of your database before running this and that you also try on a test system first.

     

     

    This is for changing into a "CreateUser" Persistence:

    -------------------------------------------------
    update md_attribute_type set md_persistence_flags='8', md_is_readonly='1'
    where md_class_type_guid=(select md_guid from md_class_type where md_name='zzzzzz' )
    and md_name='xxxxxx'

    -------------------------------------------------

     

     

    This is for changing into a "UpdateUser" Persistence:

    -------------------------------------------------
    update md_attribute_type set md_persistence_flags='256', md_is_readonly='1'
    where md_class_type_guid=(select md_guid from md_class_type where md_name='zzzzzz' )
    and md_name='xxxxxx'

    -------------------------------------------------

     

     

    This is for changing into a "UpdateUser AND "CreateUser" Persistence:

    -------------------------------------------------
    update md_attribute_type set md_persistence_flags='264', md_is_readonly='1'
    where md_class_type_guid=(select md_guid from md_class_type where md_name='zzzzzz' )
    and md_name='xxxxxx'

    -------------------------------------------------

     

     

    This is for removing the Persistence Type:

    -------------------------------------------------
    update md_attribute_type set md_persistence_flags='0', md_is_readonly='0'
    where md_class_type_guid=(select md_guid from md_class_type where md_name='zzzzzz' )
    and md_name='xxxxxx'

    -------------------------------------------------