Symptoms

Task Change password of user 'USER_ID' on database servers fails with following last execution output:

There is no such database user, user_id=USER_ID.

Cause

There is a database inconsistency, might be caused by cancelling/deleting or manual interventions.

Resolution

This issue appeares as result of the fact that aforementioned database was not properly created due to the removal of user for this database before database creation was finished.

  1. To resolve this issue add a new user to the affected database using API method pem.createDatabaseUser:

    curl -d"<?xml version='1.0'?><methodCall><methodName>pem.createDatabaseUser</methodName><params><param><value><struct><member><name>db_id</name><value><int>DB_ID</int></value></member><member><name>user</name><value><string>DB_USER_NAME</string></value></member><member><name>password</name><value><string>*****</string></value></member></struct></value></param></params></methodCall>" http://localhost:8440
    

    Replace DB_ID with required database id, DB_USER_NAME with required database user name.

  2. Then reschedule failed task with new value for 'dbo.param.user_id' using API method pem.tasks.rescheduleTask:

    <?xml version='1.0'?>
    <methodCall>
    <methodName>pem.tasks.rescheduleTask</methodName>
    <params>
    <param>
        <value>
        <struct>
            <member>
            <name>task_id</name>
                <value>
                <i4>TASK_ID</i4>
                </value>
                </member>
            <member>
            <name>params</name>
                <value>
                <array>
                <data>
                <value>
                    <struct>
                        <member>
                        <name>name</name>
                            <value>
                            <string>dbo.param.user_id</string>
                            </value>
                            </member>
                        <member>
                        <name>value</name>
                            <value>
                            <string>DB_USER_ID</string>
                            </value>
                            </member>
                        </struct>
                        </value>
                    </data>
                </array>
                </value>
                </member>
                </struct>
            </value>
        </param>
        </params>
    </methodCall>
    

    Replace TASK_ID with required Task id, DB_USER_ID with newly added user id.

  3. This task could fail with the following entries:

    MySQL API error: Duplicate entry 'DB_NAME-DB_USER_NAME' for key 'PRIMARY'
    

    This error was caused by the duplicate entries in MySQL database. These duplicate entries appeard due to the fact that records regarding this user was added into MySQL database when it was added with API method, and OA tried to add same user again during execution of the DB creation task. Please contact Odin Technical Support to resolve this issue.

Internal content

Link on internal Article