TOC & Recently Viewed

Recently Viewed Topics

Shortcuts for Running SQL Commands and Scripts

After logging in to a console window and invoking:

source /opt/lce/tools/

A reminder banner will appear:

USAGE of the enabled shortcuts:


psqlc "<a SQL command>"


psqlf <path to script with SQL commands> [<arg1> [<arg2> [...]]]




Invokes interactive prompt. Note that you can also invoke SQL scripts

from within the interactive prompt, like so: \i <path to script>


; you will then be prompted for script args.

The psqlf shortcut is useful for easily running the various SQL scripts packaged with LCE and found under /opt/lce/tools/pg-helper-sql/. Assuming you are in /opt/lce/tools/ directory, here is an example of running a SQL script that takes no arguments:

psqlf pg-helper-sql/table-sizes.sql

And here is an example of running a SQL script that takes an argument:

psqlf pg-helper-sql/disk-usage-one-silo.sql 0

The individual SQL scripts relevant to administration and to troubleshooting or performance tuning will be summarized in the Tools section.

Copyright © 2019 Tenable, Inc. All rights reserved. Tenable,, Tenable Network Security, Nessus, SecurityCenter, SecurityCenter Continuous View and Log Correlation Engine are registered trademarks of Tenable, Inc.., Lumin, Assure, and the Cyber Exposure Company are trademarks of Tenable, Inc. All other products or services are trademarks of their respective owners.