- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:19 AM
Getting something similar to the following for scripts run through the "Scripts - Background" module:
Time: 0:00:00.002 id: <instance name redacted>[glide.10] for: SELECT task0.`sys_id` FROM task task0 WHERE task0.`sys_class_name` = 'sc_req_item'....
It seems the equivalent SQL is being output for every GlideRecord DB transaction. Thoughts?
Thanks,
Scott
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 04:32 PM
Do you have the glide.db.trace property set to true in your instance? (check the sys_properties table)
If it doesn't exist, try adding it and setting it to type boolean or string with value "false"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:24 AM
Have you tried disabling debugging?
System Diagnostics> Session Debug> Disable All
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:41 AM
Indeed. Several times and nothing. The SQL debugging output is not being displayed anywhere else but scripts.
Also, this is happening for all admins who run scripts in "Scripts - Background".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:56 AM
Hi Scott,
More details please - so I can try to reproduce it. I'm unable to now. I'm using Helsinki P1 and tried the following simple script and did not see any log messages.
var inc = new GlideRecord('incident');
inc.query();
gs.print(inc.getRowCount() + ' records found');
Please provide details of what you are doing (script and SN version are a good start) so I can try to reproduce it. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 07:06 AM
Current version: Fuji P12.
The script is simple. Just looking up a journal entries of some records on sc_req_item. The behavior is present on every script that is run in "Scripts - Background". Even something as simple as:
var gr = new GlideRecord('incident');
gr.query();
Output:
[0:00:00.578] Script completed in scope global: script
Time: 0:00:00.007 id: <instance name redacted>[glide.9] for: SELECT task0.`sys_id` FROM task task0 WHERE task0.`sys_class_name` = 'incident'
I can only reproduce this on one of our instances (they are all on Fuji P12).
Thanks,
Scott