Skip navigation

Change Configuration Options Using a T-SQL Stored Procedure and a .config File

In SQL Server, there are several ways to change a server's configuration options, but they all have drawbacks. For example, you can use a GUI such as SQL Server 2005's SQL Server Management Studio (SSMS), but you can't use it to programmatically change server configuration options. Alternatively, you can use the sp_configure system stored procedure, but you can change only one configuration option each time you execute sp_configure.

Wanting to programmatically change many configuration options without having to execute sp_configure numerous times, Eli Leiba came up with a different approach: List all the configuration options to be changed in a configuration (.config) file and use a stored procedure to apply those changes. Learn about Eli's technique and download his T-SQL stored procedure, sp_ConfigureFromFile, in the article "Change Many Server Configuration Options in One Fell Swoop."

TAGS: SQL
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish