Writing HTML to an External File

You can write HTML generated query plan and execution statistics to a file in a specified directory.

The naming convention of the file is a combination of the user name, SPID, and the timestamp. Once a directory name is specified, you can turn the option off and then on again and resume writing to the named directory. If a directory name is not previously specified, HTML files are not generated.

This example turns on writing to an external file, and writes the HTML files to the directory /usr/john/HTML:

set statistics plan_directory_html "/usr/john/HTML" 
go
set statistics plan_directory_html on
go

The directory provided must exist on the machine where the server is started. If you do not specify an absolute path, the relative path is taken from where the server was started.

Related concepts
set