Install Replication Distributor - SQL-FineBuild/Common GitHub Wiki

Previous Install Data Quality Services Manual Install Install SSDT Next

FineBuild can install and configure Replication Distributor as part of the SQL Server install process.

Replication Distributor is written by Microsoft. It was chosen to be included in FineBuild because it provides the Distribution databases needed when using SQL Server Replication.

Replication Distributor can not be installed on Express Edition.

Item Link
SQL Replication home page https://docs.microsoft.com/en-us/sql/relational-databases/replication/sql-server-replication
SQL Replication download All components needed for Replication Distributor are included in the SQL Server install media
SQL Replication introduction https://docs.microsoft.com/en-us/sql/relational-databases/replication/types-of-replication

SQL Server Replication is a vast topic, and the links above only give the briefest introduction. Running replication in a Production environment is a skilled operation, but when done correctly it is reliable and resilient. Anybody considering using replication for the first time is advised to investigate the materials available on the internet, and consider hiring someone with skills in replication to provide knowledge transfer.

SQL Server also provides other methods of copying data from one server to another. If you are using SQL Server 2012 or above a SQL Server Always On Install often meets data distribution requirements in a far more simple manner than Replication.

FineBuild Replication Distributor Install

Automated silent installation of Replication Distributor is performed by Process Id 4SN and is controlled by the parameters below:

SQL Version Parameter FULL Build WORKSTATION Build CLIENT Build
SQL2019 /SetupDistributor: No No N/A
SQL2017 /SetupDistributor: No No N/A
SQL2016 /SetupDistributor: No No N/A
SQL2014 /SetupDistributor: No No N/A
SQL2012 /SetupDistributor: No No N/A
SQL2008R2 /SetupDistributor: No No N/A
SQL2008 /SetupDistributor: No No N/A
SQL2005 /SetupDistributor: No No N/A

FineBuild also uses the following parameters to help configure Replication Distributor:

Parameter Default Value Description
/DistributorDatabase: Distributor Name of Distributor database
/DistributorPassword: /sapwd: value Password for Replication administrator. The password should be recorded in the DBA Password Store
/DirSQL: SQLFiles High-level folder name for SQL Server files and folders
/Instance: MSSQLSERVER SQL Server instance name
/VolData: C Volume for SQL Data files
/VolLog: C Volume for SQL Log Files
/VolProg: C Volume for SQL Program Files

FineBuild will not by default install Replication Distributor, because most sites do not need this functionality.

If you want FineBuild to install Replication Distributor, then you must add the following parameter when you run FineBuild:

 /SetupDistributor:Yes

The FineBuild install for Replication Distributor includes the following:

Top


Manual Replication Distributor Install

The following steps show what you would have to do to install Replication Distributor manually. FineBuild does all of this work for you automatically.

Configure Instance as Distributor

  1. Start SQL Server Management Studio (SSMS) and run the following command:

    EXEC sp_get_distributor
    

    If the value of installed is False then perform all of the steps in this section

  2. Run the following command to configure the SQL Instance as a Distributor.

    EXEC sp_adddistributor @distributor='instance', @password='distributorPassword'
    

Setup Replication Distributor Database

If the value of distribution db installed is False then perform all of the steps in this section

  1. Create the folder to host the Distribution DB data file.

    Run the following command, replacing VolData and Instance with the values of the /VolData: parameter and the SQL Instance name being installed

    MD volData:\dirSQL\MSSQL.instance.Data\distributorDatabase
    
  2. Run the following command to create the Distribution database.

    EXEC sp_adddistributiondb @database='distributorDatabase', @security_mode=1, 
    @data_folder='volData:\dirSQL\MSSQL.instance.Data\distributorDatabase',
    @log_folder='volLog:\dirSQL\MSSQL.instance.Log'
    

Configure SQL Instance as Publisher

  1. Run the following command to configure the SQL instance as a Publisher.
    EXEC sp_adddistpublisher @publisher='instance',distribution_db='distributorDatabase', 
    @security_mode=1, @password='distributorPassword', 
    @working_directory='volProg:\dirSQL\MSSQL_10\instance\MSSQL\Repl'
    

Copyright FineBuild Team © 2011 - 2020. License and Acknowledgements

Previous Install Data Quality Services Top Install SSDT Next