You can query the database if you are a site administrator or have been given access to System Tools by another site administrator.

You can raise a database query using the Admin > System Tools > Ad Hoc Database Query page.

  1. Select Admin > System Tools > Ad Hoc Database Query from the menu.

  2. Select one of the following data store options on the Ad Hoc Database Query page:
    • Operational Datastore
    • Datamart
    • Baseline
    • WEBR
  3. Type the “select” query and click Run Query.

    Ad Hoc Database Query against selected database

    The query is executed against the selected data store and the results are dispayed.

    You can submit read-only queries of the format:


    You can use the following special keywords while drafting the query:

    • “\d” or “show tables” - To list all the tables.
    • “\d <table name> - To view the description of a specific table.
    • “select * from <table name> - To view all the contents of a specific table.

For security reasons, the sfuser and password_history tables of the operational data store are restricted from being queried from the Admin > System Tools > Ad Hoc Database Query page. Alternatively, use the following views, sfuser_view and password_history_view, for retrieving all other data but passwords.


Tags for this page: ctf_19.3 site_admin_tasks