Remote and Unattended Installation

SQL Server can be installed on a remote computer, and it can be totally scripted, requiring no user intervention. With SQL Server 7, the InstallShield-based installation, remote setup, and unattended setup are almost the same thing. The remote installation option can be useful when you are responsible for many SQL Server installations. In fact, the feature was added (in the days predating Microsoft Systems Management Server) at the behest of Microsoft's own MIS organization, which manages more than 200 machines running SQL Server (and thousands of databases). Installing and upgrading on any of those 200 servers from one computer greatly simplified MIS's work.

Other sites script their installations by using the unattended installation feature to deploy many servers instead of using the remote installation option, which is still an interactive process. Microsoft Systems Management Server uses this capability and can be used to install SQL Server at multiple sites. (In fact, unattended installation scripts and a PDF file, used by Systems Management Server, are provided on the root directory of the SQL Server CD.)

The unattended installation option is also useful if you are embedding SQL Server into a turnkey solution and want to provide a single, unified installation. As should be apparent by now, the SQL Server installation program makes multiple entries to the Registry, changes system paths and various system settings, creates program groups and user accounts, and performs basic initial configuration for its operation. The installation program is far from a glorified file-copy program. It would not be realistic for solution providers to create their own programs to install SQL Server as part of their services or products. But they can easily achieve the same results by simply creating a script that can drive the SQL Server installation program without any user intervention.

Remote Installation

Remote installation is similar to a normal, local installation. After you choose the remote installation option (by clicking Remote in the first dialog box of the installation program), you are prompted to answer a few questions in addition to those a local installation needs. Along with providing the machine name of the anticipated SQL Server, you must do the following:

  • Run the installation program from an account with Administrator privileges on the remote (target) server.
  • Be aware that drive paths should be relative to the remote server.

After specifying that you want a Remote installation, the information that you provide in the rest of the dialog boxes is collected into a file called setup.iss. Once the information is collected, a program is started on the remote computer, and then the local installation program exits. The remote program (remsetup.exe) copies files to the \admin$ share directory and runs an unattended installation on the remote computer, using the options specified in the setup.iss file.

Unattended Installation

Unattended installation creates a file using the options you selected in the SQL Server installation program. To invoke an unattended installation, you must first generate an InstallShield ISS file using one of three methods, described in the following list. All the methods require that you run the SQL Server installation program from a command prompt instead of using the autorun.exe program. The program is in either the alpha\Setup or x86\Setup folders on the SQL Server installation CD.

  • Normal installation The normal installation creates a file called setup.iss (which it saves in the Mssql7\Install folder) containing your answers to all the questions in the installation dialog boxes.
  • Deferred installation You start the SQL Server installation program (Setupsql.exe) with the k=Rc switch and proceed through the dialog boxes to install SQL Server as usual. This causes Setup to create the setup.iss file and save it in your Windows directory this will not actually install SQL Server on the local computer.
  • Manual file creation The installation CD contains a sample setup file called sql70ins.iss. You can use a text editor to modify this file to correspond to the installation options you want. For details of the format of this file, see the online documentation.

After the setup ISS file is created, you can move or copy it to another location for use on other servers. For subsequent automated installations, start Setupsql and specify a previously generated setup ISS file as input by using the -f1 command-line option. The syntax for this command is:

 Setupsql.exe -f1 <  full path to iss file  > -SMS -s 

The -s switch causes setup to run in a silent mode with no user interface. If the -SMS switch is not specified, the setup program will launch InstallShield to perform the installation, and then exit, with control immediately returning to the user. If the -SMS switch is specified, the setup program will wait until the installation is complete before terminating. This allows an automated process, or a user-created batch file, to launch the setup program, wait for setup to complete, and then perform additional actions. Without the -SMS switch, the additional actions might be initiated before the installation of SQL Server completes.

For remote or unattended installation, you might choose to copy all the necessary files from the CD to a network share. (For example, if you're installing on an Intel processor, you copy everything but the \alpha folder; for a DEC Alpha installation, you copy everything but the \x86 folder.) Normally, you should not notice any difference between network installation and installation from the CD. However, note that the InstallShield program will fail if the full pathname of any of the source files is more than 255 characters long.

Changing Installation Options

With the exception of character set and sort order, all the decisions you make during installation can be changed at a later time. As mentioned earlier, you can change your decisions about the account under which the SQL Server services should run and whether SQL Server should start automatically when the system starts. You do this either through Control Panel's Services applet or by editing the properties of your SQL Server through SQL Server Enterprise Manager. You can also change the Security options for SQL Server using SQL Server Enterprise Manager to specify whether SQL Server should use Windows NT authentication only or whether it should also use Standard SQL Server authentication. You can change the network interface options using the Server Network Utility. The character set and sort order cannot be changed on an existing SQL Server installation without rebuilding your master database and recreating all your user databases. (Restoring backups is not sufficient. A restore maintains the character set and sort order that were in effect at the time the backup was made.)

Prior versions of SQL Server allowed you to run the setup program with special flags to carry out special operations. Because SQL Server 7 installation uses the generic InstallShield, no SQL Server_specific flags are allowed on the setup command line. Instead, SQL Server 7 provides additional utilities to carry out these special operations:

  • Rebuilding the master database The Rebuild master utility rebuildm .exe in the \mssql7\binn directory rebuilds the master database completely. You might have to restore backups of msdb and model system databases after you rebuild the master database. If any user databases are to be restored or attached after master is rebuilt, you must specify the same sort order, code page, and Unicode collation when you rebuild master as used by those databases.
  • Rebuilding the Registry entries You can use the regrebld .exe program in \mssql7\binn to restore the SQL Server registry entries if they become corrupted. You can also run the regrebld program using the _Backup option to back up the Registry at any time. You can also use the _Restore option, which is equivalent to running regrebld with no parameters. The SQL Server installation program runs regrebld _Backup at the end of the installation process to create an initial set of Registry backup files. You might have to rebuild the Registry if the Windows NT Registry was partially corrupted (for example, if it was inadvertently deleted using the REGEDT32.EXE program) or if Windows NT was reinstalled (not upgraded) on a machine and the new Registry is not aware of the previous SQL Server installation.

Adding Additional Components

If you want to add components, you can rerun the SQL Server installation program from the original CD. The program will detect and display components you already have installed and let you select additional components. The main dialog box is very specific about the actions it will perform: "Selecting components already installed will not reinstall them and unselecting components already installed will not remove them." The components you might want to install in this way, after the initial installation, include:

  • Server components You can install the upgrade tools (to upgrade databases from version 6. x to SQL Server 7), replication support, and full-text search capabilities.
  • Management tools You can install the SQL Server Enterprise Manager, the SQL Server Query Analyzer, the SQL Server Profiler, and DTC Client Support.

Two other tools are available with SQL Server 7 that are not part of the standard installation. The initial installation screen gives you the choice of installing SQL Server (Desktop or full server edition), SQL Server 7.0 OLAP Services, or English Query. If you choose either of the latter two options, SQL Server itself is not installed and an existing SQL Server 7 installation will not be affected.

Inside Microsoft SQL Server 7.0
Inside Microsoft SQL Server 7.0 (Mps)
ISBN: 0735605173
EAN: 2147483647
Year: 1999
Pages: 144 © 2008-2017.
If you may any questions please contact us: