# SQLGrammarException

**URL:** <https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861>\
**Category:** IIQ Discussion and Questions\
**Tags:** webservice-connector, identityiq\
**Created:** [April 18, 2024, 11:08pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861 "2024-04-18T23:08:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![charan18](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@charan18](https://developer.sailpoint.com/discuss/u/charan18)\
**Post date:** [April 18, 2024, 11:08pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/1 "2024-04-18T23:08:03Z")

</div>

### Which IIQ version are you inquiring about?

Version 8.4

### Share all details related to your problem, including any error messages you may have received.

Hi Community,

I have set up a Web services application, on running the aggregation I’m getting the below error please enlighten me what’s the error is about…

Error1: org.hibernate.exception.SQLGrammarException: could not execute statement

Error2: Exception during aggregation of Palma, Bernadette. Reason: org.hibernate.exception.SQLGrammarException: could not execute statement

---

<div class="post-metadata">

**Author:** ![iamksatish](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamksatish/32/26217_2.png) [@iamksatish](https://developer.sailpoint.com/discuss/u/iamksatish)\
**Post date:** [April 19, 2024, 1:58am UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/2 "2024-04-19T01:58:38Z")

</div>

This happens either one of the account level attribute or group attribute (searchable attribute) is having length more than the defined length in DB

Can you try one thing , uncheck promote managed attributes in the account aggregation task and run and see if this is happening?

Post that you may have to increase the length of db column.

---

<div class="post-metadata">

**Author:** ![charan18](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@charan18](https://developer.sailpoint.com/discuss/u/charan18)\
**Post date:** [April 19, 2024, 1:47pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/3 "2024-04-19T13:47:07Z")

</div>

Hi Satish,

Promote managed attributes is unchecked and still getting the same error over multiple users when I’m running the aggregation.

This is happening only with few users not with all.

---

<div class="post-metadata">

**Author:** ![iamksatish](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamksatish/32/26217_2.png) [@iamksatish](https://developer.sailpoint.com/discuss/u/iamksatish)\
**Post date:** [April 19, 2024, 1:50pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/4 "2024-04-19T13:50:20Z")

</div>

@charan18  
Do you have the list of users and target data for those users? It is most likely because of the same reason I mentioned above, if you analyze the data for users for which it is failing we can find it.

---

<div class="post-metadata">

**Author:** ![charan18](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@charan18](https://developer.sailpoint.com/discuss/u/charan18)\
**Post date:** [April 19, 2024, 1:55pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/5 "2024-04-19T13:55:18Z")

</div>

I have only 4 attributes in this application

1. Employee id 6-character string,
2. OnCallToday the value is either Yes or No.
3. OnCallTomorrow the value is either Yes or No.
4. IncentiveOnCall the value is either Yes or No.

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/2/2a3e95cb008eb30a4efed7453d984e96e9bfed19.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/3/30631836e2d47e138b8a02f28a165924ebacecf8.png)

please see the account aggregation, and task result snippets I have attached.

---

<div class="post-metadata">

**Author:** ![iamksatish](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamksatish/32/26217_2.png) [@iamksatish](https://developer.sailpoint.com/discuss/u/iamksatish)\
**Post date:** [April 19, 2024, 2:00pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/6 "2024-04-19T14:00:55Z")

</div>

For this failed user , did you check the target data for attributes in schema, is everything good like native identity, Display name of the account.

---

<div class="post-metadata">

**Author:** ![charan18](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@charan18](https://developer.sailpoint.com/discuss/u/charan18)\
**Post date:** [April 19, 2024, 9:16pm UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/7 "2024-04-19T21:16:21Z")

</div>

Hi @iamksatish I just saw that this account aggregation is working fine in one of the environments and not in lower environment anything with specific to environment which could cause this?

---

<div class="post-metadata">

**Author:** ![iamksatish](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamksatish/32/26217_2.png) [@iamksatish](https://developer.sailpoint.com/discuss/u/iamksatish)\
**Post date:** [April 20, 2024, 3:11am UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/8 "2024-04-20T03:11:33Z")

</div>

@charan18  
Is the data or target connected from prod and non-prod are both same , if not definitely this error would be because of the data that is being aggregated as mentioned above

I think some test data of accounts which are larger than expected data size within IIQ, also are both your IIQ environments have properties related to link, managed attribute and other objects.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [June 19, 2024, 3:11am UTC](https://developer.sailpoint.com/discuss/t/sqlgrammarexception/52861/9 "2024-06-19T03:11:44Z")

</div>

Closed on June 19, 2024, 3:11am UTC

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