# Audit selectivity

**URL:** <https://forum.inductiveautomation.com/t/audit-selectivity/4046>\
**Category:** Ignition\
**Created:** [February 22, 2012, 10:00pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046 "2012-02-22T22:00:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 22, 2012, 10:00pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/1 "2012-02-22T22:00:31Z")

</div>

Is it possible to desactivate the audit for some SQL statement called in python script.  
I use some script to import file in a database in BLOB with code like in the ignition doc :

`Examples
This code would prompt the user to choose a file. If the user chooses a file, it would then read that file and upload it to a database table called Files into a BLOB column called file_data.
path = system.file.openFile()
if path != None:
   bytes = system.file.readFileAsBytes(filename)
   system.db.runPrepUpdate("INSERT INTO Files (file_data) VALUES (?)", (bytes))`

The binarie code of the file is logged in the audit database and trigger an error because the action code is a varchar(255) in the audit table. I don’t want to log these kind of sql request. Is there a way to desactivate the audit for these request ???

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 22, 2012, 10:19pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/2 "2012-02-22T22:19:56Z")

</div>

No, there isn’t a way to turn off the auditing for a particular insert query. We need to add an argument to the runPrepUpdate function that would bypass the audit log. I will put a ticket in for that.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [May 25, 2012, 11:59am UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/3 "2012-05-25T11:59:39Z")

</div>

Do you know the version which wil have these functionnality ?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [May 25, 2012, 3:03pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/4 "2012-05-25T15:03:47Z")

</div>

No, I don’t know when this will get put into Ignition. The ticket is in but doesn’t have a timeline right now.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [June 7, 2012, 6:40pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/5 "2012-06-07T18:40:05Z")

</div>

I’ve slated the ticket against Ignition 7.5.0

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 29, 2012, 10:55am UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/6 "2012-11-29T10:55:00Z")

</div>

I would like to know if the fonctionnality is present in the 7.5.4 released ?  
in this case, what is the arg to use with the “system.db.runPrepUpdate”.

Regards.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [November 29, 2012, 5:00pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/7 "2012-11-29T17:00:28Z")

</div>

This [del]bug[/del] feature hasn’t been [del]fixed[/del] implemented yet, but it has high priority in our ticket system so it should be fixed soon. I can’t provide a definitive timeline, however.

---

<div class="post-metadata">

**Author:** ![ISDProj](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@ISDProj](https://forum.inductiveautomation.com/u/ISDProj)\
**Post date:** [November 29, 2012, 9:28pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/8 "2012-11-29T21:28:17Z")

</div>

I love the “edits” James, they kind of make me think I’m actually reading a forum for an OS from a certain major software company. 😃

I too would like the selective audit (even if it sounds like an oxymoron) but perhaps just an entry in the audit trail that doesn’t include the BLOB data would be beneficial.

Regards,

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [November 29, 2012, 9:34pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/9 "2012-11-29T21:34:53Z")

</div>

Well, it is true - it is technically a feature, I misspoke by saying it was a bug. Anyway, bottom line is it will be fixed soon.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 30, 2013, 5:48pm UTC](https://forum.inductiveautomation.com/t/audit-selectivity/4046/10 "2013-01-30T17:48:32Z")

</div>

This has been done for 7.5.6
