# SQL view and Tracked Entity Relationship

**URL:** <https://community.dhis2.org/t/sql-view-and-tracked-entity-relationship/56293>\
**Category:** Support - Assistance technique\
**Tags:** tracker, analytics, api\
**Created:** [20 December 2023 20:05 UTC](https://community.dhis2.org/t/sql-view-and-tracked-entity-relationship/56293 "2023-12-20T20:05:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jason](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jason/32/32739_2.png) [@jason](https://community.dhis2.org/u/jason)\
**Post date:** [21 December 2023 10:41 UTC](https://community.dhis2.org/t/sql-view-and-tracked-entity-relationship/56293/2 "2023-12-21T10:41:23Z")

</div>

Hi @JohnasSolomon  
One way is by disabling the restrictions on the protected tables in the dhis.conf configuration file.

```auto
system.sql_view_table_protection = on | off

```

This obviously comes with security risks, but it is one way.

The other way, which I would recommend would be the approach outlined by @Calle_Hedberg [here](https://community.dhis2.org/t/sqlview-protected-tables/33930/2). At least with this route, you do not open potential access to all of the protected tables.

Regards,  
Jason

---

_[View the full topic](https://community.dhis2.org/t/sql-view-and-tracked-entity-relationship/56293)._
