# Run Query required roles

**URL:** <https://forum.inductiveautomation.com/t/run-query-required-roles/39011>\
**Category:** Ignition\
**Tags:** database, ignition80, vision\
**Created:** [September 24, 2020, 8:22am UTC](https://forum.inductiveautomation.com/t/run-query-required-roles/39011 "2020-09-24T08:22:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [September 24, 2020, 8:22am UTC](https://forum.inductiveautomation.com/t/run-query-required-roles/39011/1 "2020-09-24T08:22:47Z")

</div>

Hi,

After update from 7.9 to 8.0.16 I have the error below in my main project :

> ERROR(500): Error executing function 'RunQuery': The current user does not have the required roles for this operation.  
> Client permission denied for user admin: key=legacy-db

So my client tag can't run an SQL query.  
Can you help me ? Is there any configuration to do in gateway ?

Thanks,

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 24, 2020, 11:02am UTC](https://forum.inductiveautomation.com/t/run-query-required-roles/39011/2 "2020-09-24T11:02:50Z")

</div>

> [@flavien](#):
>
> key=legacy-db

Look in your project's security properties and enable legacy database access.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 24, 2020, 2:16pm UTC](https://forum.inductiveautomation.com/t/run-query-required-roles/39011/3 "2020-09-24T14:16:41Z")

</div>

Phil’s answer is correct, but I find the error a bit odd - this should only be an issue for _new_ projects since Ignition 7.9.4. Existing projects from before 7.9.4 should have legacy database access by default.

---

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [September 25, 2020, 7:17am UTC](https://forum.inductiveautomation.com/t/run-query-required-roles/39011/4 "2020-09-25T07:17:00Z")

</div>

Thanks for your help. It works.
