Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

How to Deploy SQL Server 2005

This topic was edited by a BMC Contributor and has not been approved.  More information.

This page provides the required information to post OS provision Microsoft SQL 2005 in your environment. It contains the following sections:

Stocking the Code

You will need to copy the CD or CDs to the Application Server or you can reference them in a share. If there are two CDs, you will need to copy both of them in a single directory. For example, I copied the SQL2005 CD into D:\Bladelogic - Depot\SQL2005. You also need a copy of psexec to start the command line installation.

Creating and Modifying the Silent install file

Microsoft SQL2005 ships with a template.ini file, which is located on the root of the CD, depending on the version. This file contains the details for the installation of SQL2005 through a command line or a template/silent.ini file. This page focuses on the installation with an *.ini file.

The first step is to edit the *.ini file to accommodate the components that you will be installing. The file originally contains more information than needed. Therefore, you can strip down the original template.ini file and leave only the sections that are necessary for an out-of-the-box installation. Below is an example of a file that was used in a particular installation.

This package is aimed at installing ALL components. You can reference the template.ini file if you want to install fewer components.

When packaging software that has the silent command line or *.ini file, I typically copy the code to a target host and make the necessary changes and run the installation to validate that it works properly. The following steps can be used to create a file deploy job within BMC Server Automation and deploy it to the target host.

To create a File Deploy Job

  1. Select New > File Deploy Job.
  2. Enter a Name and Description; add the source by clicking on the ellipsis …
  3. Navigate to the Application Server and select the SQL2005 source folder. You will then need to grab psexec.exe from the PStools folder.

    The Source depicts the actual location, and the Destination will be the C:\ of the target.
  4. On the next panel, select the target that you want to use for testing.
  5. Step through the next few panels. In this example, no information was entered on these panels.


  6. Select Execute Job now.
  7. Step through the remaining panels.
  8. Click Finish to Execute the Job
  9. Validate that the code made it to the target host.

Command line installation with an *.ini file

Now that you have the code on the target host, you can also test the command line installation.

  1. Use a command similar to the command depicted below. Note that this is for testing the installation, and it will need to be modified within Bladelogic. Note that I also use thesetup.exe /qb string so that I can see the installation progress.

    The actual command with psexec will be:

    psexec 
     localhost -u administrator -p ******** "c:\tmp\stage\SQL2005\Servers\setup.exe" /qb /settings "c:\tmp\stage\SQL2005\silent.ini" 
  2. Wait for the Initial System check of the Installation to complete.
  3. Now wait for the SQL Setup Progress to complete.
  4. Through the Control Panel, validate that SQL was installed.
  5. Launch SQL Server Management Studio
  6. Validate the logon to the SQL Server.

You have successfully installed SQL 2005

Packaging SQL2005

  1. To deploy SQL2005, you must create a BLPackage.
  2. Add a package name and a Save in location.
  3. On the next panel, add Live Server objects; in this case we are adding the SQL2005 source code.

    The source code is located on the application server, D:\Bladelogic - Depot\SQL2005-rjm\SQL2005.

    The SQL2005 Server Objects are added.
  4. On the next panel, select the following Package Item Options:
  5. Step through the Properties screen, accepting the standard properties.
  6. On the Permissions panel, add any additional Permissions to other roles that may be required to package and deploy SQL2005. Then click Finish.
  7. During the copying of package files, you are prompted to edit the package. Select Yes.

  8. In your Initial SQL Package, you will want to change the /D/Bladelogic – Depot/SQL2005-rjm. Otherwise, that is where the package will be created. Note the silent.ini file that you use to validate the installation.

    Since such items as BLPackages and Jobs are copied to the tmp/stage directory, I used that directory.
     

Adding additional files in the BLPackage

This package will require additional files as well as an external command.

  1. Right-click anywhere in the BLPackage, and select Import Assets.
  2. In the Import dialog box, select Live server objects.
  3. On the next panel, browse to the Application Server and grab the necessary files, in this case psexec.exe.

    Select psexec.exe from SANDAPBL1/Bladelogic – Depot/PsTools/

    The server objects are selected.
  4. On the Package Item Options panel, use the following options:
  5. Step through the Properties panel, accepting the standard properties.
  6. On the Permissions panel, you might need to add additional Permissions to other roles that may be required to package and deploy SQL2005. Then click Finish.
  7. Again, after the object is imported, you will need to change its location. I typically put psexec.exe or other executables into /C/Windows/ so that you can call them from anywhere.

Creating Local Properties in the BLPackage

Since we are using psexec, we need to specify a username and password through BLPackage properties.

  1. Click on the local properties of the BLPackage. Click on the green plus sign to add a username and password property.
  2. Enter Name, Description and Default value. The type for this local property will be Simple and String, and set it as Editable and Required.
  3. For the password you will want to change the Type to Encrypted String, so as to keep the password from being displayed in clear text.

Your local properties should look like this:

Adding an external command for the installation

To kick off the installation, you will need to create an external command.

We can reference the command that we used to test the command line installation (as described in Command line installation with an *.ini file).

Deploying SQL2005 through a Deploy Job

The last step in this process is to take the BLPackage and create a deploy job to run against your target server.

  1. Right-click the BLPackage and select Deploy.
  2. In the General panel, provide a Name and Save in location.
  3. The target host in this example is in a Workgroup, so you can leave these settings as they are.
  4. On the Targets panel, select your target host.
  5. If you have Notifications and SNMP setup, you can supply the email and SNMP trap server/address on the Default Notifications panel.
  6. On the Phases and Schedules panel, I typically clear the Phase Selection->Simulate option. You can select to execute now or to save it for later.
  7. On the Job Options panel, accept the standard deploy options.
  8. On the Phase Options panel, you can accept the default options, if you choose to.
    I typically clear the Test for Sufficient staging directory space on target for phase: option.
  9. Step through the Properties panel, accepting the standard properties.
  10. On the Permissions panel, you might need to add additional Permissions to other roles that may be required to package and deploy SQL2005.

You have now successfully provisioned SQL2005

Was this page helpful? Yes No Submitting... Thank you

Comments