Note: I didn't write this document, credit goes to Lucy Yao - but it's very useful information to have and is frequently helpful during server setup.
New Server Setup
Install SQL Server x64 (Standard – Server with a GUI)
Create Windows accounts
My_Replication_Merge
My_Replication_Dist
My_Replication_Log
My_Replication_Snapshot
My_SQL_Agent (Agent Service)
My_SQL_DBEngine (Server Service)
My_Admin account
Rename computer to SYNCGATEWAY
Install .NET 3.5
In Server Manager, click Manage (upper right), then click Add Roles and Features
Push Next until you reach the features page. Select .Net Framework 3.5 and click Next
On the confirmation page, click Specify Alternate Source Path. Type D:\sources\sxs at the bottom (if the ISO from 1a was mounted in drive D).
Complete the installation
Install IIS
In Server Manager, click Manage (upper right), then click Add Roles and Features
Click Next until you reach Server Roles, then select IIS. Click Add Features at the pop-up (if applicable).
At the Features page, expand .NET Framework 4.5 and select ASP.NET 4.5
Click Next until you reach Role Services. Select the following
Basic Authentication
Client Certificate Mapping Authentication
IIS Management Console
IIS 6 Management Compatibility
Install
In Server Manager, click Manage (upper right), then click Add Roles and Features
Click Next until you reach Server Roles
Select the following in the Application Development submenu
ISAPI Extensions
ASP.NET (3.5 and 4.5)
.NET Extendibility (3.5 and 4.5)
Install
Install SQL Server 2014
In Feature selection, choose
Database Engine Services
SQL Server Replication
Client Tools Connectivity
Management Tools –Basic
Management Tools –Complete
In Server Configuration, set the account name to
SSE_Agent for SQL Server Agent and set Startup Type to Automatic
SSE_DBEngine for SQL Server Database Engine and set Startup Type to Automatic
In Database Engine Configuration, click Add Current User
Install
Enable Mixed Mode Authentication (In SSMS right click SYNCGATEWAY, then properties. Go to the Security tab)
Add relevant user permissions in SQL (a custom SQL script helps here)
Give all users full permissions to the C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\repldata
Restore the database (MYDATABASE)
Add users to distribution database
Select Security then My_Replication_Merge on the left-hand pane. Right-click and select properties
In User Mapping, select distribution. In Default Schema, type in dbo
In the check box below, select db_owner
Repeat the process for My_Replication_Snapshot and My_Replication_Dist
IIS Setup – Replication Website
Certificate
Open IIS and click SYNCGATEWAY. Click Server Certificates
On the right-hand pane, select Create Self-Signed Certificate
Pick a name and follow the creation process
Replication Site
On the left-hand pane, under Sites, right-click Default Website and rename it Replication
With the Replication Website selected, click Bindings
Add a binding with Type: https. For SSL certificate, select the one created in 12a (Alternatively, use a non-self signed SSL certificate)
Remove the default http port 80 site
Installing the SQL Server Replication Listener
Create a new file directory for replisapi.dll on the computer that is running IIS. Create the directory under the C:\Inetpub\SQLReplication directory
Copy replisapi.dll from the directory C:\Program Files\Microsoft SQL Server\120\com\ to the file directory that you created in step 1.
Click Start, and then click Run. In the Open box, enter cmd, and then click OK.
In the directory created in step 1, execute the following command: regsvr32 replisapi.dll
In Internet Information Services (IIS) Manager, in the Connections pane, right-click Replication, and then select Add Virtual Directory.
For Alias, enter SQLReplication.
For Physical Path, enter C:\Inetpub\SQLReplication\, and then click OK.
In Internet Information Services (IIS) Manager, click Replication
In the center pane, click Handler Mappings.
In the Actions pane, click Add Module Mapping.
For Request Path, enter replisapi.dll.
From the Module drop-down list, select IsapiModule.
For Executable, select C:\Inetpub\SQLReplication\replisapi.dll
For Name, enter Replisapi.
Click the Request Restrictions button, click the Access tab, and then click Execute.
Click OK to close the Request Restrictions dialog box, and then click OK again to close the Add Module Mapping dialog box. When you are prompted to allow the ISAPI extension, click Yes to add the extension.
Verify that Replisapi.dll is listed under the Enabled handler mappings. If it is in the Disabled list, right-click the Replisapi entry and then click Edit Feature Permissions. Check the Execute box, and then click OK.
To Configure IIS Authentication
In Internet Information Services (IIS) Manager, click Replication.
In the middle pane, double-click Authentication.
Right-click Anonymous Authentication, and then choose Disable.
Right-click Basic Authentication, and then choose Enable.
To require SSL security for a Web site
In the middle pane, double-click SSL Settings.
Check the Require SSL option. Under Client certificates, verify that the Ignore button is selected.
Click Apply
To test the certificate
From the Actions pane, click Browse *:443(https).
Internet Explorer will open and display a message that "There is a problem with this website's security certificate." This warning tells you that the associated certificate was not issued by a recognized CA and might not be trustworthy. This is an expected warning, so click Continue to this website (not recommended).
If you are prompted to Connect to localhost, enter a user name and password to proceed. You should see the default page for the Web site. (The Windows administrator username and password).
Add My_Replication_Merge to the IIS_IUSRS group
In Server Manager, click Tools then expand Computer Management, expand Local Users and Groups, and then click Groups.
Right-click IIS_IUSRS, and then click Add to Group.
In the IIS_IUSRS Properties dialog box, click Add.
In the Select Users, Computers, or Groups dialog box, add SYNCGATEWAY/My_Replication_Merge.
In the Select Users dialog box and the IIS_IUSRS Properties dialog box, click OK.
Grant minimum account permissions on the folder that contains replisapi.dll
In Windows Explorer, right-click the folder that you created for replisapi.dll, and then click Properties.
On the Security tab, click Edit.
In the Permissions for <foldername> dialog box, add SYNCGATEWAY\My_Replication_Merge
Verify that the account is granted only Read, Read & Execute, and List Folder Contents permissions.
Create an application pool in Internet Information Services (IIS) Manager
In Internet Information Services (IIS) Manager, in the Connections pane, expand the local server node.
Right-click Application Pools, and then click Add Application Pool.
Enter Replications as the name for the application pool, leave the default values for the remaining fields, and then click OK.
Associate the account with the application pool
In Internet Information Services (IIS) Manager, expand the local server node, and then click on Application Pools.
Right-click the application pool that you created, and then click Set Application Pool Defaults.
In the Application Pool Defaults dialog box, scroll down to the Process Model section, and then click the Identity field.
Click the ellipsis button on the right side of the Identity row.
Click the Custom Account radio button, and then click Set.
In the User name and Password fields,enter My_Replication_Merge for the user name and the windows password as the password.
Click OK to close the Application Pool Identity dialog box, and then click OK again to close the Application Pool Defaults dialog box.
Associate the application pool with the replication Web site
In Internet Information Services (IIS) Manager, expand the local server node, and then click on the Replication website
In the Actions pane, under Manage Web Site, click Advanced Settings.
In the Advanced Settings dialog box, click on the ellipsis button to the right of Application Pool.
From the Application pool drop-down list, select Replications
Click OK again to close Advanced Settings.
To test the connection to replisapi.dll
In Microsoft Internet Explorer, on the Tools menu, click Internet Options.
On the Connections tab, click LAN Settings.
If a proxy server is not used on the LAN, clear Automatically Detect Settings and Use a proxy server for your LAN.
If a proxy server is used, click Use a proxy server for your LAN and Bypass proxy server for local addresses, and then click OK.
Go to https://(your URL)/SQLReplication/replisapi.dll?diag
Log in with the Administrator account
The page should look like this
No comments:
Post a Comment