This project has moved. For the latest updates, please go here.

Previous FineBuild Folder Contents FineBuild Parameter Inventory Next

Build Scripts Folder Contents

All of the following components 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 DB Create SSRSDBs.sql File

The DB Create SSRSDBs script creates the Reporting Services databases when Reporting Services is clustered. 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 FineBuild.xml file

This file contains a template for the FineBuild run-time Buid file.

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 Packs, Cumulative Updates and Books Online updates. 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 Configure Generic Maintenance Processes.
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
Install.vbs Install routine for the Generic Maintenance routines
MaintenanceSolution.sql Install file for Ola Hallengren's DB Maintenance processes
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 spBackupLogAlert.sql Perform a Log Backup when triggered by a log full condition
Proc spDeleteOldBackups.sql Delete obsolete backups
Proc spProcessAllDB.sql Run a maintenance process against all databases. Specific databases can be excluded via a parameter
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
SQL sp_configure.sql Sets sp_configure options required for Generic Maintenance

The KB917406.sqlwb.exe.manifest File

This file contains an updated .Net manifest for the SQL 2005 DTS Designer component, as described in KB917406.

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 Set-SessionConfig.ps1 File

This Powershell script enables remote access to Powershell by the DBA Sysadmin and DBA Non-Sysadmin Windows groups.

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 Sql2005SP1InstallHotfix.bat File

Windows batch file to install SQL 2005 SP1. This is not used within SQL FineBuild and is included for convenience only.

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 SQL Setup System Indexes.sql File

This file creates additional indexes on system databases to improve the performance of important queries.

The SqlASAccounts File

This file sets up the system administrator accounts for SQL 2005 Analysis Services.

The SqlConfigBuild.vbs File

The SqlConfigBuild script is used to prepare and validate parameters passed to the SQLFineBuild script.

The SqlConfigReport.vbs File

The SqlConfigReport script provides a status report of the SQL FineBuild processing.

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
Proc 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 Windows 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
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 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 - 2014 Edward Vassie. License and Acknowledgements
Previous FineBuild Folder Contents Top FineBuild Parameter Inventory Next

Last edited Mar 28, 2014 at 10:36 AM by EdVassie, version 2