Read or Write the Configuration File with sp_configure

sp_configure includes syntax options for using configuration files.

The syntax is:
sp_configure "configuration file", 0, "subcommand", "file_name"
where:

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"