[p]This chapter documents the [code]Utility[/code] section in Server Administration, which provides the administrator with tools for managing and maintaining the Lasso Professional Server server. This chapter describes the following: [/p]
- SQL Browser describes how to issue SQL queries to SQLite databases in the master site or specific child sites.
- Errors describes viewing and setting preferences for the Lasso error log.
- Threads describes how to view the threads that are currently running in Lasso.
[p]The [code]SQL[/code] section provides a Web-based interface that allows one to issue SQL queries to the SQLite databases which store the settings for the master site or any of the child sites. [/p]
[p]The [code]SQL Browser[/code] page is where SQL statements can be entered. The results of the query will be presented at the bottom of the page with one column for each field that is returned. The results could contain actual field data from a database search, or could contain synthetic field data which is generated by the database in order to format the results of various SQL statements and functions. [/p]

- Select a site from the [code]Site[/code] pull-down menu and a database from the [code]Database[/code] pull-down menu.
- Enter a SQL query in the [code]SQL Statement[/code] field.
- [code]3[/code] Select the [code]Issue SQL Statement[/code] button. The results of the statement are shown in the lower panel, which by default shows [code]No Statement Issues[/code].
[p]The last ten statements entered into the [code]SQL Statement [/code]field will be displayed in a pull-down menu that appears to the right of[code] History[/code]. In order to issue a statement stored in the [code]History[/code] pull-down menu, simply select the statement from the pull-down menu, and it will automatically appear in the [code]SQL Statement[/code] field. Then select [code]Issue SQL Statement. [/code][/p]
[p]Selecting the Export area in the sidebar allows the results of a [code]SELECT[/code] statement to be exported. Setting one or more options and then selecting Export Results will result in a text file being sent to the browser containg the current result set. [/p]
- Format – Specifies what format the export should be in. Options include [code]Tab Delimited[/code], [code]Comma Delimited[/code], [code]SQL Inserts[/code], or or [code]XML Data[/code].
- Field Names – Specifies whether field names should be included as the first line of tab or comma delimited files. For XML data this preference controls whether field names are used as the tag names surrounding each field value or if a generic field container is used.
- Line Endings – Sets the line endings for the export to [code]n[/code], [code]r[/code], or [code]rn[/code].
[p]Selecting the[code] Options[/code] area in the sidebar allows the following options to be set: [/p]
- Show Fields – Allows the maximum number of fields displayed in the results to be selected. The options are [code]4 Fields[/code], [code]8 Fields[/code], [code]12 Fields[/code], [code]16 Fields[/code], and [code]All Fields[/code]. If more than eight fields are selected, then the results panel will expand to the right to accommodate the extra fields.
- Max Records – Allows the maximum number of records displayed in the results to be selected. The options are [code]10 Records[/code], [code]25 Records[/code], [code]50 Records[/code], [code]75 Records[/code], [code]100 Records[/code], and [code]All Records[/code].
- Max Field Lines – Allows the maximum number of lines of text to be displayed per field in the results to be selected. One line consists of approximately 20 characters horizontally. The options are [code]1 Lines[/code], [code]4 Lines[/code], [code]7 Lines[/code], [code]10 Lines[/code], and [code]All Lines[/code]. Selecting [code]All Lines[/code] will display the entire contents of the field.
- Submit on Return – If this option is set then a return in the [code]SQL Statement[/code] field will submit the statement.
[p]The [code]Errors[/code] section allows the administrator to view and delete errors, warnings and details that have been logged both internally in Lasso Professional Server and via the [code][Log][/code] tag, as well as set global logging options. For more information on the [code][Log][/code] tag, see the Files and Logging chapter in the Lasso 8. Language Guide. [/p]
[note][b]Important: [/b]Configuring error logging in Server Administration is not the same thing as configuring page-level error handling, such as for syntax errors and security errors. Page-level error handling is described in the Error Reporting chapter of the Lasso 8.5 Language Guide. [/note]
[p]The [code]Lasso Errors[/code] page lists all errors and system messages stored in the [code]lasso_global[/code] database. Errors and system messages can also be deleted within this interface. [/p]

[p]The[code] Lasso Errors [/code]page contains a list of all error messages received by their date, time, level, and message. The list is navigable via the[code] Prev[/code] and [code]Next [/code]buttonsin the sidebar. [/p]
[p]The[code] Level[/code] pull-down menu allows messages to be filtered by level, which includes [code]Critical Errors[/code], [code]Warnings[/code], [code]Details[/code], [code]Action Statements[/code], and [code]Deprecated[/code]. Each error level is described individually in the following Error Log Setup section. Individual Lasso page and database errors are not logged here, but are rather controlled using the [code][Error…][/code] tags. For more information, see the Error Control chapter in the Lasso 8.5 Language Guide. [/p]
[p]Selecting one of the[code] Delete All Errors [/code]button deletes all errors either in the current selected category or in the entire queue [/p]
[p]The [code]Setup[/code] page allows the administrator to set global logging options for Lasso Professional Server. These logging options are not limited to errors, and any feedback that occurs within the Lasso Service console can be logged for display in the [code]Lasso Errors[/code] page. [/p]

[p]The [code]Error Setup[/code] panel allows the administrator to set unique log routing for the five log levels: [/p]
- Critical Errors – This includes fatal errors that affect the overall functionality of Lasso Professional Server. This can include startup errors, module and connector errors, and system-related errors that cause Lasso Professional Server not to function properly.
- Warnings – This includes non-fatal errors that do not affect the overall functionality of Lasso Professional Server, but the administrator should be aware of. This can include non-fatal startup errors, duplicate module or connector errors, SQL status errors, and logging errors.
- Details – This logs all processes performed by Lasso Service, which are not limited to errors.
- Action Statements – This logs all SQL statements generated by inline database actions.
- Deprecated – This logs warnings when deprecated tags or other functionality are used. Any deprecated tags or functionality may not be supported in a future version of Lasso.
- For each feedback type, the administrator can choose to log or display feedback in any of the following three places:
- Lasso Service Console – If selected, feedback will be displayed in the Lasso Service console window when Lasso Service has been started as an application. For more information on starting Lasso Service as an application, see the configuration chapters of this guide.
- Error Database – If selected, feedback will be logged to the [code]_Errors[/code] table in the [code]Lasso_Internal[/code] database and displayed in the [code]Lasso Errors[/code] page in Server Administration.
- [note][b]Note: [/b]The _Errors table will store a maximum of 10,000 records. Once this limit has been reached, the oldest records will automatically be deleted. [/note]
- LassoErrors.txt – If selected, feedback will be logged to the [code]LassoErrors.txt[/code] file in the [code]Lasso Professional Server[/code] folder in the hard drive.
[p]Options are changed by checking or unchecking the desired values in the [code]Error Setup[/code] panel and selecting the [code]Update[/code] button. The [code]Reset[/code] button returns all options to their default values. Selecting the [code]Refresh [/code]button reloads the[code] Setup[/code] page with its currently stored values. [/p]
[note][b]Note: [/b]For information on how to programmatically log custom data to the logs described above, see the Files and Logging chapter in the Lasso 8.5 Language Guide. [/note]
[p]The Threads page allows the threads that are currently running in Lasso Server Administration to be viewed. One thread always represents the page load which is generating the threads display. The only thread that will usually be running is the SQLite sessions manager. [/p]
