Parameters for using configuration files

The four parameters described below can be used with configuration files.

write – creates file_name from the current configuration. If file_name already exists, a message is written to the error log; the existing file is renamed using the convention file_name.001, file_name.002, and so on. If you have changed a static parameter, but you have not restarted your server, write gives you 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 Adaptive Server 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 will write 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 need to generate a new copy. If you do not specify a directory with file_name, the file is written to the directory from which Adaptive Server was started.

Examples

Example 1 Performs validation checking on the values in the file srv.config and reads the parameters that pass validation into the server. Current run values are substituted for values that do not pass validation checking:

sp_configure "configuration file", 0, "read", "srv.config"

Example 2 Creates the file my_server.config and writes the current configuration values the server is using to that file:

sp_configure "configuration file", 0, "write", "my_server.config"

Example 3 Runs validation checking on the values in the file generic.config:

sp_configure "configuration file", 0, "verify", "generic.config"

Example 4 Writes configured values to the file restore.config:

sp_configure "configuration file", 0, "restore", "restore.config"