FineBuild Components Inventory
This page contains a brief description of all of the components that make up FineBuild folders.
Everything theat FineBuild does is an open book. VBScript is used for the processing logic because it is easy to understand and is interpreted at run time.
All of the script files have been produced so that the scope and processing in a script matches that given in the FineBuild documentation. This means that any portion of the install process can be performed either by FineBuild or manually and the same results will be achieved.
If you make any changes to the FineBuild scripts, it is important that the scope and processing of a script continues to match the documented FineBuild process. It would be normal for a Security Team to base security monitoring around the configuration described by the FineBuild documentation, and any deviation in server configuration away from this could result in security alerts being generated.
FineBuild components are stored in the following folders:
If a script fails, it can normally be rerun after completing any relevant
FineBuild Troubleshooting, except where noted otherwise.
FineBuild Folder Contents
All of the following scripts are located in the
\FineBuild folder.
The CmdHere.bat File
The CmdHere script opens a Command window based on the current folder.
The SQL....Config.xml File
The SQL....Config.xml file contains the configuration details for the various standard builds described in this document. Further details of this file are given in Customising The SQL....Config.xml File in the FineBuild Reference Manual.
The actual name of this file will depend on the version of SQL Server that you are installing:
| SQL Version | File Name |
| SQL 2012 | SQL2012CONFIG.XML |
| SQL 2008 R2 | SQL208R2CONFIG.XML |
| SQL 2008 | SQL2008CONFIG.XML |
| SQL 2005 | SQL2005CONFIG.XML |
The SQLFineBuild.bat File
The SQLFineBuild script performs all of the scriptable processes for installing SQL Server and applying the customisation in this document. Examples of how to run this script are shown in The SQLFine... Files in the FineBuild Reference manual.
The SQLFineClient.bat File
The SQLFineClient script performs a standard Client Tools install. This file provides a single-click method of performing the Client Tools install.
The SQLFineCluster.bat File
The SQLFineCluster script performs a Server install of the first instance on a SQL Server cluster. This file provides a single-click method of performing the Cluster install.
The SQLFineClusterInstance.bat File
The SQLFineClusterInstance script performs a Server install of secondary instances on a SQL Server cluster. This file provides a single-click method of performing the Cluster Instance install.
The SQLFineExpress.bat File
The SQLFineExpress script performs a standard Express Edition Workstation install. This file provides a single-click method of performing the Express Edition install.
The SQLFineFix.bat File
The SQLFineFix script is designed to apply the latest SP and/or CU to an existing installation of SQL Server.
The SQLFineInstance.bat File
The SQLFineInstance script performs the install of a named instance. It is assumed that the default instance has already been installed. This file provides a single-click method of performing the additional named instance install.
The SQLFineServer.bat File
The SQLFineServer script performs a standard Server install. This file provides a single-click method of performing the main instanceinstall.
The SQLFineWorkstation.bat File
The SQLFineWorkstation script performs a standard Workstation install. This file provides a single-click method of performing the Workstation install.
Top
FineBuild\Build Scripts Folder Contents
All of the following scripts are located in the
\FineBuild\Build Scripts folder.
The CACLS.exe File
This is the cacls command from the standard Windows install media. It is included here in case this file has been excluded from the site Windows build.
The CmdHere.bat File
The CmdHere script opens a Command window based on the current folder.
The CSCRIPT.exe File
This is the cscript command from the standard Windows install media. It is included here in case this file has been excluded from the site Windows build.
The DB Create DBA_DB.sql File
The DB Create DBA_DB script creates the DBA_Data database. It is intended to be run from SQLCMD and be passed parameters to specify the database name and the file locations for the instance being configured.
The DB Create ManagementDW.sql File
The DB Create ManagementDW script creates the Management Data Warehouse database. It is intended to be run from SQLCMD and be passed parameters to specify the database name and the file locations for the instance being configured.
The FineBuild1Preparation.vbs File
The FineBuild1Preparation script builds the disk shares and folder names and applies the security required by the SQL Server install process.
The FineBuild2InstallSQL.vbs File
The FineBuild2InstallSQL script performs the installation of SQL Server.
Additional options for the SQL Server Setup program can be provided. See
Run Time Parameters in the FineBuild Reference Manual for a list of what FineBuild will accept, and see Books Online (BOL) for details of what these options mean.
The FineBuild3InstallFixes.vbs File
The FineBuild3InstallFixes script performs the installation of:
SQL Server Service Pack.
Cumulative Update hotfix
SQL Server Native Client (SNAC) update
BOL Update
A backup of critical System databases is also made.
The FineBuild4InstallXtras.vbs File
The FineBuild4InstallXtas script performs the installation of various optional components for SQL Server that can be installed by FineBuild.
The FineBuild5ConfigureSQL.vbs File
The FineBuild5ConfigureSQL script performs SQL Server configuration that must be performed using the install process.
This script moves files (including some system database files) to new locations and will fail if these files are not in their expected original location. See
SQL Server Configuration in the FineBuild Reference Manual for details of the work performed.
The FineBuild6ConfigureUsers.vbs File
The FineBuild6ConfigureUsers script performs user customisation of the SQL Server client tools to improve their performance, and other customisation intended to improve DBA productivity.
The FineBuildPBM.cab File
This Cab file contains the scripts needed to install Policy Based Management (PBM) objects on to SQL Server, and to configure PBM for immediate use. These are installed into SQL Server at
Policy Based Management in the FineBuild Reference Manual.
The file contains:
60 Condition facets, identified by starting with the letter C.
13 Restriction facets, identified by starting with the letter R.
16 Target facets, identified by starting with the letter T.
58 Policies.
Schedules and jobs to process the policies.
Scripts to change the job names created by SQL Server for PBM to include the schedule name, to help the DBA identify what work is being done.
The GenericMaintenance.cab File
This Cab file contains the following files. These are installed into SQL Server at
Generic Maintenance Processes in the FineBuild Reference Manual. These routines are not discussed in detail, and should be considered as bonus material.
| File Name | Description |
| Alert Event Maintenance Process Fail.sql | Raise an Alert is a maintenance process fails |
| CmdHere.bat | Opens a Command window based on the current folder |
| DbaAdHocBackup.vbs | Creates an Ad Hoc backup |
| Install.bat | Install routine for the Generic Maintenance routines |
| Job Backup Log Alert.sql | Run a log backup if the log file grows above 80% full |
| Job Backup Logs.sql | Backup all transaction logs each hour |
| Job Delete Backups.sql | Delete obsolete backups |
| Job Integrity Check.sql | Integrity Check (DBCC CHECKDB) all databases |
| Job Rebuild Indexes – Monthly.sql | Rebuild indexes that trigger a monthly reorganisation |
| Job Rebuild Indexes – Once.sql | Rebuild indexes that do not trigger a regular reorganisation |
| Job Rebuild Indexes – Weekly.sql | Rebuild indexes that trigger a weekly reorganisation |
| Job Refresh Space Used.sql | 1. Update Space Used statistics |
| | 2. Create any missing database backup jobs |
| Message 700000.sql | Message used if a maintenance process fails |
| Proc sp_send_dbmail(SQL2000).sql | Provides the call interface to sp_send_dbmail for SQL Server 2000 systems. It is a wrapper for xp_sendmail and will only be installed on SQL 2000. |
| Proc spAdHocBackup.sql | Perform an Ad Hoc backup and log the results |
| Proc spBackupDatabase.sql | Back up a database. This will automatically use the following backup product if it is installed, otherwise it will use native SQL Server backup: Dell SQL Litespeed; Idera SQLSafe; Red Gate SQL Backup |
| Proc spBackupLog.sql | Back up a transaction log, using the same backup product used for database backups |
| Proc spBackupLogAlert.sql | Perform a Log Backup when triggered by a log full condition |
| Proc spDeleteOldBackups.sql | Delete obsolete backups |
| Proc spIntegrityCheck.sql | Perform database integrity check |
| Proc spProcessAllDB.sql | Run a maintenance process against all databases. Specific databases can be excluded via a parameter |
| Proc spRebuildIndexes.sql | Rebuild indexes that have triggered a reorganisation |
| Proc spSetDBMaintenance.sql | Build database backup jobs and alerts |
| Proc spSetDBOptions.sql | Set standard DB Options |
| Proc spUpdateUsage.sql | Update Space Used statistics |
| SetupASBackup.vbs | Create SSAS Backup jobs |
| SetupDbaAdHocBackup.vbs | Integrate Ad Hoc Backup process into SSMS |
| SQL sp_configure.sql | Sets sp_configure options required for Generic Maintenance |
| Table BackupIndex.sql | List of Ad Hoc backups |
| Table RebuildSummary.sql | List of completed index rebuilds |
The LangPack.cab File
This Cab file contains the following files. Please see
Non-English Versions of SQL Server in the Reference Manual for details of how to use these files.
| File Name | Description |
| SQLFineBuildDEU.bat | Parameters for installing a German language version of SQL Server |
| SQLFineBuildITA.bat | Parameters for installing an Italian language version of SQL Server |
The NTRIGHTS.exe File
This is the ntrights command from the W2003 Resource Kit. It is included here in case this file has been excluded from the site Windows build.
The REG.exe File
This is the reg command from the Windows 2003 install CD. It is included here in case this file has been excluded from the site Windows build.
The ReplaceText.vbs File
The ReplaceText script is used by other scripts to perform a find and replace function on a specified file.
The SetRSSecurity.rss File
The SetRSSecurity script is used to set security within Reporting Services, via the RS command. It is based on the AddItemSecurity.rss file from the SQL Server Samples collection.
The SETSPN.exe File
The SETSPN command from the Windows 2003 Resource Kit is included in the install media to allow DBA staff to quickly check the status of Service Principal Names (SPNs).
The SQL Server Outlook.prf File
The SQL Server Outlook profile file is used with Outlook to create the Outlook MAPI profile for SQL Mail functionality. It was created using the Office Custom Installation Wizard, and tailored to contain standardised values.
The SQL Setup DB Mail.sql File
The SQL Setup DB Mail script configures the Database Mail profile for SQL Server. This file is based on the Sample Database Mail Configuration template supplied with SQL Server, and tailored to include standardised values.
The SQLDbaManagement.cab File
This Cab file contains the following files. These are installed into SQL Server at process
Add DBA routines to DBA_DB Database in the Reference Manual.
| File Name | Description |
Install.bat Installation routine for the other files.
|
| Job Archive suspect_pages.sql | Daily job to run spArchiveSuspectPages routine |
| Proc spArchiveSuspectPages.sql | Move contents of the suspect_pages table to the DBA database, and alert the DBA if any suspect pages have been found |
| Proc spCreateAgentProxy.sql | Simplify the creation of a SQL Agent proxy account |
| Proc spDTSExportPackages.sql | Export details of DTS packages. The automated export or import of DTS packages using SQL Server facilities will lose the layout of these packages and annotations in DTS Designer. It will not affect how they work, just how they look in DTS Designer |
| Proc spDTSImportPackage.sql | Import details of DTS packages that were previously exported. The same restriction on keeping the DTS Designer layout and annotations applies to imports as it does to exports |
| Proc spDTSReplaceOwner.sql | Replace the owner on all DTS packages in SQL Server |
| Proc spResetJobnamesMDW.sql | Change MDW job names to more descriptive format |
| Prod spResetJobnamesPBM.sql | Change PBM job names to more descriptive format |
| Proc spScriptAlerts.sql | Export details of SQL Agent Alerts |
| Proc spScriptFunctions.sql | Export details of User Defined Functions (UDFs). The script includes any permissions that have been defined for the function |
| Proc spScriptJobs.sql | Export details of SQL Agent Jobs. This routine is based on sample code published by Nigel Rivett www.nigelrivett.net, and its use is acknowledged and appreciated. Many of the spScript… routines were in turn based on the enhancements to the spScriptJobs routine |
| Proc spScriptLogins.sql | Export details of SQL Server Logins |
| Proc spScriptMessages.sql | Export details of SQL Server Messages |
| Proc spScriptOperators.sql | Export details of SQL Agent Operators |
| Proc spScriptProcs.sql | Export details of Stored Procedures. The script includes any permissions that have been defined for the procedure |
| Proc sp_ScriptRoles.sql | Export details of any user database roles that exist in a specified database |
| Proc spScriptTables.sql | Export details of user Tables. The script includes any Constraints, Indexes, Triggers and Permissions that have been defined for the table |
| Proc spScriptViews.sql | Export details of user Views. The script includes any Indexes, Triggers and Permissions that have been defined for the view |
| Proc spSetDBOptions | Set standard database options |
| Table suspect_pages_archive.sql | Table in the DBA database to hold archived rows from the suspect_pages table. The DBA should periodically clear out old data from this table |
The SQLServiceStop.bat File
The SqlServiceStop script stops various services related to SQL Server. It is used during the Service Pack and Cumulative Update installations to prevent locked file situations.
The SQLSetupVar.vbs File
The SqlSetupVar script is used to set variables used by the SQLFineBuild script.
The SQLSysDBCopy.vbs File
The SqlSysDBCopy script copies the mssqlsystemresource and master files to a backup location on the Backup drive.
The SQLSysManagement.cab File
This Cab file contains the following files. These are installed into SQL Server at process
System DB Management in the Reference Manual.
| File Name | Description |
| Alert BasicSetup.sql | Alerts for error severity 17 and above |
| Alert Login Fail.sql | Alert for notification of failed logins |
| Alert Login sa Success.sql | Alert for notification of successful use of the sa account |
| Install.bat | Installation routine for the other files |
| Job Create New Errorlog.sql | Creates the Create New Errorlog job |
| Job SQL Agent Heartbeat.sql | Creates the SQL Agent Heartbeat job |
| Msg Messages.sql | Adds a standard set of messages to SQL Server |
| Oper SQL_Alerts.sql | Creates the SQL_Alerts SQL Agent operator |
| Proc sp_GetEnvVarValue.sql | Returns the value of a given Windows environment variable |
| UDT Hugemoney.sql | Creates the Hugemoney user data type in the model database |
The SQLValidate.vbs File
The SqlValidate script is used to validate parameters passed to the SQLFineBuild script.
The SQLVersionUpgrade.cab File
This Cab file contains the following files. They are only required when upgrading an instance from an old version of SQL Server to a more recent version. See
Upgrade from Old Version of SQL Server in the Reference Manual for details of using these files.
| File Name | Description |
| CmdHere.bat | Opens a Command window based on the current folder. |
| SQL2000_Export.bat | Installs and runs stored procedures that export details from a SQL Server 2000 instance that are required for the replacement SQL Server instance |
| SQL2008_Edit_Jobs.bat | Edits the file containing jobs exported from SQL Server 2000. It changes file names, SQL Agent job tokens (as described in KB 915845), and other details to comply with SQL Server naming standards |
| SQL2008_Import.bat | Imports details into a new SQL Server instance previously exported from an old SQL Server instance |
| | This script can be restarted at specific points within the script by adding the appropriate Process Id as a parameter. If any step fails the failed process can be rerun in its entirety after completing any relevant troubleshooting |
The Troubleshooting Performance Problems SQL2005.pdf File
The Troubleshooting Performance Problems file contains Best practice information on resolving performance problems in SQL Server 2005. It is published as a Word document on
http://msdn.microsoft.com/en-us/library/dd672789.aspx. After downloading, it was converted to PDF format for inclusion in the Build.
The Troubleshooting Performance Problems SQL2008.pdf File
The Troubleshooting Performance Problems file contains Best practice information on resolving performance problems in SQL Server 2008 and above. It is published as a Word document on
http://msdn.microsoft.com/en-us/library/dd672789(v=sql.100).aspx. After downloading, it was converted to PDF format for inclusion in the Build.
The User1Preparation.vbs File
The User1Preparation script is a sample script that can be modified as required by each site.
It should be used to deploy any preparation the site wishes to include in its standard build process, prior to SQL Server being installed. See
Site-Specific Components in the Reference Manual for more details.
The User2Configuration.vbs File
The User2Configuration script is a sample script that can be modified as required by each site.
It should be used to deploy any additional SQL Server configuration the site wishes to include in its standard build process. See
Site-Specific Components in the Reference Manual for more details.
Copyright © 2012 Edward Vassie.
License and Acknowledgements