Browse DevX
Sign up for e-mail newsletters from DevX


ADS Enables "Hands Off" SQL Server Installs

Does setting up SQL Server on multiple servers mean running setup.exe over and over? No, it doesn't. With the ADS Controller, you can deploy SQL Server to many servers at once, without having to visit each machine individually.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

icrosoft's free server tool, ADS (Automated Deployment Services), provides system administrators with a consistent way to deploy the Windows OS, but what about RDBMS deployment? Does setting up SQL Server on a number of servers mean you have to run setup.exe again and again, specifying the same parameters each time? No, it doesn't.

This article demonstrates how to configure ADS to install SQL Server 2000—without having to run setup.exe! The best part is, with the ADS Controller, you can deploy SQL Server to multiple servers at once, without having to visit each machine individually.

Before following this tutorial, you should have ADS installed and working to deploy OS images ("snapshots" of an operating system, not GIFs or JPEGs), and your image should contain the ADS Administration Agent (the agent that resides at the OS level). The ADS Quick Start Guide (bundled with the product) is an excellent reference for installing and configuring ADS. Optionally, installing the ADS Administration Agent under a domain-level account would be easier than using LocalSystem. This isn't mandatory, but the article is tailored to using a domain account rather than a system account to enable the ADS Administration Agent to use UNC paths without having to map drives.

Guidelines for the Environment
Much of the instruction in this article involves code—mainly, command statements and XML—that enables ADS to run jobs and install SQL Server. It assumes you have some experience writing XML and understand general command-line syntax. It won't discuss the code in any great depth; the code merely serves as a reference point to get you started. Embedded comments in the code explain anything that may not be quite clear.

You also have to excuse my fondness for command-line code. While the batch files this article uses could easily be ported to Windows Script Host (WSH), I prefer command files. They're just a little cleaner, and they generally require only a couple of simple commands rather than a lot of extraneous checking and error handling. Luckily, ADS handles errors well.

Each XML file (called job sequences) has an intro section that provides information such as who wrote the job, what purpose it serves, its current version number, the changes made, etc. These details make maintenance easier and reduce the overhead required to manage the jobs in the future.

The article begins with a job sequence that has simple syntax, and contains hard-coded values. However, to demonstrate the capabilities and flexibility of ADS, the job sequences will get progressively complex. Since I'm not a fan of hard-coded values in the job sequences anyway, I use ADS's native functionality to replace parameters where these values are required. Once again though, this is just the framework you need to get your scripts up and running, so don't feel constrained in any way from customizing the process.

All in all, the environment has the following requirements:

  • Install SQL Server 2000 (and SP3a) on a Windows Server 2003 machine, which can be the Web, Standard, Enterprise, or Datacenter edition. This allows you to use the standard features of the ADS Administration Agent. Some of the agent's features are reduced for Windows 2000 Server, and the ADS Agent is not supported in the Windows desktop operating environments.
  • Have the ADS Administration Agent running under a domain-level account (however, this does not have to be a domain administrator account), which allows easier access to network resources. If you choose not to use a domain account, be sure to map your drive first whenever you have to access a network resource. You can use the following command:

    net use <driveletter>: \\<servername>\<sharename> /u:<domainname>\<username> <password>

    • <driveletter> is the letter of the mapped drive (e.g., s:).
    • <servername> is the name of the server to which you are mapping a drive.
    • <sharename> is the name of the share to which you are mapping a drive.
    • <domainname>\<username> is the domain and username of an account that has access to the shared resource.
    • <password> is the password for the username that has access to the shared resource.
  • Have the SQL Server Media available on a network share. You can have this share on the ADS Controller or any other server in the environment. However, you must make sure that the user that the ADS Administration Agent is running under has at least read access to the share.

Additionally, the following are the job sequences you will create, from the simplest to the most complex:

  • Job 1 (InstallSQL1.xml) installs SQL Server and SP3a by specifying a basic .iss file (the one included on the SQL Server media) for SQL Server 2000. This demonstrates the ability to quickly deploy SQL Server to your registered devices.
  • Job 2 (InstallSQL2.xml) is an extension of InstallSQL1.xml. It shows you how to install SQL Server 2000 by using a more dynamic approach and the built-in tools of ADS. This example swaps values for specific variables that your devices have registered.
  • Job 3 (SQLReconfigure.xml) provides the framework you need to incorporate the command files that I wrote about in the article "Scripted Configuration for SQL Server".

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date