Home > Articles > Data > SQL Server

SQL Server Scripted Configuration: Part 2

  • Print
  • + Share This
By scripting the installation of SQL Server, administrators and SQL DBAs can ensure a consistent deployment of SQL Server, every time! No more cheat sheets or how-to documents and a world free of tombs of documentation. Sound too good to be true? Rob Hawthorne shows you how to make your life easier by using a small self-documenting batch file.
Like this article? We recommend

The deployment and configuration of software can be a real nightmare to standardize; each administrator has his own ideas of best practice, even with checklists (or cheat sheets). In this series of articles, Rob Hawthorne discusses the unattended installation of SQL Server, and then drills down to writing your own scripts to install SQL Server, ensuring a standard and consistent deployment every time!

Hands-Off Deployment of SQL Server

In the first article of this series, we took a look at how to record a SQL Server unattended (.iss) file and then launch the installation of SQL Server, specifying the .iss file as the source of information for the installation.

"So what now?" you may ask. Well, now we get into the fun stuff: creating an automated way of installing SQL Server via a script. In the next couple of articles, we will create a couple of scripts, one for the initialization of all of our variables (a wrapper script) and then the script that will generate the .iss file and install SQL Server. In this article, we will look specifically at the second script (that is, the one that installs SQL Server).


When I am talking about scripts, I am talking about DOS (or batch file) scripts. Although everything I have written here could easily be ported into Windows Scripting Host (WSH), I prefer batch files. Batch files are very simple (both administrators and developers usually have the skills to maintain them), and generally contain a lot less complexity than WSH scripts.

Figure 1 shows a basic process flow of the way our initial scripts will work.

Figure 5Figure 1 Showing the process flow for the scripts to silently install SQL Server.

So let's get into it then!

  • + Share This
  • 🔖 Save To Your Account