Intermittent Query Issues: Stuck in Provisioning Rules

Hi everyone,

I am having an issue with provisioning of any type—modify, create, or disable—and when any of the provisioning rules are executed, the logic may work correctly or it might get stuck during the update of one of the queries. If it gets stuck, the logs show the printf output just before one of the queries, but it stays there until a timeout occurs and then jumps to the catch and finally, for example…

try {
    System.out.println("START INSERT");

    String insertSQL = "INSERT INTO DTUSDS (NAME, NOMB, TFNO, USDSTFEX, DEPT) VALUES (?,?,?,?,?)";
    PreparedStatement statement = connection.prepareStatement(insertSQL);
    statement.setString(1, name);
    statement.setString(2, firstName);
    statement.setString(3, telephone);
    statement.setString(4, tfnoExtra);
    statement.setString(5, department);
    statement.executeUpdate();
    statement.close();

    System.out.println("FINISH INSERT");
} catch (SQLException e) {
    System.out.println("WE ARE IN THE CATCH");
    e.printStackTrace();
    result.setStatus(ProvisioningResult.STATUS_FAILED);
} finally {
    if (connection != null) {
        connection.close();
    }
    if (st != null) {
        st.close();
    }
}

For SELECT queries, I also use this format:

System.out.println("START SELECT");

String query = "SELECT CDDE FROM TABLE WHERE ZONE = (SELECT ZONE FROM TABLE WHERE DSDE = '"+delegations+"')";
ResultSet rs = st.executeQuery(query);

while (rs.next()) {
    String value = rs.getString("CDDE");
    List.add(value);
}
System.out.println("FINISH SELECT");

rs.close();

But the result is the same in both cases; sometimes everything works perfectly, and other times it gets stuck in one of the queries of the rules. I wanted to know if I might be missing something in the code, although I believe the code is fine since when everything runs, it works as expected. Or, on the other hand, it could be a problem with the database…

Thanks and regards,
Antonio.

It’s likely that the issue lies in the database if it’s intermittent. The data being inserted might be causing the problem, so I recommend verifying that you can consistently execute the same queries directly in the database and adjust accordingly.

Additionally, I noticed that you’re closing your connection in the provisioning rules. This might not be necessary, as the connector typically handles that automatically. However, I could be mistaken, so it’s worth reviewing the connector documentation to confirm.

Hi @nbhansali

Thank you for your response. This could be correct, but the issue also occurs during SELECT queries where no data is being inserted. I have tested executing the same query directly from SQL Developer, and it returns the results correctly.

@AntonioGvtt is there a potential for a network issue or are you able to re-create the issue connected to a local database?

@nbhansali It’s possible that there is a network issue, but I’m not sure how it could be demonstrated, as the issue may not be coming from SailPoint, but from the client’s database. In my case, I wouldn’t be able to test with a local database since we don’t have one available.

Depending on what database it is - I would also look to a DBA for if there are enough number of connections allowed or some other configurations that are in place on the database side. In terms of IIQ, I don’t think there is anything glaring at me based off what you have sent over above, especially if the issue is intermittent.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.