Exforsys

SQL Server 2005 Training

  1. SQL Server 2005 - Configuring Replication
  2. SQL Server 2005 Replication Enhancements
  3. SQL Server 2005 - Mirror Server
  4. SQL Server 2005 - Introduction to Data Availability
  5. SQL Server 2005 - Backing up a Database
  6. SQL Server 2005 - Using Database Snapshots
  7. SQL Server 2005 - Disaster Recovery
  8. SQL Server 2005 - Managing Certificates
  9. SQL Server 2005 - Managing Permissions
  10. Managing SQL Server 2005 Security
  11. SQL Server 2005 - Using the Database Tuning Advisor
  12. SQL Server 2005 - Tuning a Database
  13. Maintain indexes in a SQL Server 2005 database
  14. SQL Server 2005 - Defining Indexes
  15. SQL Server 2005 - Database Backup
  16. SQL Server 2005 - Populating the Database
  17. SQL Server 2005 Configuration Manager
  18. SQL Server 2005 - Using the Sqlcmd Utility
  19. Using the SQL Management Objects
  20. Using SQL Sever Management Studio - Part 2
  21. Using SQL Sever Management Studio - Part 1
  22. SQL Server 2005 - Using Event Notifications
  23. SQL Server 2005 - Using DDL Triggers
  24. SQL Server Monitoring Tools - Server Profiler
  25. SQL Server 2005 - Testing Troubleshooting
  26. SQL Server 2005 - Upgrading from earlier versions of SQL Server
  27. SQL Server 2005 Installation - Maintenance Plan Without Using Wizard
  28. SQL Server 2005 - Unattended Installations
  29. SQL Server 2005 Installation - Maintenance Plan Using Wizard
  30. Installing a Second Copy of SQL Server 2005
  31. Planning to Install SQL Server 2005
  32. SQL Server 2005 Installation
  33. SQL server 2005 Editions
  34. SQL Server 2005 Architecture Overview
  35. SQL Server 2005 - Management studio interface Summary Page
  36. SQL Server 2005 - Server Groups
  37. SQL Server 2005 - Registered Servers
  38. SQL Server 2005 Administrative Tools
  39. Developing Client applications in SQL Server 2005
  40. SQL Server Management Objects
  41. NET CLR in SQL Server 2005
  42. Native HTTP Support in SQL Server 2005
  43. XML Data Types in SQL Server 2005
  44. Using XML in SQL Server 2005
  45. Using Notification Services in SQL Server 2005
  46. SQL Server 2005 - Service Broker
  47. Data Manipulation Language (DML) in SQL Server 2005
  48. T-SQL Enhancements in SQL Server 2005
  49. Security Features in SQL Server 2005 for the Developer
  50. SQL Server Architecture and Components
  51. SQL Server 2005 Management Studio
  52. Overview of SQL Server 2005 for the Database Developer
  53. Getting started with SQL Server 2005

Ads


Home arrow Technical Training arrow SQL Server 2005 Training

SQL Server 2005 - Unattended Installations

Author : Exforsys Inc.     Published on: 7th Dec 2005    |   Last Updated on: 11th Dec 2005

SQL Server 2005 - Unattended Installations

In this tutorial you will learn about SQL Server 2005 - Unattended Installations, How to perform a silent installation of SQL Server, To Create .iss file, Basic Header Information for Our Script Files, Checking for the Parameters within the Script, Sample of the Combination of the .iss File within the Batch File, To set the security modes use the following code.

Ads

Unattended installation is an installation of SQL Server that is done entirely using a script embedded in an .ini file. This file can be created using any text editor. This file is composed of a single section containing multiple parameters relating to the different configuration setting. Once this file has been created, the user has to navigate to the command prompt and type the command setup.exe/settings To Create .iss file

1. Check whether any other .iss file exists in the operating system by navigating to C:\WinNT.
2. If yes, rename the files to some other name. These files are not required once an installation of the SQL Server is complete and may have been created by previous installations.
3. Insert the installation CD into the drive and in the command prompt specify

x:\Setup\SQLSetup.exe –r.

4. The –r parameter records a unattended installation within the Winnt directory and then opens the installation wizard. The installation wizard screen is displayed.
5. Select the Advanced options to choose the options required. Click Next.
6. Select the Record Unattended .ISS File option in the installation wizard.
7. We shall ignore the Registry option which is intended to restore the registry to the pre-SQL installation state. We shall also ignore the Maintain a virtual Server for Failover clustering as this option is to be used if clusters are being installed. Click Next.
8. The standard installation screens appear. The user can navigate through these screens selecting the options required.
9. Once the installation wizard completes the task, navigate to C:\WINNT and open the new file called setup.iss with the current date and time. Look at the script in the file.
10. Enter the following command in the command line

< name of drive >:\Setup\SQLSetup.exe –z –s –f1c:\winnt\setup.iss

11. –z is to ensure that the setup will run on systems that have more than 256 MB RAM. –s forces setup to run without user input. –f1 allows users specify the path of the .iss file. If path is not specified, the setup looks for an .iss file in the default location.
12. The .iss file can now be manually edited to cater to the needs of the administrator.

The above script procedure does not install the SQL Server. It assists the administrator in creating the script automatically.

Now that the script is created, the variables within the script will have to be initialized. The .iss file that is then generated will install the SQL Server.

The script file created above is a DOS or batch file script. Though it can be ported to Windows Scripting Host (WSH), it is very simple to administer in the current format.

Separate script files can be created for each installation or different values can be passed for the installations.

The first step is to define the header information. This is illustrated below.

Basic Header Information for Our Script Files.

Header information makes the file more maintainable. All information regarding referenced parameters, meanings in the context of the script, sample value of the parameter, notes etc are included in the header file. This section can be modified as and when required.

The next part of the script is parameter checking. The ‘If” clause is used to check the existence of the parameter. If it does not exist, then a message is sent to the console window alerting the user that the parameter contains no value and a log is registered and the batch file is exited.

Checking for the Parameters within the Script.

It must be noted that some of the variables have been supplied with default values and if the user forgets to supply the value the same will be set to default.

The code has to now check for the value of the SycActName variable. If the value is the LocalSystem then SQL Server will be installed as LocalSystem and hence there is no need to check for SycActDom and SycActPwd variables. If the SycActName is not LocalSystem then we need to check for the other two variables and the user must provide the values. The purpose of using this conditional logic is to enable the installation in a number of slightly varying situations with ease.

The next step is to modify and generate the .iss file. Open the .iss file and paste the echo command at the beginning of every line and >>%ISS% at the end of every line other than the first line. Add a > %ISS% sign at the end of the first line. The file will begin to look like the sample below.

Sample of the Combination of the .iss File within the Batch File.

Having completed the above process, we now need to place the variables in the place of the values in the .iss file. For instance

(echo szDir=%PROGRAMFILES%\Microsoft SQL Server\MSSQL) >> %ISSFile%

Will become

(echo szDir=%SQLpath%) >> %ISSFile%

After completing the editing, copy the entire file and place the text into the batch file under the parameter checking section as under:

Finally, to extend the logic for a Service Account we need to replace in the code the following section.


To set the security modes use the following code.

With this we have come to the end of the process of creating our .iss file. Copy this file into the Windows Directory and rename it as setup.iss. Now create the command line within the batch file as under:

Ads

You can use the Start/wait command to tell the batch file to wait till the installation of the SQL Server has finished. Once it has finished we can check for successful installation by setting the value for RETVAL.

In this section of the tutorial we have learnt how to create an .iss file and use for a unattended installation of the SQL Server. In the section that follows we shall see how to do a custom installation of the server.



 
This tutorial is part of a SQL Server 2005 Training tutorial series. Read it from the beginning and learn yourself.

SQL Server 2005 Training

  1. SQL Server 2005 - Configuring Replication
  2. SQL Server 2005 Replication Enhancements
  3. SQL Server 2005 - Mirror Server
  4. SQL Server 2005 - Introduction to Data Availability
  5. SQL Server 2005 - Backing up a Database
  6. SQL Server 2005 - Using Database Snapshots
  7. SQL Server 2005 - Disaster Recovery
  8. SQL Server 2005 - Managing Certificates
  9. SQL Server 2005 - Managing Permissions
  10. Managing SQL Server 2005 Security
  11. SQL Server 2005 - Using the Database Tuning Advisor
  12. SQL Server 2005 - Tuning a Database
  13. Maintain indexes in a SQL Server 2005 database
  14. SQL Server 2005 - Defining Indexes
  15. SQL Server 2005 - Database Backup
  16. SQL Server 2005 - Populating the Database
  17. SQL Server 2005 Configuration Manager
  18. SQL Server 2005 - Using the Sqlcmd Utility
  19. Using the SQL Management Objects
  20. Using SQL Sever Management Studio - Part 2
  21. Using SQL Sever Management Studio - Part 1
  22. SQL Server 2005 - Using Event Notifications
  23. SQL Server 2005 - Using DDL Triggers
  24. SQL Server Monitoring Tools - Server Profiler
  25. SQL Server 2005 - Testing Troubleshooting
  26. SQL Server 2005 - Upgrading from earlier versions of SQL Server
  27. SQL Server 2005 Installation - Maintenance Plan Without Using Wizard
  28. SQL Server 2005 - Unattended Installations
  29. SQL Server 2005 Installation - Maintenance Plan Using Wizard
  30. Installing a Second Copy of SQL Server 2005
  31. Planning to Install SQL Server 2005
  32. SQL Server 2005 Installation
  33. SQL server 2005 Editions
  34. SQL Server 2005 Architecture Overview
  35. SQL Server 2005 - Management studio interface Summary Page
  36. SQL Server 2005 - Server Groups
  37. SQL Server 2005 - Registered Servers
  38. SQL Server 2005 Administrative Tools
  39. Developing Client applications in SQL Server 2005
  40. SQL Server Management Objects
  41. NET CLR in SQL Server 2005
  42. Native HTTP Support in SQL Server 2005
  43. XML Data Types in SQL Server 2005
  44. Using XML in SQL Server 2005
  45. Using Notification Services in SQL Server 2005
  46. SQL Server 2005 - Service Broker
  47. Data Manipulation Language (DML) in SQL Server 2005
  48. T-SQL Enhancements in SQL Server 2005
  49. Security Features in SQL Server 2005 for the Developer
  50. SQL Server Architecture and Components
  51. SQL Server 2005 Management Studio
  52. Overview of SQL Server 2005 for the Database Developer
  53. Getting started with SQL Server 2005
 

Comments