sp_configure includes syntax options for using configuration files.
sp_configure "configuration file", 0, "subcommand", "file_name"
“configuration file” – including quotes, specifies that this command uses the configuration file.
0 – required—for backward compatibility—after the configuration file parameter.
“subcommand” – is one of:
write – creates a file named file_name with the current configuration. If file_name already exists, a message is written to the error log; the existing file is renamed using the convention server_name.001, server_name.002, and so on. If you have changed a static parameter, but you have not restarted your server, write displays the currently running value for that parameter. If you do not specify a directory with file_name, the file is written to the directory from which SAP ASE was started.
read – performs validation checking on values contained in file_name and reads those values that pass validation into the server. If any parameters are missing from file_name, the current values for those parameters are used.
If the value of a static parameter in file_name is different from its current running value, read fails and a message is printed. However, validation is still performed on the values in file_name.
verify – performs validation checking on the values in file_name. This is useful if you have edited the configuration file, as it prevents you from attempting to configure your server with invalid configuration values.
restore – creates file_name with the most recently configured values. If you have configured static parameters to new values, this subcommand writes the configured, not the currently running, values to the file. This is useful if all copies of the configuration file have been lost and you must generate a new copy. If you do not specify a directory with file_name, the file is written to the directory from which SAP ASE was started.
file_name – specifies the configuration file to use in conjunction with any subcommand. If you do not specify a directory as part of the file name, the directory where SAP ASE was started is used.
sp_configure "configuration file", 0, "read", "srv.config"
sp_configure "configuration file", 0, "write", "my_server.config"