def METHOD_NAME():
    setup_db()
    print "================="
    print "Updating Symbolic Links"
    q = """select cr.id as rev_id,
                    ccon.id as content_id,
                    ccon.contents,
                    cr.CONFIG_INFO_ID as info_id,
                    cf.id as file_id,
                    cc.org_id,
                    wc.name as org_name,
                    ci.SELINUX_CTX as selinux,
                    cfn.path as path,
                    ci.SYMLINK_TARGET_FILENAME_ID as info_target,
                    nvl( (select path from rhnCOnfigFileName where id = ci.SYMLINK_TARGET_FILENAME_ID), 'None') as name_target
           from rhnConfigContent ccon
            inner join rhnConfigRevision cr on cr.config_content_id = ccon.id
            inner join rhnConfigFile cf on cr.CONFIG_FILE_ID  = cf.id
            inner join rhnConfigFileName cfn on cfn.id = cf.config_file_name_id
            inner join rhnConfigInfo ci on ci.id = cr.CONFIG_INFO_ID
            inner join rhnConfigChannel cc on cf.CONFIG_CHANNEL_ID = cc.id
            inner join web_customer wc on cc.org_id = wc.id
            where
            cr.CONFIG_FILE_TYPE_ID in (select id from rhnConfigFileType where label='symlink')"""
    h = rhnSQL.prepare(q)
    h.execute()
    results = h.fetchall_dict()
    if not results:
        print "Update completed."
        print "================="
        return
    contents = []
    for row in results:
        contents.append( dict(revision_id = row["rev_id"],
                    file_id = row ["file_id"],
                   info_id = row ["info_id"],
                   content_id = row ["content_id"],
                   path = row['path'],
                   info_target = row['info_target'],
                   name_target = row['name_target'],
                   selinux = row['selinux'],
                   org_id = row['org_id'],
                   org_name = row['org_name'],
                   symlink_target = rhnSQL.read_lob(row["contents"])))
    update_query = """update rhnConfigRevision set config_info_id =
        lookup_config_info(null, null, null, :selinux, lookup_config_filename(:symlink_target)) where id = :revision_id"""
    null_symlink_update_query = """update rhnConfigRevision set config_info_id =
        lookup_config_info(null, null, null, :selinux, null) where id = :revision_id"""
    update_cr = """ update rhnConfigRevision set config_content_id = null where id = :revision_id"""
    delete_content = """ delete from rhnConfigContent where id = :content_id"""
    format = """
    Path: [%(path)s]
    Symbolic link:[%(symlink_target)s]
    Update URL: https://<FQDN>/rhn/configuration/file/FileDetails.do?cfid=%(file_id)d&crid=%(revision_id)d
    Organization Id : [%(org_id)d]
    Organization Name : [%(org_name)s]
    """
    bad_items = list()
    for item in contents:
        if item['symlink_target'] is None:
            bad_items.append(item)
            rhnSQL.prepare(null_symlink_update_query).execute(**item)
        else:
            if not isabs(item['symlink_target']) or len(item['symlink_target']) >= 1024:
                bad_items.append(item)
                item['symlink_target'] = item['symlink_target'][:1024]
            rhnSQL.prepare(update_query).execute(**item)
        rhnSQL.prepare(update_cr).execute(**item)
        rhnSQL.prepare(delete_content).execute(**item)
        print format % item
    rhnSQL.commit()
    rhnSQL.closeDB()
    print "%d rows updated." % len(contents)
    print "Update completed"
    print "================="
    msg = """
    The following symbolic link paths are either null or not absolute or above 1024 characters in length.
    While entries have been added in the DB, the values have to be updated for them in the Web UI.
    Please go to the provided url, logging in as a user with config admin/org admin role in the specified organization
    and update the target path value accordingly.
    """
    if bad_items:
        print msg
        for item in bad_items:
            print format % item