Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

ADS Enables "Hands Off" SQL Server Installs : Page 2

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.


advertisement
Installing SQL Server
The first thing to do is install SQL Server using ADS and the default .iss files included with the SQL Server media. Although you don't need to be an expert in unattended installations of SQL Server to follow along, understanding .iss files would be a benefit to any SQL Server administrator.

The first job, InstallSQL1.xml (contained in the accompanying code download), does not do any parameter substitution. You simply use the ADS native tools to copy the file (in this case, the /bmonitor/bmfilexfer.exe utility) and provide the path to the .iss file's location. Then, you just launch the installation. It's too easy!

Note: When installing SQL Server 2000 on a Windows Server 2003 machine, you normally would get a warning pop-up specifying that SQL Server SP2 and below is not supported, which would break most unattended installation methods. You can suppress this warning using the information in Microsoft Knowledge Base Article "How to Suppress the Appshelp Message in an Unattended Installation". You will notice the Appshelp Message is the first command (known as a task) launched using the native Windows REG utility.



Job 1: InstallSQL1.xml

<!-- Code provided by DevX (http://www.devx.com) as part of an article ************************************************************************************* Job Name: InstallSQL1.xml Job Description: Install SQL Server and SP3a with the default .iss file (SQLINS.iss) Job Purpose: Installs SQL Server, and uses the sample .iss files from the SQL
Server media Version: 1.1 Last Updated By: Rob Hawthorne on 20th August 2004 Version Info: Added the ability to use the ADS Agent tool /bmonitor/bmfilexfer.exe Added the ability to suppress the registry key. Notes: The job first downloads the specific .iss file to the target machine
and then runs the installation of SQL Server using the .iss file as
a reference. Usage: Register this job in ADS, and then run against a device to install
SQL Server Input Parameters: Return Values: ************************************************************************************* --> <sequence version="1" description="Install SQL Server 2000" command=""
xmlns="http://schemas.microsoft.com/ads/2003/sequence"> <task description="Copy .iss file to device" doesReboot="false"> <command>/BMONITOR/BmFileXfer.exe</command> <parameters> <parameter>-d</parameter> <parameter>"C:\Build Env\SrcTree\SQL2KEE\SQLINS.ISS"</parameter> <parameter>"\device\harddisk0\partition1\Windows\Temp\SQLINS.ISS"</parameter> </parameters> </task> <task description="Configure Registry to suppress warning dialog (only req'd.
for Win2K3)" doesReboot="false"> <command delivery="none" target="device">.\cmd.exe</command> <parameters> <parameter>/c REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags"
/v {ff25f0b5-c894-45f4-a29d-1bdd0c7926cd} /t REG_DWORD /d 1</parameter> </parameters> </task> <task description="Install SQL Server" doesReboot="false"> <command delivery="none" target="device">.\cmd.exe</command> <parameters> <parameter>/c start /wait \\IDSTEST01\SrcTree\SQL2KEE\x86\SETUP\setupsql.exe
-s -m -SMS -f1 "C:\Windows\Temp\sqlins.iss"</parameter> </parameters> </task> <task description="Copy .iss file to device (SP3a)" doesReboot="false"> <command>/BMONITOR/BmFileXfer.exe</command> <parameters> <parameter>-d</parameter> <parameter>"C:\Build Env\SrcTree\SQL2KEE\SQLDEF.ISS"</parameter> <parameter>"\device\harddisk0\partition1\Windows\Temp\SQLDEF.ISS"</parameter> </parameters> </task> <task description="Install SQL Server SP3a" doesReboot="false"> <command delivery="none" target="device">.\cmd.exe</command> <parameters> <parameter>/c start /wait \\IDSTEST01\SrcTree\SQL2KSP3a\x86\SETUP\setupsql.exe
-s -m -SMS -f1 "C:\Windows\Temp\sqldef.iss"</parameter> </parameters> </task> <task description="Reboot Computer" doesReboot="true"> <command>/BMONITOR/reboot</command> </task> </sequence>

Note: You will need to change the servername, sharename, and SQL directory paths in the XML to suit your environment.

If you've used ADS before, you may have noticed that I used the REG.exe utility for modifying the registry rather than the native ADS /bmonitor/bmsetreg.exe utility. The reason? I found that, rather than allowing me to add a new key, the bmsetreg utility requires that the registry key already be present. Just a little quirk you need to keep in mind.

The simple use of a standard .iss file certainly makes the installation task easier, but it is not always the best method. For example, what if you wanted to change the service account or the code page, or use different paths for the program and data files? And what if you wanted to do this on a machine-by-machine basis? Those scenarios are when you can start to utilize the true power of ADS.



Comment and Contribute

 

 

 

 

 


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

 

 

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