The "DBMS Output" pane shows the output which a [[Invantive UniversalSQL/Grammar/Statement Types/PSQL Block|PSQL block]] writes with `dbms_output.put_line`, in the order it was written and with the moment of writing, in UTC, in front of each line. The pane belongs to the query tab in use, so each query tab keeps its own output:
![[20261007-qtm-dbms-output.png]]
## Which Tab Receives the Output
The connection reports output without saying which statement wrote it. The output is therefore added to the query tab which is executing. When several query tabs execute at the same time, it goes to the query tab in use.
Output which arrives while another pane is in front is counted in the title of the pane, for instance "DBMS Output (3)". The count disappears when the pane is brought to the front.
## Switching It On
Collecting the output is on once a database is open. The button "DBMS Output" at the left of the toolbar of the pane shows whether it is on: a green dot while it is on, and a red circle while it is off. Output written while it is off is not kept, so it is switched on before the statement is executed rather than afterwards.
"Clear Output" empties the pane.
## Large Output
The pane keeps working with a million lines of a thousand characters, and more, while the window stays responsive. Only the lines in view are read for drawing. The output itself is kept in a temporary file instead of in memory.
While the last line is in view, the pane keeps it in view as new lines arrive. After scrolling up, the pane stays at the same lines while the statement goes on writing. `Ctrl+End` (`⌘End` on MacOS) goes to the last line, which makes the pane follow the output again, and `Ctrl+Home` (`⌘Home`) goes to the first line.
A line is shown up to its first 10,000 characters and is not wrapped; a long line is read by scrolling sideways. "Copy" and "Save As..." still take the whole line.
## Copying
A line is selected by clicking it, and several lines by dragging or by clicking with the Shift key held down. The selection always consists of whole lines. The context menu holds "Copy" and "Select All", with the shortcuts `Ctrl+C` and `Ctrl+A` (`⌘C` and `⌘A` on MacOS). A selection of more than 50 million characters is not copied, since the clipboard cannot hold it well; "Save As..." writes such output to a file instead.
## Saving
The button "Save As..." writes the whole output to a text file. The dialog proposes the title of the query tab followed by `-dbms-output.txt`. The file is UTF-8 without a byte order mark and every line ends in CR LF. The file holds all lines, also those left out by "Show Only Matches". Saving runs in the background, so output of a gigabyte does not hold up the window.
## Searching
The search field on the toolbar finds the text in the output, irrespective of upper and lower case. The Enter key and the button with the arrow to the right select the next line which holds the text, and `Shift+Enter` and the button with the arrow to the left the previous one. After the last occurrence the search continues at the first. With nothing selected, the search starts at the first line in view. A text which occurs nowhere is reported as "Not found" at the right of the toolbar.
The switch "Show Only Matches" leaves out every line which does not hold the text instead of moving to it, and brings the whole output back when it is switched off or the field is emptied. Lines which arrive while it is on and hold the text are added.
See [[Limitations]] for what the pane does not offer in comparison with [[Invantive Query Tool/DBMS Output|Query Tool for Microsoft Windows]].