Beginning Our Script
So let's begin. As we did in the earlier articles, we have header information within our script that describes the script's purpose, author, last modified date, and so on (as shown in Listing 3.1).
Listing 3.1 Header Information for Our Main Script.
@echo off
REM *********************************************************************************************
REM Code provided by InformIT (http://www.informit.com) as part of a series of articles
REM
REM Script Name: Main.bat
REM Script Purpose: Wraps up all of the installation scripts for Microsoft SQL Server 2000.
REM Version: 1.1
REM Last Updated By: Rob Hawthorne on 1st Mar 2003
REM Version Info: Updated the script to take the Port details
REM
REM Notes: Make sure you supply the correct values for each of the variables
REM
REM Usage: Used to wrap up a complete installation of SQL Server from the install through
REM to the configuration
REM i.e. removing sample DBs, separating tran and data files etc.
REM
REM Input Parameters:
REM
REM Return Values:
REM RetVal - Return value indicating whether the script has succeeded (0) or not (<> 0)
REM e.g., RETVAL=0
REM *********************************************************************************************
I try to ensure that this information remains up-to-date, but it can be a real nightmare sometimes! (Especially when you are continually working on a script.) So to take some of the pain away, a tool such as Microsoft's Visual SourceSafe (VSS) could really help you. VSS not only provides version control, but it also allows you to create templates for the types of items that you check into VSS.
By defining a template and the must-have fields within the template, when a script is checked in, the onus is then on the user to enter this information. If it is not supplied, you can easily produce a report on missing information and then speak to those who didn't supply the information (all documents checked in and out have a user's id stamped on them).
Anyway, as much as I would love to explain the ins and outs of VSS, that's not what you're here for now, is it?